@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

/* ============================================================
   Deep Black × Blue — minimal dark UI
   ============================================================ */

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

:root {
    /* ── Black layers ── */
    --bg:             #000000;
    --surface:        #0e0e0e;
    --surface-raised: #161616;
    --surface-hover:  #1c1c1c;

    /* ── Borders ── */
    --border:         #222222;
    --border-subtle:  #181818;
    --border-focus:   #3b82f6;

    /* ── Text ── */
    --text-strong:    #ffffff;
    --text-base:      #a0a0a0;
    --text-muted:     #555555;
    --text-disabled:  #333333;

    /* ── Blue accent ── */
    --blue:           #3b82f6;
    --blue-hover:     #2563eb;
    --blue-dim:       rgba(59,130,246,0.1);
    --blue-ring:      rgba(59,130,246,0.2);
    --blue-light:     #60a5fa;

    /* ── Semantic ── */
    --success:  #22c55e;
    --danger:   #ef4444;
    --warning:  #f59e0b;
    --info:     #60a5fa;

    /* ── Radius / Shadow ── */
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.8);
}

/* ============================================================  BASE  ============================================================ */

html { font-size: 16px; }

body {
    font-family: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text-base);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================  LOGIN  ============================================================ */

#login-overlay {
    position: fixed; inset: 0;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 48px 40px;
    width: 100%; max-width: 400px;
    box-shadow: var(--shadow);
    text-align: center;
}

.login-icon { font-size: 2rem; margin-bottom: 16px; }

.login-title {
    font-size: 1rem; font-weight: 700;
    color: var(--text-strong); margin-bottom: 8px; line-height: 1.5;
}

.login-subtitle { font-size: 0.825rem; color: var(--text-muted); margin-bottom: 28px; }

.login-form { display: flex; gap: 8px; margin-bottom: 10px; }

.login-input {
    flex: 1; padding: 10px 12px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-strong); font-family: inherit; font-size: 0.875rem;
    color-scheme: dark;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }

.login-btn { padding: 10px 20px; white-space: nowrap; }

.login-error { font-size: 0.8rem; color: var(--danger); margin-top: 8px; }

/* ============================================================  CONTAINER  ============================================================ */

.container {
    max-width: 1280px; margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ============================================================  HEADER  ============================================================ */

.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 24px 32px;
    text-align: center;
}

.header-emoji { font-size: 1.6rem; margin-bottom: 6px; }

.header h1 {
    font-size: 1.3rem; font-weight: 700;
    color: var(--text-strong); letter-spacing: -0.02em; margin-bottom: 4px;
}

.header h2 { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; letter-spacing: 0.06em; }

/* ============================================================  NAVBAR  ============================================================ */

.navbar {
    display: flex;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 8px;
}

.nav-item {
    flex: 1; padding: 12px 16px;
    background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-muted); font-family: inherit; font-size: 0.825rem; font-weight: 600;
    cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s;
    letter-spacing: 0.02em;
}
.nav-item:hover { color: var(--text-base); background: rgba(255,255,255,0.03); }
.nav-item.active { color: var(--blue-light); border-bottom-color: var(--blue); }

/* ============================================================  MAIN CONTENT  ============================================================ */

.main-content { padding: 28px 32px; }

/* ============================================================  SECTION TITLE  ============================================================ */

.section-title {
    font-size: 1.05rem; font-weight: 700;
    color: var(--text-strong);
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px; margin-bottom: 22px;
}

/* ============================================================  BUTTONS  ============================================================ */

.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border: none; border-radius: var(--r-md);
    font-family: inherit; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }

.btn-primary {
    background: var(--blue); color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: var(--blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.4);
}

.btn-blue {
    background: transparent;
    color: var(--blue-light);
    border: 1px solid var(--border);
}
.btn-blue:hover:not(:disabled) {
    background: var(--blue-dim);
    border-color: var(--blue);
    transform: translateY(-1px);
}

.btn-large { width: 100%; justify-content: center; padding: 11px 18px; }
.btn-icon { font-size: 14px; }

/* ============================================================  REPORT — DATE SECTION  ============================================================ */

.date-group {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px; margin-bottom: 26px;
}

.date-inputs { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.date-input-group { display: flex; flex-direction: column; gap: 6px; }

.date-input-group label {
    font-size: 0.75rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
}

.date-input-group input[type="date"],
.date-input {
    padding: 9px 11px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-strong); font-family: inherit; font-size: 0.85rem;
    color-scheme: dark; transition: border-color 0.15s, box-shadow 0.15s;
}
.date-input-group input[type="date"]:focus,
.date-input:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring);
}

/* ============================================================  STATUS / LOADING  ============================================================ */

.status-section { padding: 56px 32px; text-align: center; }

