/* ==========================================================
   Notification Manager — Professional Theme
   Palette: Deep navy base, cyan accent, slate cards
   ========================================================== */

:root {
    --bg-body:      #0B1220;
    --bg-sidebar:   #0E1626;
    --bg-card:      #121C30;
    --bg-card-alt:  #16223A;
    --border-col:   #223151;
    --text-main:    #E8EEF5;
    --text-muted:   #8B9BB4;
    --accent:       #22D3EE;
    --accent-dark:  #0EA5C4;
    --success:      #34D399;
    --danger:       #F87171;
    --warning:      #FBBF24;
    --radius:       10px;
    --shadow:       0 4px 14px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    margin: 0;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

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

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-col);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border-col);
    margin-bottom: 20px;
}

.sidebar-brand i { font-size: 22px; color: var(--accent); }
.sidebar-brand span { font-weight: 700; font-size: 17px; letter-spacing: 0.2px; }

.sidebar-nav { flex: 1; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14.5px;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a i { font-size: 17px; width: 20px; text-align: center; }

.sidebar-nav a:hover {
    background: var(--bg-card);
    color: var(--text-main);
}

.sidebar-nav a.active {
    background: var(--bg-card);
    color: var(--accent);
    border-left-color: var(--accent);
}

.sidebar-footer {
    padding: 16px 24px 0;
    border-top: 1px solid var(--border-col);
    margin-top: 16px;
}

.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.sidebar-user .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent); color: #06202B;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}

.sidebar-user .name { font-size: 13.5px; font-weight: 600; }
.sidebar-user .role { font-size: 12px; color: var(--text-muted); }

.logout-link {
    display: flex; align-items: center; gap: 8px;
    color: var(--danger); font-size: 14px; font-weight: 500;
    padding: 8px 0;
}

/* ---------- Main content ---------- */
.main-content { flex: 1; min-width: 0; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    border-bottom: 1px solid var(--border-col);
    background: var(--bg-sidebar);
}

.topbar h1 { font-size: 19px; font-weight: 700; margin: 0; }
.topbar .subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.page-body { padding: 28px 32px 48px; max-width: 1100px; }

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-col);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-title i { color: var(--accent); font-size: 17px; }
.card-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Stat cards ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-col);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 46px; height: 46px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}

.stat-icon.cyan   { background: rgba(34,211,238,0.14); color: var(--accent); }
.stat-icon.green  { background: rgba(52,211,153,0.14); color: var(--success); }
.stat-icon.amber  { background: rgba(251,191,36,0.14); color: var(--warning); }
.stat-icon.red    { background: rgba(248,113,113,0.14); color: var(--danger); }

.stat-value { font-size: 22px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Forms ---------- */
label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text-main);
}

.form-group { margin-bottom: 18px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.form-control {
    width: 100%;
    background: var(--bg-card-alt);
    border: 1px solid var(--border-col);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control { resize: vertical; min-height: 100px; }

.input-with-icon { position: relative; }
.input-with-icon .form-control { padding-right: 42px; }
.input-with-icon .toggle-icon {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); cursor: pointer; font-size: 16px;
}

.file-drop {
    border: 1.5px dashed var(--border-col);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: var(--bg-card-alt);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.file-drop:hover { border-color: var(--accent); }
.file-drop i { font-size: 26px; color: var(--accent); margin-bottom: 8px; display: block; }
.file-drop .fd-text { font-size: 13.5px; color: var(--text-muted); }
.file-drop input[type="file"] { display: none; }

#image-preview {
    margin-top: 14px;
    max-width: 220px;
    border-radius: 8px;
    border: 1px solid var(--border-col);
    display: none;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
    font-family: inherit;
}

.btn i { font-size: 15px; }
.btn-primary { background: var(--accent); color: #06202B; }
.btn-primary:hover { background: var(--accent-dark); color: #06202B; }
.btn-outline { background: transparent; border-color: var(--border-col); color: var(--text-main); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(248,113,113,0.12); color: var(--danger); border-color: rgba(248,113,113,0.3); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.data-table th {
    text-align: left;
    padding: 12px 14px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12.5px;
    border-bottom: 1px solid var(--border-col);
    white-space: nowrap;
}

.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-col);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-card-alt); }

.thumb {
    width: 42px; height: 42px; border-radius: 6px; object-fit: cover;
    border: 1px solid var(--border-col);
}

.thumb-placeholder {
    width: 42px; height: 42px; border-radius: 6px;
    background: var(--bg-card-alt); border: 1px solid var(--border-col);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 16px;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}

.badge-success { background: rgba(52,211,153,0.14); color: var(--success); }
.badge-danger  { background: rgba(248,113,113,0.14); color: var(--danger); }
.badge-warning { background: rgba(251,191,36,0.14); color: var(--warning); }
.badge-muted   { background: var(--bg-card-alt); color: var(--text-muted); }

/* ---------- Alerts ---------- */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: 8px; margin-bottom: 20px;
    font-size: 13.5px;
}

.alert i { font-size: 17px; margin-top: 1px; }
.alert-success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); color: var(--success); }
.alert-danger  { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: var(--danger); }
.alert-info    { background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.3); color: var(--accent); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 40px; display: block; margin-bottom: 14px; color: var(--border-col); }

/* ---------- Login page ---------- */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at top, #101B30 0%, #070C16 100%);
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-col);
    border-radius: 14px;
    padding: 38px 34px;
    width: 100%; max-width: 380px;
    box-shadow: var(--shadow);
}

.auth-logo {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-bottom: 6px;
}

.auth-logo i { font-size: 26px; color: var(--accent); }
.auth-logo span { font-size: 19px; font-weight: 700; }

.auth-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 26px; }

.badge-role {
    display: inline-flex; padding: 3px 10px; border-radius: 20px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.3px;
}
.badge-role.admin { background: rgba(251,191,36,0.14); color: var(--warning); }
.badge-role.user  { background: rgba(34,211,238,0.14); color: var(--accent); }

/* ---------- Modal ---------- */
.modal-backdrop-custom {
    position: fixed; inset: 0; background: rgba(3, 6, 14, 0.7);
    display: none; align-items: center; justify-content: center; z-index: 1000;
    padding: 20px;
}
.modal-backdrop-custom.show { display: flex; }

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-col);
    border-radius: 12px;
    width: 100%; max-width: 440px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.modal-box-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}

.modal-box-header h3 { font-size: 16px; margin: 0; }
.modal-close { cursor: pointer; color: var(--text-muted); font-size: 20px; background: none; border: none; }
.modal-close:hover { color: var(--text-main); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .app-shell { flex-direction: column; }
    .sidebar {
        width: 100%; flex-direction: row; align-items: center;
        padding: 14px 16px; overflow-x: auto;
    }
    .sidebar-brand { border-bottom: none; padding: 0 16px 0 0; margin-bottom: 0; }
    .sidebar-nav { display: flex; flex: none; }
    .sidebar-nav a { padding: 8px 14px; white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
    .sidebar-nav a.active { border-left: none; border-bottom-color: var(--accent); }
    .sidebar-footer { display: none; }
    .page-body { padding: 20px 16px 40px; }
    .topbar { padding: 16px; }
}
