/* ===== Brinkmann-Movie Portal – Theme ===== */
@import url("https://fonts.googleapis.com/css2?family=Anton&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #07060a;
  --bg-soft: #0e0c14;
  --panel: #110f18;
  --panel-2: #15121d;
  --fg: #f4f1ea;
  --muted: #8c8794;
  --line: rgba(255, 255, 255, 0.09);
  --accent-1: #ff6a2b;
  --accent-2: #ff2d7e;
  --accent-3: #b14bff;
  --grad: linear-gradient(115deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));
  --ok: #38d39f;
  --warn: #ffb84d;
  --danger: #ff5d6c;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: "Manrope", system-ui, sans-serif; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.01em; line-height: 1.15; }

/* ---------- Auth (Login/Register/Setup) ---------- */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem; position: relative; overflow: hidden;
}
.auth-body::before, .auth-body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(120px); z-index: 0;
}
.auth-body::before { width: 520px; height: 520px; background: var(--accent-1); top: -12%; right: -8%; opacity: 0.4; }
.auth-body::after  { width: 460px; height: 460px; background: var(--accent-3); bottom: -15%; left: -10%; opacity: 0.4; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: rgba(17, 15, 24, 0.8); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 2.4rem;
}
.auth-card .brand-line {
  font-weight: 800; font-size: 1.2rem; margin-bottom: 0.4rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.auth-card .brand-line .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); }
.auth-card h1 { font-size: 1.7rem; margin: 0.6rem 0 0.3rem; }
.auth-card .muted { color: var(--muted); margin-bottom: 1.4rem; }
.auth-switch { margin-top: 1.4rem; color: var(--muted); font-size: 0.92rem; text-align: center; }
.auth-switch a { color: var(--accent-2); font-weight: 600; }

/* ---------- Forms ---------- */
.stack { display: flex; flex-direction: column; gap: 1rem; }
label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.88rem; color: var(--muted); }
input, select, textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.8rem 0.9rem; color: var(--fg); font-family: inherit; font-size: 1rem;
  transition: border-color 0.25s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); }
textarea { resize: vertical; min-height: 110px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.95rem; padding: 0.8rem 1.4rem; border-radius: 100px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.3s var(--ease);
  font-family: inherit;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -12px var(--accent-2); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }
.btn-danger { background: transparent; border-color: rgba(255,93,108,0.5); color: var(--danger); }
.btn-danger:hover { background: rgba(255,93,108,0.1); }

/* ---------- Alerts ---------- */
.alert { padding: 0.8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.92rem; border: 1px solid var(--line); }
.alert.is-done   { border-color: rgba(56,211,159,0.4); background: rgba(56,211,159,0.08); color: #9beccd; }
.alert.is-danger, .alert.is-error { border-color: rgba(255,93,108,0.4); background: rgba(255,93,108,0.08); color: #ffb3ba; }
.alert.is-info   { border-color: rgba(177,75,255,0.4); background: rgba(177,75,255,0.08); color: #d9b8ff; }

/* ---------- App Shell ---------- */
.shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-soft); border-right: 1px solid var(--line);
  padding: 1.6rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem 1.2rem; }
.sidebar .brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); }
.sidebar .brand .thin { color: var(--muted); font-weight: 500; }
.nav-group { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding: 1rem 0.6rem 0.4rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 0.95rem; transition: all 0.2s var(--ease);
}
.nav-link:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.nav-link.active { background: rgba(255,255,255,0.06); color: var(--fg); }
.nav-link.active .ico { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-link .ico { width: 1.2rem; text-align: center; font-size: 1rem; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem clamp(1rem, 3vw, 2.2rem); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(7,6,10,0.8); backdrop-filter: blur(12px); z-index: 10;
}
.topbar h1 { font-size: 1.4rem; }
.topbar .user-chip { display: flex; align-items: center; gap: 0.7rem; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
}
.content { padding: clamp(1rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: 1.4rem; }

/* burger (mobile) */
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.6rem; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: var(--fg); margin: 3px 0; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 1.1rem; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem;
}
.card h2, .card h3 { font-size: 1.05rem; margin-bottom: 0.9rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.card-head h2 { margin: 0; }

.stat-card { position: relative; overflow: hidden; }
.stat-card .label { color: var(--muted); font-size: 0.85rem; }
.stat-card .value { font-family: "Anton", sans-serif; font-size: 2.6rem; line-height: 1; margin-top: 0.4rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .sub { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; }
.stat-card .ico { position: absolute; top: 1rem; right: 1.2rem; font-size: 1.3rem; opacity: 0.5; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(255,255,255,0.02); }

.badge { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 100px; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--line); }
.badge.is-open { color: var(--warn); border-color: rgba(255,184,77,0.4); background: rgba(255,184,77,0.1); }
.badge.is-progress { color: var(--accent-3); border-color: rgba(177,75,255,0.4); background: rgba(177,75,255,0.1); }
.badge.is-done { color: var(--ok); border-color: rgba(56,211,159,0.4); background: rgba(56,211,159,0.1); }
.badge.is-danger { color: var(--danger); border-color: rgba(255,93,108,0.4); background: rgba(255,93,108,0.1); }
.badge.is-muted { color: var(--muted); }

.empty { color: var(--muted); text-align: center; padding: 2.5rem 1rem; }
.muted { color: var(--muted); }
.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.page-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 0.5rem; }
.bars .bar { flex: 1; background: var(--grad); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; opacity: 0.85; transition: opacity 0.2s; }
.bars .bar:hover { opacity: 1; }
.bars .bar span { position: absolute; bottom: -1.4rem; left: 50%; transform: translateX(-50%); font-size: 0.65rem; color: var(--muted); white-space: nowrap; }
.bars-x { margin-top: 1.6rem; }

/* ticket thread */
.thread { display: flex; flex-direction: column; gap: 0.9rem; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1.1rem; background: var(--panel-2); }
.msg.mine { border-color: rgba(255,45,126,0.35); }
.msg .meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.4rem; display: flex; gap: 0.6rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }
  .sidebar.open { transform: translateX(0); }
  .burger { display: block; }
  .cols-4 { grid-template-columns: 1fr 1fr; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cols-4 { grid-template-columns: 1fr; }
}