.status-icon {
    width: 32px; height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-card h3 { font-size: 1rem; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; }
.status-card p  { font-size: 0.825rem; color: var(--text-muted); margin-bottom: 20px; }

.progress-bar {
    width: 100%; max-width: 240px; height: 3px;
    background: var(--border); border-radius: 2px; overflow: hidden; margin: 0 auto;
}
.progress-fill {
    height: 100%; background: var(--blue);
    animation: progress 1.6s ease-in-out infinite;
}
@keyframes progress { 0% { width: 0%; } 60% { width: 80%; } 100% { width: 100%; } }

/* ============================================================  PREVIEW / REPORT  ============================================================ */

.preview-section { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.brand-section-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px; margin-bottom: 20px;
}

.brand-title {
    font-size: 1rem; font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em;
    margin-top: 20px; margin-bottom: 10px;
}
.brand-section-card > .card-title:first-of-type { margin-top: 0; }

/* ============================================================  TABLES  ============================================================ */

.table-wrapper {
    overflow-x: auto; border-radius: var(--r-md);
    border: 1px solid var(--border); margin-bottom: 16px;
    background: var(--surface);
}

.data-table { width: 100%; border-collapse: collapse; font-size: 0.785rem; font-family: inherit; }

.data-table th {
    background: var(--surface-raised);
    color: var(--text-muted);
    padding: 9px 12px; text-align: left;
    font-weight: 600; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.07em;
    position: sticky; top: 0; z-index: 10;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top; font-size: 0.785rem;
    color: var(--text-base);
}

.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: var(--surface-raised); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
.data-table tbody tr:nth-child(even):hover { background: var(--surface-raised); }

/* ============================================================  NORMALIZATION  ============================================================ */

#normalization-message {
    background: rgba(96,165,250,0.08);
    border: 1px solid rgba(96,165,250,0.2);
    color: var(--blue-light);
    border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 22px;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 500;
}
#normalization-message p { margin: 0; }

/* ============================================================  RULE TABLE FIXED  ============================================================ */

#genesis-rule-table, #kia-rule-table, #hyundai-rule-table { table-layout: fixed; width: 100%; }
#genesis-rule-table td, #genesis-rule-table th,
#kia-rule-table td, #kia-rule-table th,
#hyundai-rule-table td, #hyundai-rule-table th { white-space: normal; overflow-wrap: break-word; vertical-align: top; }
#kia-rule-table th:nth-child(4), #kia-rule-table td:nth-child(4),
#hyundai-rule-table th:nth-child(4), #hyundai-rule-table td:nth-child(4),
#genesis-rule-table th:nth-child(4), #genesis-rule-table td:nth-child(4) { word-break: break-all; }

#genesis-rule-table th:nth-child(1), #kia-rule-table th:nth-child(1), #hyundai-rule-table th:nth-child(1) { width:5%; }
#genesis-rule-table th:nth-child(2), #kia-rule-table th:nth-child(2), #hyundai-rule-table th:nth-child(2) { width:12%; }
#genesis-rule-table th:nth-child(3), #kia-rule-table th:nth-child(3), #hyundai-rule-table th:nth-child(3) { width:8%; }
#genesis-rule-table th:nth-child(4), #kia-rule-table th:nth-child(4), #hyundai-rule-table th:nth-child(4) { width:35%; }
#genesis-rule-table th:nth-child(5), #kia-rule-table th:nth-child(5), #hyundai-rule-table th:nth-child(5) { width:25%; }
#genesis-rule-table th:nth-child(6), #kia-rule-table th:nth-child(6), #hyundai-rule-table th:nth-child(6) { width:15%; }

/* ============================================================  FOOTER  ============================================================ */

.footer-text {
    text-align: center; color: var(--text-disabled); font-size: 0.72rem;
    padding: 18px 0; border-top: 1px solid var(--border-subtle);
    margin-top: 28px; letter-spacing: 0.04em;
}

/* ============================================================  MAIN VIEW  ============================================================ */

.main-hero {
    text-align: center; padding: 36px 20px 28px;
    border-bottom: 1px solid var(--border); margin-bottom: 26px;
}

.main-hero-icon { font-size: 2rem; margin-bottom: 12px; }

.main-hero h2 {
    font-size: 1.25rem; font-weight: 700;
    color: var(--text-strong); margin-bottom: 8px; letter-spacing: -0.02em;
}

.main-hero p { color: var(--text-muted); font-size: 0.85rem; max-width: 440px; margin: 0 auto; line-height: 1.7; }

.main-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 26px; }

.main-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px; display: flex; flex-direction: column; gap: 9px;
    transition: border-color 0.15s;
}
.main-card:hover { border-color: var(--blue); }

.main-card-icon { font-size: 1.6rem; }

.main-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--text-strong); }
.main-card p  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.65; flex: 1; }

