/* ══════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════ */
:root {
    --bg-dark:        #080d18;
    --bg-card:        rgba(14, 20, 38, 0.75);
    --bg-card-hover:  rgba(22, 32, 58, 0.88);
    --border-color:   rgba(255, 255, 255, 0.07);
    --border-strong:  rgba(255, 255, 255, 0.15);
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --primary:        #6366f1;
    --primary-light:  #818cf8;
    --primary-glow:   rgba(99, 102, 241, 0.18);
    --success:        #34d399;
    --success-glow:   rgba(52, 211, 153, 0.15);
    --warning:        #fbbf24;
    --error:          #f87171;
    --font-heading:   'Outfit', sans-serif;
    --font-body:      'Plus Jakarta Sans', sans-serif;
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      18px;
    --radius-xl:      24px;
    --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow:    0 0 0 3px var(--primary-glow);
}

/* ══════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   AMBIENT BACKGROUND
══════════════════════════════════════════════════════ */
.glow-bg {
    position: fixed; top: -15%; left: -10%;
    width: 55%; height: 60%;
    background: radial-gradient(ellipse, rgba(99,102,241,0.1) 0%, transparent 70%);
    z-index: -1; pointer-events: none;
}
.glow-bg-2 {
    position: fixed; bottom: -15%; right: -10%;
    width: 55%; height: 60%;
    background: radial-gradient(ellipse, rgba(52,211,153,0.07) 0%, transparent 70%);
    z-index: -1; pointer-events: none;
}

/* ══════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════ */
.app-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 1024px) { .grid-layout { grid-template-columns: 1fr; } }

.view { animation: fadeIn 0.25s ease-out; }

/* ══════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════ */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--success));
    border-radius: 11px;
    position: relative;
    box-shadow: 0 4px 14px rgba(99,102,241,0.4);
    flex-shrink: 0;
}
.logo-icon::before {
    content: '✓';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white; font-weight: bold; font-size: 1.15rem;
}

.logo-icon-lg {
    width: 62px; height: 62px;
    background: linear-gradient(135deg, var(--primary), var(--success));
    border-radius: 18px;
    position: relative;
    box-shadow: 0 8px 28px rgba(99,102,241,0.45);
    margin: 0 auto 1.1rem;
}
.logo-icon-lg::before {
    content: '✓';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white; font-weight: 800; font-size: 1.75rem;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.45rem; font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-text p { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.05rem; }

.user-greeting {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.85rem; color: var(--text-secondary);
    margin-left: auto; margin-right: 1rem;
}

.header-divider { color: var(--border-strong); }

.logout-link { color: var(--error); text-decoration: none; font-weight: 600; transition: opacity 0.2s; }
.logout-link:hover { opacity: 0.75; }

.header-right { display: flex; align-items: center; gap: 0.75rem; }

.server-status {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(52,211,153,0.08);
    padding: 0.45rem 0.9rem; border-radius: 99px;
    border: 1px solid rgba(52,211,153,0.18);
}

.auto-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(99,102,241,0.12); color: var(--primary-light);
    padding: 0.3rem 0.85rem; border-radius: 99px;
    font-size: 0.75rem; font-weight: 700;
    border: 1px solid rgba(99,102,241,0.28);
}

.status-dot {
    width: 8px; height: 8px;
    background-color: var(--success); border-radius: 50%;
    display: inline-block; flex-shrink: 0;
}

.pulsing { animation: pulse 1.8s infinite alternate; }

