/* ============================================================
   NSEND IPTV Studio — theme (violet→fuchsia brand from logo)
   ============================================================ */
:root {
    --c-bg: #f6f5fc;
    --c-surface: #ffffff;
    --c-surface-2: #faf9ff;
    --c-border: #e9e6f3;
    --c-text: #1b1430;
    --c-text-soft: #5c5570;
    --c-muted: #918aa6;

    --c-primary: #7c3aed;       /* violet (logo) */
    --c-primary-600: #6d28d9;
    --c-primary-50: #f4e9ff;
    --c-magenta: #c026d3;       /* fuchsia (logo) */
    --c-accent: #10b981;        /* live / emerald */
    --c-danger: #e5484d;
    --c-warning: #f5a623;
    --c-sky: #3b82f6;

    --grad-brand: linear-gradient(120deg, #6d28d9 0%, #9333ea 52%, #c026d3 100%);
    --sidebar-bg: #190f2e;      /* deep violet to showcase the logo */

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(27, 20, 48, .06), 0 1px 3px rgba(27, 20, 48, .05);
    --shadow-md: 0 8px 24px rgba(109, 40, 217, .12);
    --sidebar-w: 256px;
    --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; font-family: var(--font-display); letter-spacing: -.01em; }
.page-title, .topbar-title, .sidebar-name, .auth-brand h1 { font-family: var(--font-display); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: #c7c2db;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
}
.sidebar-brand {
    display: flex; align-items: center; justify-content: center;
    padding: 22px 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo-img { width: 100%; max-width: 190px; height: auto; display: block; }
.sidebar-logo { font-size: 22px; }
.sidebar-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.sidebar-section {
    text-transform: uppercase; font-size: 11px; letter-spacing: .08em;
    color: #6b7191; margin: 16px 12px 8px; font-weight: 600;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: #c7cbe0; font-weight: 500; font-size: 14.5px;
    transition: background .15s, color .15s; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.is-active { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 16px rgba(147, 51, 234, .35); }
.nav-item.is-soon { opacity: .5; cursor: not-allowed; }
.nav-icon { width: 22px; text-align: center; font-size: 15px; }
.nav-icon { width: 22px; text-align: center; font-size: 16px; }
.nav-soon {
    margin-left: auto; font-size: 10px; text-transform: uppercase;
    background: rgba(255,255,255,.1); padding: 2px 6px; border-radius: 6px; letter-spacing: .05em;
}
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-backdrop { display: none; }

.app-main {
    flex: 1; margin-left: var(--sidebar-w);
    display: flex; flex-direction: column; min-width: 0;
}

/* ---------- Topbar ---------- */
.topbar {
    height: 64px; background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    display: flex; align-items: center; gap: 16px;
    padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.topbar-burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--c-text); }
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--grad-brand); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-family: var(--font-display);
}
.topbar-user { text-decoration: none; }
.topbar-user:hover .topbar-user-name { color: var(--c-primary); }
.topbar-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-user-name { font-weight: 600; font-size: 14px; }
.topbar-user-role { font-size: 12px; color: var(--c-muted); }

/* ---------- Content ---------- */
.app-content { padding: 28px; max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 22px; }
.page-sub { color: var(--c-text-soft); margin: 4px 0 0; }

/* ---------- Stat cards ---------- */
.stat-grid {
    display: grid; gap: 16px; margin-bottom: 24px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.stat-card {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius); padding: 18px;
    display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
}
.stat-icon {
    width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    font-size: 18px; background: var(--c-primary-50); color: var(--c-primary);
}
.stat-body { display: flex; flex-direction: column; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1; }
.stat-label { color: var(--c-muted); font-size: 13px; margin-top: 4px; }
.tone-emerald .stat-icon { background: #e3f7f3; color: #0a7a63; }
.tone-violet .stat-icon  { background: #f4e9ff; color: #9333ea; }
.tone-sky .stat-icon     { background: #e7f0fe; color: #2563eb; }
.tone-slate .stat-icon   { background: #eef0f6; color: var(--c-text-soft); }

/* ---------- Panels ---------- */
.panel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 24px; }
.panel {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--c-border); }
.panel-head h3 { font-size: 15px; }
.panel > *:not(.panel-head) { padding: 20px; }

.quick-actions { display: grid; gap: 10px; }
.quick-action {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    font-weight: 500; transition: border-color .15s, background .15s;
}
.quick-action:hover { border-color: var(--c-primary); background: var(--c-primary-50); }
.quick-action.is-soon { opacity: .6; cursor: not-allowed; }
.quick-action em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--c-muted); text-transform: uppercase; }

