/* System font stack — no external dependency, works offline */

:root {
    --bg-dark:    #080c14;
    --bg-card:    #0f1623;
    --bg-card2:   #111827;
    --bg-hover:   #1a2235;
    --accent:     #e63950;
    --accent2:    #f5a623;
    --accent3:    #3b82f6;
    --border:     #1e2d45;
    --border2:    #243044;
    --text:       #e2e8f0;
    --text-muted: #64748b;
    --text-dim:   #94a3b8;
    --success:    #10b981;
    --warning:    #f59e0b;
    --sidebar-w:  260px;
    --radius:     12px;
    --radius-sm:  8px;
    --shadow:     0 4px 24px rgba(0,0,0,.4);
    --shadow-sm:  0 2px 8px rgba(0,0,0,.3);
    --gold:       #f5a623;
    --gold-dim:   rgba(245,166,35,.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0a0f1e 0%, #0d1526 50%, #0a1020 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 28px 20px 24px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    position: relative;
}
.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.brand-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #1e3a5f, #0f2040);
    border: 2px solid var(--gold);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(245,166,35,.2);
}
.sidebar-brand h5 {
    color: var(--gold);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.3;
}
.sidebar-brand small {
    color: var(--text-muted);
    font-size: .72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sidebar-nav { flex: 1; padding: 16px 12px; }

.nav-section {
    padding: 12px 10px 6px;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: .855rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: all .2s ease;
    position: relative;
    border: 1px solid transparent;
}
.sidebar-nav a:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--border2);
}
.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(230,57,80,.18), rgba(230,57,80,.08));
    border-color: rgba(230,57,80,.35);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm);
}
.sidebar-nav a.active .nav-icon { color: var(--accent); }
.nav-icon {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color .2s;
}
.sidebar-nav a:hover .nav-icon { color: var(--accent2); }

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    font-size: .72rem;
    color: var(--text-muted);
    text-align: center;
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-dark);
}

.topbar {
    background: linear-gradient(90deg, var(--bg-card2), var(--bg-card));
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.topbar h4 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .2px;
}
.live-badge {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(220,38,38,.4);
    animation: pulse-badge 2s infinite;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s;
}
.live-badge:hover { opacity: .85; }
@keyframes pulse-badge {
    0%,100% { box-shadow: 0 0 10px rgba(220,38,38,.4); }
    50%      { box-shadow: 0 0 18px rgba(220,38,38,.7); }
}
.launch-btn {
    color: var(--accent2);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    padding: 7px 16px;
    border: 1px solid rgba(245,166,35,.3);
    border-radius: 20px;
    transition: all .2s;
    letter-spacing: .3px;
}
.launch-btn:hover {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
}

.content-area { padding: 24px 28px; flex: 1; }

/* ═══════════════════════════════════════════
   CARDS
═══════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s;
}
.card:hover { border-color: var(--border2); }

.card-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.card-header-bar h5 {
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════════════════════════════════════
   SCREEN GRID
═══════════════════════════════════════════ */
.screens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 14px;
}

.screen-tile {
    background: linear-gradient(135deg, #0d1526, #111e30);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}
.screen-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--border), transparent);
    transition: background .2s;
}
.screen-tile:hover {
    border-color: var(--accent2);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.screen-tile:hover::before {
    background: linear-gradient(90deg, var(--accent2), transparent);
}
.screen-tile.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(230,57,80,.12), #0d1526);
    box-shadow: 0 0 0 1px rgba(230,57,80,.3), 0 8px 24px rgba(0,0,0,.3);
}
.screen-tile.selected::before {
    background: linear-gradient(90deg, var(--accent), transparent);
}
.screen-tile.active-content { border-color: var(--success); }
.screen-tile.active-content::before {
    background: linear-gradient(90deg, var(--success), transparent);
}