.brand-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.badge {
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.68rem; font-weight: 600;
    padding: 2px 8px; border-radius: 99px;
    border: 1px solid var(--border); letter-spacing: 0.04em;
}

/* ============================================================  SCRIPT VIEW  ============================================================ */

.script-selector-group { margin-bottom: 20px; }
.script-main-select { margin-top: 7px; width: 280px; max-width: 100%; }

.script-panel {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px; margin-bottom: 20px;
    animation: fadeIn 0.2s ease;
}

.script-panel-header {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 20px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.script-panel-icon { font-size: 1.6rem; flex-shrink: 0; }
.script-panel-title { font-size: 0.95rem; font-weight: 700; color: var(--text-strong); margin-bottom: 4px; }
.script-panel-desc  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.65; }

/* ============================================================  FORM ELEMENTS  ============================================================ */

.script-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 0.75rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center; gap: 7px;
}

.form-hint {
    font-size: 0.7rem; font-weight: 400;
    color: var(--text-disabled); text-transform: none; letter-spacing: 0;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; }

.form-select, .form-input {
    padding: 8px 11px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-strong); font-family: inherit; font-size: 0.85rem;
    color-scheme: dark; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-select { cursor: pointer; }
.form-select:focus, .form-input:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring);
}

.form-textarea {
    padding: 8px 11px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-strong);
    font-family: 'SFMono-Regular', 'Consolas', monospace; font-size: 0.8rem;
    color-scheme: dark; resize: vertical; line-height: 1.6;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }

.form-actions { display: flex; gap: 8px; padding-top: 2px; }

/* ============================================================  ZONE BUTTONS  ============================================================ */

.zone-selector { display: flex; gap: 6px; }

.zone-btn {
    padding: 7px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: inherit; font-size: 0.78rem; font-weight: 700;
    color: var(--text-muted); cursor: pointer; transition: all 0.15s;
    letter-spacing: 0.04em;
}
.zone-btn:hover  { border-color: var(--blue); color: var(--blue-light); background: var(--blue-dim); }
.zone-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ============================================================  PATH LIST  ============================================================ */

.va-paths-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 7px; }
.va-path-row   { display: flex; gap: 7px; align-items: center; }
.va-path-row .form-input { flex: 1; }

.va-path-remove-btn {
    flex-shrink: 0; width: 30px; height: 30px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-sm); color: var(--text-muted); font-size: 0.72rem;
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.va-path-remove-btn:hover:not(:disabled) { background: rgba(239,68,68,0.1); border-color: var(--danger); color: var(--danger); }
.va-path-remove-btn:disabled { opacity: 0.2; cursor: default; }

.btn-add-path {
    background: none; border: 1px dashed var(--border);
    border-radius: var(--r-sm); padding: 6px 14px;
    font-family: inherit; font-size: 0.8rem; font-weight: 600;
    color: var(--blue); cursor: pointer; transition: all 0.15s; width: 100%;
}
.btn-add-path:hover { background: var(--blue-dim); border-color: var(--blue); border-style: solid; }

/* ============================================================  RESULTS BAR  ============================================================ */

.pa-results-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; flex-wrap: wrap; gap: 10px;
}
.pa-results-info { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* ============================================================  PA SUMMARY / DETAIL  ============================================================ */

.pa-summary-section { margin-bottom: 16px; }

.pa-summary-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 12px 16px;
}

.pa-summary-title {
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 10px;
}

.pa-summary-table { font-size: 0.78rem; }

.pa-summary-table td code {
    font-size: 0.72rem;
    background: var(--blue-dim);
    padding: 1px 6px; border-radius: 3px;
    color: var(--blue-light); font-family: monospace;
}

.pa-detail-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; flex-wrap: wrap; gap: 10px;
}
.pa-detail-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ============================================================  UV SUMMARY  ============================================================ */

.uv-summary-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 14px;
}
.uv-stat-row { display: flex; gap: 12px; flex-wrap: wrap; }

.uv-stat-item {
    display: flex; flex-direction: column; gap: 4px;
    flex: 1; min-width: 140px; padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-md);
}

.uv-stat-label {
    font-size: 0.68rem; color: var(--text-muted); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center; gap: 5px;
}

.uv-stat-badge {
    font-size: 0.62rem; padding: 1px 5px; border-radius: 99px;
    background: var(--blue-dim); color: var(--blue-light);
    font-weight: 700; text-transform: none; letter-spacing: 0;
}
.uv-badge-gray { background: rgba(85,85,85,0.2); color: var(--text-muted); }

.uv-stat-value {
    font-size: 1.5rem; font-weight: 700;
    color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}

.uv-stat-highlight { color: var(--blue-light); }
.uv-stat-diff { color: var(--text-muted); font-size: 1.2rem; }

/* ============================================================  RULE COLLECTION  ============================================================ */

.rc-zone-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rc-zone-row .form-input { flex: 1; min-width: 260px; }