@keyframes pulse {
    0%   { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(52,211,153,0.7); }
    70%  { transform: scale(1);   box-shadow: 0 0 0 6px rgba(52,211,153,0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

.status-label { font-size: 0.78rem; font-weight: 600; color: var(--success); }

@media (max-width: 640px) {
    .app-header { flex-direction: column; align-items: flex-start; }
    .user-greeting { margin-left: 0; margin-right: 0; }
}

/* ══════════════════════════════════════════════════════
   NAVIGATION TABS
══════════════════════════════════════════════════════ */
.app-nav {
    display: inline-flex;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    padding: 0.3rem; border-radius: var(--radius-lg);
    margin-bottom: 1.75rem; gap: 0.4rem;
}

.nav-item {
    font-family: var(--font-body);
    font-size: 0.92rem; font-weight: 600;
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem; border-radius: 11px;
    border: none; background: none; cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-item.active { color: #fff !important; background: var(--primary) !important; box-shadow: 0 4px 14px rgba(99,102,241,0.35); }

/* ══════════════════════════════════════════════════════
   INNER TABS (config-tab-lokasi / config-tab-jadwal)
══════════════════════════════════════════════════════ */
.inner-tab-nav {
    display: flex; gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 0.3rem; border-radius: var(--radius-md);
}

.inner-tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
    color: var(--text-secondary); padding: 0.65rem 1rem;
    border-radius: 9px; border: none; background: none; cursor: pointer;
    transition: all 0.2s ease;
}
.inner-tab:hover { color: #fff; background: rgba(255,255,255,0.05); }
.inner-tab.active { color: #fff; background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.35); }

.inner-tab-badge {
    font-size: 0.65rem; font-weight: 700;
    background: rgba(99,102,241,0.2); color: var(--primary-light);
    padding: 0.1rem 0.4rem; border-radius: 99px;
    border: 1px solid rgba(99,102,241,0.3);
}

/* ══════════════════════════════════════════════════════
   NOTE TABS (per tanggal / bulk json)
══════════════════════════════════════════════════════ */
.note-tab-nav {
    display: inline-flex; gap: 0.3rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    padding: 0.25rem; border-radius: 10px;
}

.note-tab {
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary); padding: 0.4rem 0.9rem;
    border-radius: 7px; border: none; background: none; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap;
}
.note-tab:hover { color: #fff; background: rgba(255,255,255,0.06); }
.note-tab.active { color: #fff; background: var(--primary); box-shadow: 0 2px 8px rgba(99,102,241,0.3); }

/* ══════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s;
}

.card-header { margin-bottom: 1.5rem; }
.card-header h2 {
    font-family: var(--font-heading); font-size: 1.18rem; font-weight: 700;
    margin-bottom: 0.25rem; color: var(--text-primary);
}
.card-subtitle { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }

.card-header-flex {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 0;
}
.card-header-flex h2 { font-family: var(--font-heading); font-size: 1.18rem; font-weight: 700; margin-bottom: 0.25rem; }

.log-header {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: 1rem;
}

.sticky-sidebar { position: sticky; top: 1rem; }

/* ══════════════════════════════════════════════════════
   HOW IT WORKS BANNER
══════════════════════════════════════════════════════ */
.how-it-works-banner {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    background: rgba(99,102,241,0.06); border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius-md); padding: 0.9rem 1.25rem; margin-bottom: 1.5rem;
}
.how-step { display: flex; align-items: center; gap: 0.55rem; }
.how-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary); color: white;
    font-size: 0.75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.how-label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); }
.how-arrow { color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }

label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.field-hint { font-size: 0.73rem; color: var(--text-muted); line-height: 1.3; }

input[type="text"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="time"],
select, textarea {
    background: rgba(8, 13, 30, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: all 0.2s ease;
    width: 100%;
}

select { cursor: pointer; }
select option { background: #121929; color: white; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: rgba(8, 13, 30, 0.9);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

.section-divider-label {
    font-size: 0.72rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 0.85rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.info-banner {
    display: flex; align-items: flex-start; gap: 0.7rem;
    background: rgba(99,102,241,0.07); border: 1px solid rgba(99,102,241,0.18);
    border-radius: var(--radius-sm); padding: 0.75rem 1rem;
    font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5;
}
.info-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

/* ══════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.72rem 1.4rem; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; border: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white; box-shadow: 0 4px 14px rgba(99,102,241,0.32);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.45); }

.btn-secondary {
    background: rgba(255,255,255,0.07); color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.12); border-color: var(--border-strong); }

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

.btn-danger {
    background: rgba(248,113,113,0.1); color: var(--error);
    border: 1px solid rgba(248,113,113,0.25);
    font-size: 0.76rem; padding: 0.28rem 0.65rem; border-radius: 6px;
    cursor: pointer; transition: all 0.2s;
}
.btn-danger:hover { background: rgba(248,113,113,0.2); }

.btn-sm { padding: 0.42rem 0.8rem; font-size: 0.79rem; border-radius: 7px; }

.btn-clear {
    background: transparent; border: none;
    color: var(--text-muted); font-size: 0.78rem; cursor: pointer;
    padding: 0.25rem 0.5rem; border-radius: 6px; transition: all 0.2s;
}
.btn-clear:hover { color: var(--error); background: rgba(248,113,113,0.08); }

/* ══════════════════════════════════════════════════════
   MAP
══════════════════════════════════════════════════════ */
.map-container {
    height: 360px; border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem; z-index: 1; overflow: hidden;
}
.map-label-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem;
}
.badge-tip {
    display: inline-block; background: rgba(255,255,255,0.05);
    color: var(--text-muted); font-size: 0.7rem;
    padding: 0.12rem 0.45rem; border-radius: 5px;
    border: 1px solid var(--border-color); font-weight: 400;
}
.map-search-row { display: flex; gap: 0.5rem; margin-bottom: 0.45rem; }
.map-search-wrap { position: relative; flex: 1; }
.map-search-icon {
    position: absolute; left: 0.7rem; top: 50%;
    transform: translateY(-50%); color: var(--text-muted); pointer-events: none;
}
.map-search-input {
    padding-left: 2.1rem !important; border-radius: 8px !important;
    font-size: 0.84rem !important; padding-top: 0.52rem !important; padding-bottom: 0.52rem !important;
}
.map-search-results {
    background: rgba(12, 18, 35, 0.98);
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    overflow: hidden; margin-bottom: 0.4rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4); max-height: 210px; overflow-y: auto;
}
.map-result-item {
    padding: 0.6rem 0.9rem; cursor: pointer;
    font-size: 0.82rem; color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s, color 0.15s;
}
.map-result-item:last-child { border-bottom: none; }
.map-result-item:hover { background: rgba(99,102,241,0.1); color: var(--text-primary); }
.map-result-item strong { display: block; color: var(--text-primary); font-size: 0.84rem; margin-bottom: 0.12rem; }
.result-subtitle {
    display: block; font-size: 0.73rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-result-empty { padding: 0.75rem 1rem; font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ══════════════════════════════════════════════════════
   SCHEDULER TOGGLE
══════════════════════════════════════════════════════ */
.scheduler-section { border-top: 1px solid var(--border-color); margin-top: 1.5rem; padding-top: 1.25rem; }

.toggle-card {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: rgba(255,255,255,0.025); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 1rem 1.2rem; margin-bottom: 0.75rem;
    transition: border-color 0.2s; cursor: pointer;
}
.toggle-card:hover { border-color: var(--primary); }
.toggle-info { flex: 1; }
.toggle-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.toggle-desc { font-size: 0.79rem; color: var(--text-secondary); line-height: 1.4; }

.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: rgba(255,255,255,0.1);
    border-radius: 99px; transition: background 0.3s; border: 1px solid var(--border-color);
}
.toggle-slider::before {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 18px; height: 18px; background: white; border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); border-color: transparent; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

.pt-selection-box {
    background: rgba(52,211,153,0.04); border: 1px solid rgba(52,211,153,0.18);
    border-radius: var(--radius-md); padding: 1rem 1.2rem; margin-top: 0.5rem;
}
.pt-selection-header { display: flex; align-items: flex-start; gap: 0.7rem; }
.pt-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }

/* ══════════════════════════════════════════════════════
   AI PROMPT HELPER BOX
══════════════════════════════════════════════════════ */
.ai-prompt-box {
    background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(52,211,153,0.05));
    border: 1px solid rgba(99,102,241,0.22);
    border-radius: var(--radius-md); padding: 1.1rem 1.25rem;
    margin-bottom: 0;
}

.ai-prompt-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 0.75rem; margin-bottom: 0.6rem; flex-wrap: wrap;
}

.ai-prompt-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.87rem; color: var(--text-primary);
}

.ai-sparkle { font-size: 1.1rem; }

.btn-copy-prompt {
    background: rgba(99,102,241,0.15); color: var(--primary-light);
    border: 1px solid rgba(99,102,241,0.3); border-radius: 7px;
    font-size: 0.78rem; font-weight: 600; padding: 0.35rem 0.8rem;
    cursor: pointer; white-space: nowrap; transition: all 0.2s;
    font-family: var(--font-body);
}
.btn-copy-prompt:hover { background: rgba(99,102,241,0.28); border-color: rgba(99,102,241,0.5); }
.btn-copy-prompt.copied { background: rgba(52,211,153,0.15); color: var(--success); border-color: rgba(52,211,153,0.35); }

.ai-prompt-desc {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 0.75rem; line-height: 1.5;
}

.ai-prompt-content {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 0.85rem 1rem;
    font-family: monospace; font-size: 0.78rem; color: #c9d1d9;
    line-height: 1.65; white-space: pre-wrap; word-break: break-word;
    max-height: 220px; overflow-y: auto;
}

/* ══════════════════════════════════════════════════════
   SCHEDULED NOTES TABLE
══════════════════════════════════════════════════════ */
.scheduled-notes-wrapper { border-top: 1px solid var(--border-color); padding-top: 1rem; margin-top: 0.5rem; }
.scheduled-notes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.scheduled-notes-list {
    max-height: 255px; overflow-y: auto;
    border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: rgba(8,13,24,0.5);
}
.table-head-row {
    position: sticky; top: 0; background: rgba(14,20,38,0.98);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; z-index: 1;
}

/* ══════════════════════════════════════════════════════
   WORKFLOW STEPS (Manual Tab)
══════════════════════════════════════════════════════ */
.step-box {
    display: flex; gap: 1.1rem; padding: 1.1rem; border-radius: var(--radius-md);
    border: 1px solid transparent; transition: all 0.28s ease;
    opacity: 0.3; pointer-events: none; margin-bottom: 0.75rem;
}
.step-box.active { opacity: 1; pointer-events: auto; background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.05); }