.screen-check {
    position: absolute;
    top: 10px; right: 10px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--border2);
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    transition: all .2s;
}
.screen-tile.selected .screen-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.screen-preview {
    background: #000;
    border-radius: 8px;
    height: 78px;
    display: flex; align-items: center; justify-content: center;
    margin: 10px 0;
    font-size: .7rem;
    color: #333;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    position: relative;
}
.screen-preview.has-content { color: #fff; font-size: .72rem; }
.screen-name {
    font-weight: 600;
    font-size: .875rem;
    color: var(--text);
}
.screen-status {
    font-size: .72rem;
    margin-top: 3px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
    padding: 9px 18px;
    border-radius: 9px;
    border: none;
    cursor: pointer;
    font-size: .835rem;
    font-weight: 600;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: .2px;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background .15s;
    border-radius: inherit;
}
.btn:hover::after { background: rgba(255,255,255,.06); }
.btn:active { transform: scale(.97); }

.btn-accent {
    background: linear-gradient(135deg, #e63950, #c42d3e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(230,57,80,.35);
}
.btn-accent:hover { box-shadow: 0 6px 20px rgba(230,57,80,.5); transform: translateY(-1px); }

.btn-warning {
    background: linear-gradient(135deg, #f5a623, #e09010);
    color: #000;
    box-shadow: 0 4px 14px rgba(245,166,35,.3);
    font-weight: 700;
}
.btn-warning:hover { box-shadow: 0 6px 20px rgba(245,166,35,.45); transform: translateY(-1px); }

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16,185,129,.3);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(16,185,129,.45); transform: translateY(-1px); }

.btn-secondary {
    background: var(--bg-card2);
    color: var(--text-dim);
    border: 1px solid var(--border2);
}
.btn-secondary:hover { border-color: var(--accent2); color: var(--text); background: var(--bg-hover); }

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    box-shadow: 0 4px 14px rgba(220,38,38,.25);
}
.btn-danger:hover { box-shadow: 0 6px 20px rgba(220,38,38,.4); transform: translateY(-1px); }

.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59,130,246,.3);
}
.btn-blue:hover { box-shadow: 0 6px 20px rgba(59,130,246,.45); transform: translateY(-1px); }

.btn-sm  { padding: 6px 13px; font-size: .775rem; border-radius: 7px; }
.btn-lg  { padding: 13px 30px; font-size: .95rem; border-radius: 11px; }
.btn-block { width: 100%; justify-content: center; }

/* Blank/clear button */
.blank-btn {
    background: linear-gradient(135deg, #1a1a2e, #111);
    border: 1px solid #2a2a3e;
    color: #666;
    padding: 9px 18px;
    border-radius: 9px;
    cursor: pointer;
    font-size: .835rem;
    font-weight: 600;
    transition: all .2s;
    display: inline-flex; align-items: center; gap: 7px;
}
.blank-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(230,57,80,.08); }

/* Push bar */
.push-bar {
    background: linear-gradient(135deg, var(--bg-card2), var(--bg-dark));
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 14px;
}

/* ═══════════════════════════════════════════
   CONTENT TYPE TABS
═══════════════════════════════════════════ */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px;
}
.tab-btn {
    padding: 9px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all .2s;
    flex: 1;
    text-align: center;
    letter-spacing: .2px;
}
.tab-btn:hover { color: var(--text); background: var(--bg-hover); }
.tab-btn.active {
    background: linear-gradient(135deg, rgba(245,166,35,.2), rgba(245,166,35,.08));
    color: var(--accent2);
    box-shadow: inset 0 0 0 1px rgba(245,166,35,.3);
}

/* ═══════════════════════════════════════════
   SLIDE ITEMS (Hymns, Bible results)
═══════════════════════════════════════════ */
.slide-list { display: flex; flex-direction: column; gap: 6px; }

.slide-item {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    cursor: pointer;
    transition: all .18s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.slide-item:hover {
    border-color: var(--accent2);
    background: var(--bg-hover);
    transform: translateX(2px);
}
.slide-item.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(230,57,80,.1), var(--bg-card2));
    box-shadow: inset 3px 0 0 var(--accent);
}

.slide-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent2);
    min-width: 52px;
    padding-top: 2px;
    letter-spacing: .5px;
}
.slide-text { font-size: .83rem; line-height: 1.55; }

