/* TaxComm Admin — Dark Theme */

html, body { height: 100%; margin: 0; background: #0d1117; color: #e6edf3; }

/* ── Layout ─────────────────────────────────────────────── */
.admin-wrapper { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ─────────────────────────────────────────────── */
.admin-sidebar {
    width: 240px; min-width: 240px;
    background: #1a1f2e; color: #c9d1d9;
    display: flex; flex-direction: column; overflow-y: auto;
}
.admin-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem; background: #0d1117;
    border-bottom: 1px solid #30363d; text-decoration: none; display: block;
}
.admin-sidebar .sidebar-brand h5    { color: #58a6ff; margin: 0; font-weight: 700; font-size: 1rem; }
.admin-sidebar .sidebar-brand small { color: #6e7681; font-size: 0.7rem; }
.admin-sidebar nav { padding: 0.75rem 0; flex: 1; }
.admin-sidebar .nav-section {
    padding: 0.5rem 1rem 0.25rem; font-size: 0.65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em; color: #6e7681;
}
.admin-sidebar .nav-link {
    color: #8b949e; padding: 0.55rem 1.5rem;
    display: flex; align-items: center; gap: 0.65rem;
    font-size: 0.875rem; border-left: 3px solid transparent;
    transition: all 0.15s; text-decoration: none;
}
.admin-sidebar .nav-link:hover  { color: #e6edf3; background: rgba(88,166,255,.08); border-left-color: #58a6ff; }
.admin-sidebar .nav-link.active { color: #58a6ff; background: rgba(88,166,255,.1);  border-left-color: #58a6ff; }
.admin-sidebar .nav-link i { width: 1rem; text-align: center; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid #30363d; font-size: 0.8rem; color: #6e7681; }

/* ── Main content ─────────────────────────────────────────── */
.admin-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #0d1117; }
.admin-main    { flex: 1; overflow-y: auto; padding: 1.5rem; background: #0d1117; }

/* ── Stat cards ───────────────────────────────────────────── */
.stat-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 1.25rem; transition: box-shadow .2s; }
.stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.5); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; color: #e6edf3; line-height: 1; }
.stat-card .stat-label { font-size: 0.8rem; color: #8b949e; margin-top: .25rem; }

/* ── Admin card ───────────────────────────────────────────── */
.admin-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; overflow: hidden; }
.admin-card .card-header { background: #0d1117; border-bottom: 1px solid #30363d; padding: 1rem 1.25rem; font-weight: 600; font-size: .9rem; color: #c9d1d9; }
.admin-card .card-body   { background: #161b22; padding: 1.25rem; color: #e6edf3; }

/* ── Tables ───────────────────────────────────────────────── */
.admin-table { width: 100%; font-size: .875rem; border-collapse: collapse; }
.admin-table th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #8b949e; border-bottom: 2px solid #30363d; padding: .6rem .75rem; white-space: nowrap; background: #161b22; }
.admin-table td { padding: .65rem .75rem; border-bottom: 1px solid #21262d; vertical-align: middle; color: #e6edf3; background: #161b22; }
.admin-table tbody tr:hover td { background: #1c2128; }

/* ── Forms ────────────────────────────────────────────────── */
.form-control, .form-select {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
}
.form-control:focus, .form-select:focus {
    background-color: #0d1117 !important;
    border-color: #58a6ff !important;
    color: #e6edf3 !important;
    box-shadow: 0 0 0 .2rem rgba(88,166,255,.2) !important;
}
.form-control::placeholder    { color: #6e7681 !important; }
.form-control:disabled, .form-select:disabled { background-color: #1c2128 !important; color: #8b949e !important; }
.form-label                   { color: #c9d1d9; }
.form-text                    { color: #8b949e; }
.form-control-plaintext       { color: #e6edf3; padding: .375rem 0; }
.input-group-text             { background-color: #1c2128 !important; border-color: #30363d !important; color: #c9d1d9 !important; }

/* ── Headings & misc ──────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { color: #e6edf3; }
.text-muted        { color: #8b949e !important; }
hr                 { border-color: #30363d; opacity: 1; }
code               { background: #1c2128; color: #79c0ff; padding: .1em .35em; border-radius: 4px; font-size: .875em; }

/* ── List group ───────────────────────────────────────────── */
.list-group-item { background-color: #161b22 !important; border-color: #30363d !important; color: #e6edf3 !important; }
.list-group-item-action:hover:not(.active) { background-color: #1c2128 !important; color: #e6edf3 !important; }
.list-group-item.active { background-color: #1f6feb !important; border-color: #1f6feb !important; color: #fff !important; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert-success { background: #1a4731 !important; border-color: #2ea043 !important; color: #3fb950 !important; }
.alert-danger  { background: #3d1515 !important; border-color: #f85149 !important; color: #f85149 !important; }
.alert-warning { background: #3d2f00 !important; border-color: #e3b341 !important; color: #e3b341 !important; }
.alert-info    { background: #0c2d6b !important; border-color: #388bfd !important; color: #79c0ff !important; }

/* ── Status badges ────────────────────────────────────────── */
.badge-active   { background: #1a4731; color: #3fb950; }
.badge-inactive { background: #3d1515; color: #f85149; }
.badge-test     { background: #3d2f00; color: #e3b341; }
.badge-prod     { background: #0c2d6b; color: #58a6ff; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-outline-secondary { color: #8b949e !important; border-color: #30363d !important; }
.btn-outline-secondary:hover { background: #1c2128 !important; color: #e6edf3 !important; border-color: #8b949e !important; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop-custom {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center; z-index: 9000;
}
.modal-box {
    background: #161b22; border: 1px solid #30363d; color: #e6edf3;
    border-radius: 10px; padding: 1.5rem;
    width: 100%; max-width: 480px; box-shadow: 0 8px 40px rgba(0,0,0,.7);
}

/* ── Login page ───────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1f2e 0%, #0d1117 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-box {
    background: #161b22; border: 1px solid #30363d; border-radius: 12px;
    padding: 2.5rem; width: 100%; max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.6); color: #e6edf3;
}
.login-box .login-logo        { text-align: center; margin-bottom: 1.75rem; }
.login-box .login-logo h4     { color: #e6edf3; font-weight: 700; margin: 0; }
.login-box .login-logo small  { color: #8b949e; font-size: .8rem; }

/* ── Blazor error ─────────────────────────────────────────── */
#blazor-error-ui {
    background: #3d2f00; border: 1px solid #e3b341; color: #e3b341;
    border-radius: 6px; bottom: 1rem; right: 1rem; padding: .75rem 1rem;
    position: fixed; z-index: 9999; display: none; font-size: .875rem;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; margin-left: 1rem; font-weight: bold; }

/* ── Ticket internal notes ───────────────────────────────── */
.internal-note { background: rgba(210, 153, 34, 0.08); border-left: 3px solid #e3b341 !important; }

/* ── Ticket stat filter cards ─────────────────────────────── */
.stat-filter-card { transition: border-color .15s, transform .1s; }
.stat-filter-card:hover { border-color: #58a6ff !important; transform: translateY(-1px); }
.stat-active { border-color: #8b949e !important; background: #1c2128 !important; }
.stat-active-primary { border-color: #58a6ff !important; }
.stat-active-info    { border-color: #39d353 !important; }
.stat-active-warning { border-color: #e3b341 !important; }
.stat-active-success { border-color: #3fb950 !important; }
.stat-active-danger  { border-color: #f85149 !important; }

/* ── Dashboard ───────────────────────────────────────────────── */
.dash-ticket-stat {
    display: flex; flex-direction: column; padding: .5rem .75rem;
    border-left: 3px solid #30363d; text-decoration: none;
    transition: background .15s;
}
.dash-ticket-stat:hover { background: rgba(88,166,255,.06); }
.dash-ticket-num { font-size: 1.35rem; font-weight: 700; color: #e6edf3; line-height: 1.1; }
.dash-ticket-lbl { font-size: .7rem; color: #8b949e; white-space: nowrap; }

.dash-ticket-row {
    padding: .65rem 1rem; border-bottom: 1px solid #21262d;
    transition: background .12s;
}
.dash-ticket-row:last-child { border-bottom: none; }
.dash-ticket-row:hover { background: #1c2128; }
.dash-ticket-urgent { border-left: 3px solid #e3b341; background: rgba(227,179,65,.04); }

.dash-dev-row {
    padding: .5rem .75rem; border-bottom: 1px solid #21262d;
    transition: background .12s;
}
.dash-dev-row:last-child { border-bottom: none; }
.dash-dev-row:hover { background: #1c2128; }

.stat-card-alert { border-color: #f85149 !important; }
.stat-card-warn  { border-color: #e3b341 !important; }

.cursor-pointer { cursor: pointer; }

/* ── FAQ Manager: PDF drop zone ─────────────────────────────── */
.pdf-drop-zone {
    position: relative;
    border: 2px dashed #374151;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: #161b22;
}
.pdf-drop-zone:hover, .pdf-drop-zone.uploading {
    border-color: #58a6ff;
    background: #1c2333;
}
.pdf-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