.step-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.07); color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; flex-shrink: 0; transition: all 0.3s;
}
.step-box.active .step-num { background: var(--primary); color: white; box-shadow: 0 0 14px rgba(99,102,241,0.5); }

.step-content { flex-grow: 1; }
.step-content h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.step-content p { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.85rem; line-height: 1.5; }

.btn-step { padding: 0.5rem 1.2rem; font-size: 0.84rem; border-radius: 8px; }

/* ══════════════════════════════════════════════════════
   SELECTION CARDS (Programs / Attendance Options)
══════════════════════════════════════════════════════ */
.cards-list { display: grid; gap: 0.55rem; margin-top: 0.5rem; }
.item-card {
    background: rgba(8,13,30,0.55); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 0.85rem 1rem; cursor: pointer;
    transition: all 0.2s ease;
}
.item-card:hover { background: var(--bg-card-hover); border-color: var(--primary); transform: translateY(-1px); }
.item-card.selected { background: var(--primary-glow); border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }
.item-title { font-weight: 600; font-size: 0.9rem; }

.attendance-date-badge {
    display: inline-block; background: rgba(52,211,153,0.09);
    color: var(--success); border: 1px solid rgba(52,211,153,0.25);
    border-radius: 7px; padding: 0.3rem 0.7rem;
    font-size: 0.8rem; font-weight: 600; margin-bottom: 0.65rem;
}

