/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.26_@types+node@22.20.4_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.26_@types+node@22.20.4_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f2f5f9;
  --surface: #ffffff;
  --ink: #182338;
  --muted: #61708a;
  --border: #dfe5ee;
  --accent: #2456c8;
  --accent-hover: #1d47a6;
  --accent-soft: #e8eefb;
  --ok: #16855c;
  --ok-soft: #e2f4ec;
  --warn: #9a5b00;
  --warn-soft: #fdf3e3;
  --danger: #b3261e;
  --danger-soft: #fbeae9;
  --sidebar: #101b2e;
  --sidebar-ink: #b9c6dd;
  --sidebar-active: #1c2c48;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 27, 46, 0.06), 0 4px 16px rgba(16, 27, 46, 0.05);
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- App shell ---------- */

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  padding: 20px 12px;
  position: -webkit-sticky;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
  padding: 4px 12px 18px;
}
.sidebar .brand span { color: #6ea8ff; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar a {
  color: var(--sidebar-ink); text-decoration: none;
  padding: 9px 12px; border-radius: 8px; font-size: 14.5px;
}
.sidebar a:hover { background: var(--sidebar-active); color: #fff; }
.sidebar a.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.sidebar .foot { margin-top: auto; padding: 12px; font-size: 13px; }
.sidebar .foot .who { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sidebar .foot button { margin-top: 8px; }

.content { flex: 1 1; min-width: 0; padding: 28px 32px 64px; }
.content > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; padding: 10px 12px; }
  .sidebar .brand { padding: 0 8px 0 0; font-size: 16px; }
  .sidebar nav { flex-direction: row; }
  .sidebar .foot { margin: 0 0 0 auto; padding: 0; }
  .sidebar .foot .who { display: none; }
  .sidebar .foot button { margin: 0; }
  .content { padding: 20px 16px 48px; }
}

/* ---------- Primitives ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 18px;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; grid-gap: 14px; gap: 14px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

input, select, textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14.5px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
label.field { display: grid; grid-gap: 4px; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }

button {
  padding: 9px 16px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 14.5px; font-family: inherit;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.45; cursor: default; }
button.ghost { background: transparent; color: var(--accent); }
button.ghost:hover { background: var(--accent-soft); }
button.quiet { background: transparent; color: var(--muted); padding: 6px 10px; }
button.quiet:hover { background: var(--bg); color: var(--ink); }
button.danger { background: transparent; color: var(--danger); }
button.danger:hover { background: var(--danger-soft); }
button.small { padding: 5px 10px; font-size: 13px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }

.muted { color: var(--muted); font-size: 13.5px; }
.error { color: var(--danger); font-size: 14px; }
.notice {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 14px; margin-bottom: 16px;
}

.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill.ready, .pill.completed, .pill.online { background: var(--ok-soft); color: var(--ok); }
.pill.pending_review, .pill.uploading, .pill.queued, .pill.delivered, .pill.trial { background: var(--warn-soft); color: var(--warn); }
.pill.playing, .pill.sent, .pill.active { background: var(--accent-soft); color: var(--accent); }
.pill.rejected, .pill.failed, .pill.suspended, .pill.offline { background: var(--danger-soft); color: var(--danger); }
.pill.expired, .pill.archived { background: var(--bg); color: var(--muted); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.on { background: #21ba72; }
.dot.off { background: #c3cddd; }

/* ---------- Video tiles ---------- */

.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.tile.selectable { cursor: pointer; }
.tile.selectable:hover { border-color: var(--accent); }
.tile.selected { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -1px; }
.tile .thumb { aspect-ratio: 16/9; max-width: 100%; background: #0b1220; position: relative; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .thumb .dur {
  position: absolute; right: 6px; bottom: 6px; background: rgba(11, 18, 32, 0.8);
  color: #fff; font-size: 11.5px; padding: 1px 7px; border-radius: 5px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.tile .body { padding: 10px 12px 12px; display: grid; grid-gap: 5px; gap: 5px; }
.tile .title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.tile .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* ---------- TV cards (send page) ---------- */

.tvcard {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow);
}
.tvcard:hover { border-color: var(--accent); }
.tvcard.selected { border-color: var(--accent); background: var(--accent-soft); }
.tvcard .room { font-size: 16px; font-weight: 700; }

/* ---------- Playlist editor ---------- */

.plitem {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.plitem .n { color: var(--muted); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; width: 22px; text-align: right; }
.plitem .t { flex: 1 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.plitem .d { color: var(--muted); font-size: 13px; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ---------- Auth pages (no shell) ---------- */

.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.authbox { width: 100%; max-width: 400px; }
.authbox .brand { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.authbox .brand span { color: var(--accent); }

/* legacy helpers still used by /pair */
main.bare { max-width: 480px; margin: 0 auto; padding: 32px 16px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--accent-soft); color: var(--accent); }