.checklist { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.checklist li { color: var(--c-text-soft); }
.checklist li.done { color: var(--c-accent); }
.muted { color: var(--c-muted); font-size: 13px; }

.empty-state { text-align: center; color: var(--c-muted); padding: 36px 20px; }
.empty-emoji { font-size: 34px; display: block; margin-bottom: 10px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer;
    transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-brand); background-size: 140% 140%; color: #fff; box-shadow: 0 4px 14px rgba(147, 51, 234, .28); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: var(--c-border); color: var(--c-text); }
.btn-ghost:hover { background: var(--c-surface-2); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 11px 13px; font: inherit;
    border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    background: var(--c-surface); color: var(--c-text); transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-50);
}
.form-group input.has-error { border-color: var(--c-danger); }
.field-error { display: block; color: var(--c-danger); font-size: 12.5px; margin-top: 5px; }
.password-wrap { position: relative; }
.password-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; cursor: pointer; font-size: 16px; opacity: .6;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px;
    font-size: 14px; border: 1px solid transparent;
}
.alert-success { background: #e7f8f3; color: #0a7a63; border-color: #b6ebdd; }
.alert-error   { background: #fdeaea; color: #b42318; border-color: #f6cecb; }
.alert-warning { background: #fef4e5; color: #9a6400; border-color: #f7dcae; }
.alert-info    { background: var(--c-primary-50); color: var(--c-primary-600); border-color: #dcd8fb; }

/* ---------- Toasts ---------- */
.toast-root { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast {
    background: #161a2b; color: #fff; padding: 12px 16px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); font-size: 14px; opacity: 0; transform: translateY(10px);
    transition: opacity .2s, transform .2s; max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-success { background: #0a7a63; }
.toast.toast-error { background: #b42318; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--c-border); }
.table th { color: var(--c-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-live { background: #e3f7f3; color: #0a7a63; }
.badge-offline { background: #eef0f6; color: var(--c-text-soft); }
.badge-error { background: #fdeaea; color: #b42318; }
.badge-warning { background: #fef4e5; color: #9a6400; }

/* ---------- Buttons: sizes & variants ---------- */
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #cf3b40; }
.icon-btn {
    border: 1px solid var(--c-border); background: var(--c-surface); cursor: pointer;
    width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center;
    font-size: 14px; color: var(--c-text-soft); flex: none;
}
.icon-btn:hover { background: var(--c-surface-2); border-color: var(--c-primary); color: var(--c-primary); }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
    background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 7px; padding: 3px 8px;
}
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.masked { filter: blur(5px); user-select: none; }

/* ---------- Channel grid / cards ---------- */
.channel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.channel-card {
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.channel-card-top { display: flex; align-items: center; gap: 12px; }
.channel-logo { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex: none; background: var(--c-primary-50); display: grid; place-items: center; }
.channel-logo img { width: 100%; height: 100%; object-fit: cover; }
.channel-logo-fallback { font-weight: 800; color: var(--c-primary); font-size: 20px; }
.channel-meta { flex: 1; min-width: 0; }
.channel-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-sub { color: var(--c-muted); font-size: 13px; margin: 2px 0 0; }
.channel-owner { font-size: 12px; color: var(--c-muted); margin: 0; }
.channel-keyrow { display: flex; align-items: center; gap: 8px; }
.channel-key { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: inline; margin: 0; }

/* ---------- Forms (channel create/edit) ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.form-panel, .side-panel { margin-bottom: 0; }
.form-body { padding: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.checkbox input { width: auto; }
.checkbox-group { margin-top: 4px; }
.logo-preview { margin-bottom: 8px; }
.logo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--c-border); }
.kv { margin-bottom: 14px; }
.kv-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); margin-bottom: 5px; }
.copy-field { display: flex; align-items: center; gap: 8px; }
.copy-field code { flex: 1; min-width: 0; }
.hint { font-size: 13px; color: var(--c-text-soft); margin: 10px 0 0; }
.field-hint { display: block; font-size: 12.5px; color: var(--c-muted); margin-top: 5px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- OBS setup page ---------- */
.status-banner {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
    margin-bottom: 18px; font-weight: 600; border: 1px solid var(--c-border); background: var(--c-surface);
}
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c-muted); flex: none; }
.status-banner.state-live { background: #e7f8f3; border-color: #b6ebdd; color: #0a7a63; }
.status-banner.state-live .status-dot { background: var(--c-accent); box-shadow: 0 0 0 4px rgba(6,182,164,.2); }
.status-banner.state-warning { background: #fef4e5; border-color: #f7dcae; color: #9a6400; }
.status-banner.state-warning .status-dot { background: var(--c-warning); }
.status-banner.state-offline .status-dot { background: var(--c-muted); }
.obs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings-title { font-size: 14px; margin-bottom: 10px; color: var(--c-primary); }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mini-table td { padding: 7px 6px; border-bottom: 1px solid var(--c-border); }
.mini-table td:first-child { color: var(--c-muted); width: 45%; }
.tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--c-text-soft); }

/* ---------- Dashboard: resource meters + activity ---------- */
.resource { margin-bottom: 16px; }
.resource-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--c-text-soft); }
.meter { height: 8px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--c-primary); transition: width .3s; }
.meter-fill.tone-violet { background: #8b5cf6; }
.meter-fill.tone-sky { background: var(--c-sky); }
.meter-fill.tone-indigo { background: var(--c-primary); }
.svc-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 13px; color: var(--c-text-soft); }
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-feed li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--c-border); font-size: 14px; }
.activity-feed li:last-child { border-bottom: 0; }
.activity-icon { width: 22px; text-align: center; }
.activity-text { flex: 1; }
.activity-time { color: var(--c-muted); font-size: 12px; white-space: nowrap; }

/* ---------- Playlist studio ---------- */
.inline-create { display: flex; gap: 10px; }
.inline-create input { flex: 1; padding: 11px 13px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); font: inherit; }
.inline-create input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-50); }

.playlist-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.playlist-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.playlist-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.playlist-name { font-size: 16px; }
.playlist-meta { color: var(--c-muted); font-size: 13px; margin: 0; }
.playlist-url code, .playlist-url-bar code { flex: 1; min-width: 0; }
.playlist-url-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 8px 10px; }

/* Sortable channel list */
.sortable { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sort-item { border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); }
.sort-item.dragging { opacity: .5; border-color: var(--c-primary); }
.sort-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.drag-handle { cursor: grab; color: var(--c-muted); font-size: 18px; user-select: none; }
.sort-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sort-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sort-sub { display: flex; gap: 6px; }
.override { border-top: 1px solid var(--c-border); }
.override summary { cursor: pointer; padding: 8px 12px; font-size: 13px; color: var(--c-text-soft); }
.override-form { padding: 0 12px 14px; }

.add-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.add-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.add-list li:last-child { border-bottom: 0; }

.code-preview { background: #161a2b; color: #d6dbf0; border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; white-space: pre; margin: 0; }

.badge-info { background: var(--c-primary-50); color: var(--c-primary-600); }
.url-tag { font-size: 11px; font-weight: 700; color: var(--c-muted); background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 6px; padding: 3px 7px; flex: none; }

/* ---------- EPG studio ---------- */
.epg-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; }
.epg-channel-select { display: flex; align-items: center; gap: 8px; }
.epg-channel-select label { font-weight: 600; font-size: 13px; }
.epg-channel-select select { padding: 8px 10px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); font: inherit; }
.epg-datenav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.epg-datenav strong { min-width: 150px; text-align: center; }

.guide-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.guide-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.guide-item:last-child { border-bottom: 0; }
.guide-time { font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; font-size: 14px; flex: none; width: 52px; line-height: 1.3; }
.guide-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.guide-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-sub { color: var(--c-muted); font-size: 13px; }
.guide-actions { display: flex; gap: 6px; align-items: center; flex: none; }

/* ---------- Broadcast monitor player ---------- */
.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.hls-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}
.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    color: #cbd2ec;
    background: rgba(10, 13, 25, .72);
    font-size: 14px;
    pointer-events: none;
}

/* ---------- Tabs / chips / pager (admin) ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--c-border); }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; font-weight: 600; font-size: 14px;
    color: var(--c-text-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--c-text); }
.tab.is-active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.logs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.log-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--c-border);
    color: var(--c-text-soft); background: var(--c-surface); }
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip.is-active { background: var(--grad-brand); color: #fff; border-color: transparent; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.nowrap { white-space: nowrap; }
.ellipsis-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Admin tables ---------- */
.table-scroll { overflow-x: auto; }
.inline-row { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.inline-row select, .inline-row input { padding: 6px 8px; border: 1px solid var(--c-border); border-radius: 8px; font: inherit; }
.pw-mini { width: 140px; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .form-layout { grid-template-columns: 1fr; }
    .obs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .form-row, .settings-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .topbar-burger { display: block; }
    .sidebar-backdrop.show {
        display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35;
    }
}