/* ══════════════════════════════════════════════════════
   LOG CONSOLE
══════════════════════════════════════════════════════ */
.log-card { height: calc(100vh - 12rem); min-height: 480px; display: flex; flex-direction: column; }

.log-legend {
    display: flex; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 0.65rem;
    padding: 0.45rem 0.75rem;
    background: rgba(255,255,255,0.02);
    border-radius: 7px; border: 1px solid var(--border-color);
}
.legend-item { font-size: 0.73rem; font-weight: 700; }
.legend-item.success { color: var(--success); }
.legend-item.error   { color: var(--error); }
.legend-item.info    { color: #60a5fa; }
.legend-item.system  { color: var(--text-muted); }

.log-console {
    background: rgba(5, 9, 20, 0.9); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); flex-grow: 1;
    padding: 1rem 1.1rem; font-family: monospace; font-size: 0.81rem;
    line-height: 1.65; overflow-y: auto; display: flex; flex-direction: column; gap: 0.35rem;
}
.log-line { padding-left: 1.2rem; position: relative; word-break: break-word; }
.log-line::before { content: '›'; position: absolute; left: 0.2rem; color: var(--text-muted); }
.log-line.system  { color: var(--text-muted); }
.log-line.info    { color: #60a5fa; }
.log-line.success { color: var(--success); }
.log-line.warning { color: var(--warning); }
.log-line.error   { color: var(--error); }

/* ══════════════════════════════════════════════════════
   AUTH PAGE
══════════════════════════════════════════════════════ */
.auth-container {
    display: flex; justify-content: center; align-items: center;
    min-height: calc(100vh - 80px); width: 100%;
}

.auth-card {
    background: var(--bg-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: var(--radius-xl);
    padding: 2.75rem 2.5rem; width: 100%; max-width: 455px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.45); text-align: center;
}

.auth-brand { margin-bottom: 0; }
.auth-card h2 { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.auth-subtitle { font-size: 0.86rem; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.5; }

.auth-pills { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.auth-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: rgba(99,102,241,0.1); color: var(--primary-light);
    border: 1px solid rgba(99,102,241,0.25); border-radius: 99px;
    font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.75rem;
}

.auth-form-wrap { text-align: left; }
.config-form { text-align: left; }

/* ══════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(5,9,20,0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; animation: fadeIn 0.3s ease-out;
}
.modal-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); padding: 2.5rem; width: 90%; max-width: 400px;
    box-shadow: 0 24px 56px rgba(0,0,0,0.55); text-align: center;
    animation: scaleUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-icon { font-size: 2.75rem; margin-bottom: 1rem; animation: bounce 1s infinite alternate; }
.modal-card h2 { font-family: var(--font-heading); font-size: 1.55rem; color: #fff; margin-bottom: 0.65rem; }
.modal-card p { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.55; }

/* ══════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════ */
@keyframes fadeIn  { from { opacity: 0; }           to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bounce  { from { transform: translateY(0); } to { transform: translateY(-6px); } }

/* ══════════════════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