.rc-table { table-layout: fixed; width: 100%; }
.rc-col-order   { width: 4%;  text-align: center; }
.rc-col-desc    { width: 14%; }
.rc-col-expr    { width: 28%; }
.rc-col-action  { width: 10%; }
.rc-col-details { width: 28%; }
.rc-col-enabled { width: 6%;  text-align: center; }
.rc-col-id      { width: 10%; }

.rc-expr-cell, .rc-details-cell {
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    font-size: 0.72rem; word-break: break-all; white-space: pre-wrap;
    line-height: 1.5; vertical-align: top; color: var(--text-muted);
}
.rc-table td { vertical-align: top; }

.rc-id-cell { font-family: monospace; font-size: 0.68rem; color: var(--text-disabled); }

.rc-action-badge {
    display: inline-block;
    background: rgba(96,165,250,0.1); color: var(--blue-light);
    border: 1px solid rgba(96,165,250,0.2);
    border-radius: var(--r-sm); padding: 2px 7px;
    font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}

.rc-enabled  { color: var(--success); font-weight: 700; }
.rc-disabled { color: var(--danger);  font-weight: 700; }

/* ============================================================  AUDIT LOG  ============================================================ */

.al-filter-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 14px 16px;
    display: flex; flex-direction: column; gap: 12px;
}

.al-filter-title {
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center; gap: 8px;
}

.al-live-filter { flex: 1; max-width: 360px; }
.al-search-input { width: 100%; }

.al-table { table-layout: fixed; width: 100%; }
.al-col-time    { width: 13%; }
.al-col-email   { width: 15%; }
.al-col-ip      { width: 9%;  }
.al-col-desc    { width: 19%; }
.al-col-type    { width: 8%;  }
.al-col-result  { width: 6%;  text-align: center; }
.al-col-product { width: 8%;  }
.al-col-resname { width: 13%; }
.al-col-zone    { width: 9%;  }

.al-time-cell { font-size: 0.72rem; font-family: 'SFMono-Regular', monospace; color: var(--text-muted); white-space: nowrap; }
.al-mono      { font-family: 'SFMono-Regular', monospace; font-size: 0.72rem; color: var(--text-muted); }

.al-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 99px;
    font-size: 0.7rem; font-weight: 700; white-space: nowrap;
}
.al-badge-success { background: rgba(34,197,94,0.1);  color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.al-badge-fail    { background: rgba(239,68,68,0.1);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }
.al-badge-unknown { background: var(--surface-raised); color: var(--text-disabled); border: 1px solid var(--border); }

.al-type-badge {
    display: inline-block; padding: 2px 7px;
    border-radius: var(--r-sm); font-size: 0.7rem; font-weight: 700;
    background: var(--surface-raised); color: var(--text-muted);
    border: 1px solid var(--border); text-transform: capitalize;
}
.al-type-create, .al-type-add    { background: rgba(34,197,94,0.1);   color: var(--success); border-color: rgba(34,197,94,0.2); }
.al-type-delete, .al-type-remove { background: rgba(239,68,68,0.1);   color: var(--danger);  border-color: rgba(239,68,68,0.2); }
.al-type-edit                    { background: rgba(245,158,11,0.1);  color: var(--warning); border-color: rgba(245,158,11,0.2); }
.al-type-login, .al-type-logout  { background: rgba(96,165,250,0.1);  color: var(--info);    border-color: rgba(96,165,250,0.2); }
.al-type-disable                 { background: rgba(239,68,68,0.08); color: #fb923c;         border-color: rgba(239,68,68,0.15); }
.al-type-enable                  { background: rgba(34,197,94,0.08);  color: #4ade80;        border-color: rgba(34,197,94,0.15); }
.al-type-rotate, .al-type-reset  { background: rgba(167,139,250,0.1); color: #a78bfa;        border-color: rgba(167,139,250,0.2); }

.al-res-name {
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    font-size: 0.72rem; color: var(--blue-light); word-break: break-all;
}

/* ============================================================  RESPONSIVE  ============================================================ */

@media (max-width: 768px) {
    body { padding: 0; }
    .container { border-radius: 0; border-left: none; border-right: none; }
    .main-content { padding: 16px; }
    .header { padding: 18px 16px; }
    .header h1 { font-size: 1.05rem; }
    .date-inputs { flex-direction: column; }
    .date-input-group { width: 100%; }
    .main-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .nav-item { font-size: 0.75rem; padding: 10px 6px; }
    .script-main-select { width: 100%; }
    .zone-selector { flex-wrap: wrap; }
    .uv-stat-row { flex-direction: column; }
    .data-table th, .data-table td { padding: 7px 8px; font-size: 0.72rem; }
    #normalization-message { white-space: normal; }
}

/* ============================================================  SCROLLBAR  ============================================================ */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface-raised); }