/* ═══════════════════════════════════════════
   BIBLE PICKER
═══════════════════════════════════════════ */
.bible-selects { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bible-selects select {
    background: var(--bg-card2);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    flex: 1;
    min-width: 120px;
    outline: none;
    transition: border-color .15s;
    cursor: pointer;
}
.bible-selects select:focus { border-color: var(--accent2); }
.bible-selects select option { background: #111827; color: #e2e8f0; }

.verse-display-box {
    background: linear-gradient(135deg, #05080f, #080d18);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.75;
    min-height: 100px;
    color: #fff;
    margin: 12px 0;
}
.verse-ref { font-size: .8rem; color: var(--accent2); margin-top: 10px; font-style: italic; }

/* ═══════════════════════════════════════════
   FORMS
═══════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.form-control {
    width: 100%;
    background: var(--bg-card2);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    outline: none;
    transition: all .15s;
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(245,166,35,.1);
    background: var(--bg-hover);
}
.form-control::placeholder { color: #374151; }
textarea.form-control { resize: vertical; min-height: 88px; line-height: 1.6; }
select.form-control { cursor: pointer; }
select.form-control option,
select option {
    background: #111827;
    color: #e2e8f0;
}

/* ═══════════════════════════════════════════
   TABLES
═══════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 10px 14px;
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(30,45,69,.5);
    font-size: .85rem;
    color: var(--text);
}
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.data-table tr:last-child td { border-bottom: none; }

/* ═══════════════════════════════════════════
   IMAGE THUMBNAILS
═══════════════════════════════════════════ */
.img-thumb {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #050810;
    aspect-ratio: 16/9;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all .2s;
    box-shadow: var(--shadow-sm);
}
.img-thumb:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(230,57,80,.82), rgba(180,30,50,.82));
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.img-thumb:hover .img-thumb-overlay { opacity: 1; }
.img-thumb-overlay span {
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.toast-msg {
    background: var(--bg-card);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    margin-bottom: 8px;
    font-size: .84rem;
    font-weight: 500;
    min-width: 220px;
    box-shadow: var(--shadow);
    animation: slideInToast .3s ease;
    backdrop-filter: blur(10px);
}
.toast-msg.success { border-left: 3px solid var(--success); }
.toast-msg.error   { border-left: 3px solid var(--accent); }
@keyframes slideInToast {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ═══════════════════════════════════════════
   PASSWORD SHOW/HIDE
═══════════════════════════════════════════ */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 42px; }
.pw-eye {
    position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--text-muted); line-height: 1; font-size: 1rem;
    transition: color .15s;
}
.pw-eye:hover { color: var(--accent2); }

/* ═══════════════════════════════════════════
   THEME / BG COLOUR SWATCHES
═══════════════════════════════════════════ */
.t-sw {
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: transform .15s ease, border-color .15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.t-sw:hover  { transform: scale(1.18); }
.t-sw.active { border-color: var(--accent2); transform: scale(1.12); box-shadow: 0 0 0 3px rgba(245,166,35,.25); }

/* ═══════════════════════════════════════════
   STATUS INDICATORS
═══════════════════════════════════════════ */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,.5); }
.dot-red   { background: var(--accent);  box-shadow: 0 0 6px rgba(230,57,80,.5); }
.dot-gray  { background: #374151; }

/* ═══════════════════════════════════════════
   SEARCH BOX
═══════════════════════════════════════════ */
.search-box {
    background: var(--bg-card2);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    width: 100%;
    outline: none;
    font-family: inherit;
    transition: all .15s;
}
.search-box:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(245,166,35,.1);
    background: var(--bg-hover);
}
.search-box::placeholder { color: #374151; }

/* ═══════════════════════════════════════════
   GRID HELPERS
═══════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media(max-width:900px) { .grid-2,.grid-3{grid-template-columns:1fr;} }

/* ═══════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════ */
.gap-2 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.mt-1{margin-top:4px}  .mt-2{margin-top:8px}   .mt-3{margin-top:14px}  .mt-4{margin-top:20px}
.mb-1{margin-bottom:4px} .mb-2{margin-bottom:8px} .mb-3{margin-bottom:14px} .mb-4{margin-bottom:20px}
.text-muted   { color: var(--text-muted); }
.text-dim     { color: var(--text-dim); }
.text-accent  { color: var(--accent); }
.text-warning { color: var(--accent2); }
.text-success { color: var(--success); }
.fw-bold  { font-weight: 700; }
.fw-600   { font-weight: 600; }
.text-sm  { font-size: .775rem; }
.text-xs  { font-size: .72rem; }
.text-center { text-align: center; }
.rounded  { border-radius: var(--radius-sm); }
.w-100    { width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2e4060; }

/* Code blocks */
code {
    background: rgba(245,166,35,.1);
    color: var(--accent2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .82rem;
    font-family: 'Courier New', monospace;
}

/* Alert boxes */
.alert-success {
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--success);
    font-size: .85rem;
}
.alert-danger {
    background: rgba(230,57,80,.1);
    border: 1px solid rgba(230,57,80,.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: #f87171;
    font-size: .85rem;
}
.alert-info {
    background: rgba(59,130,246,.1);
    border: 1px solid rgba(59,130,246,.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: #93c5fd;
    font-size: .85rem;
}
