:root {
  --primary: #5b2be0;
  --accent: #ff9f1c;
  --bg: #f5f4f8;
  --card: #ffffff;
  --ink: #17151f;
  --muted: #6b6879;
  --line: #e6e3ee;
  --ok: #12a150;
  --bad: #d92d20;
  --warn: #e8a100;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 10, 50, .06), 0 6px 20px rgba(20, 10, 50, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 11px; padding: .78rem 1.15rem; font: inherit; font-weight: 650;
  background: var(--primary); color: #fff; cursor: pointer; text-decoration: none;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.light { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { padding: .45rem .75rem; font-size: .88rem; border-radius: 9px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }

label { display: block; font-size: .86rem; font-weight: 600; margin: .8rem 0 .3rem; }
input, select, textarea {
  width: 100%; font: inherit; padding: .7rem .8rem; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { min-height: 90px; resize: vertical; }

.badge { display: inline-block; padding: .18rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--line); color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.badge.ok { background: #dcf6e6; color: #0b6b35; }
.badge.bad { background: #fde3e1; color: #9a1c12; }
.badge.warn { background: #fff1cc; color: #7a5300; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #17151f; color: #fff; padding: .75rem 1.1rem; border-radius: 12px; z-index: 999; box-shadow: var(--shadow); max-width: 92vw; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { height: 44px; max-width: 160px; object-fit: contain; }
.brand .logo-fallback { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.brand .names { min-width: 0; }
.brand .company { font-size: .8rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .event { font-weight: 800; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
