/* CyberAce IMS — APT Red/Black Neon Theme v2.0 */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@400;600;700&display=swap');

:root {
    --bg-primary:    #060608;
    --bg-secondary:  #0e0e12;
    --bg-card:       #12121a;
    --bg-card-hover: #18181f;
    --bg-input:      #0a0a0f;
    --red-primary:   #e6001a;
    --red-bright:    #ff1a30;
    --red-glow:      rgba(230, 0, 26, 0.35);
    --red-dim:       rgba(230, 0, 26, 0.12);
    --red-border:    rgba(230, 0, 26, 0.45);
    --text-primary:  #eaeaea;
    --text-secondary:#a0a0b0;
    --text-dim:      #ffab00;
    --success:       #00e676;
    --warning:       #ffab00;
    --danger:        #ff3d3d;
    --info:          #00b0ff;
    --border-color:  rgba(230, 0, 26, 0.18);
    --border-subtle: rgba(255,255,255,0.06);
    --sidebar-w:     255px;
    --topbar-h:      58px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle scanline */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 3px,
        rgba(0,0,0,0.025) 3px,
        rgba(0,0,0,0.025) 4px
    );
    pointer-events: none;
    z-index: 9998;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(230,0,26,0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-primary); }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
}

.sidebar-brand {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon {
    width: 38px; height: 38px;
    background: var(--red-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    box-shadow: 0 0 16px var(--red-glow);
    flex-shrink: 0;
    transition: box-shadow 0.3s;
}

.sidebar-brand:hover .brand-icon {
    box-shadow: 0 0 28px var(--red-glow);
}

.sidebar-brand .brand-text {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1.5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand .brand-text span {
    display: block;
    font-size: 8px;
    color: var(--red-primary);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 2px;
    font-weight: 600;
    opacity: 0.9;
}

.sidebar-user {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    background: rgba(230,0,26,0.03);
}

.sidebar-user .user-avatar,
.sidebar-user .user-avatar-placeholder {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--red-primary);
    box-shadow: 0 0 10px var(--red-glow);
    flex-shrink: 0;
    object-fit: cover;
}

.sidebar-user .user-avatar-placeholder {
    background: var(--red-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--red-primary);
}

.sidebar-user .user-info { overflow: hidden; }

.sidebar-user .user-info .user-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-info .user-role {
    font-size: 10px;
    color: var(--red-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Share Tech Mono', monospace;
    margin-top: 1px;
}

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

.nav-section {
    padding: 14px 18px 5px;
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-family: 'Share Tech Mono', monospace;
    user-select: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.18s ease;
    border-left: 3px solid transparent;
    position: relative;
    user-select: none;
}

.nav-item:hover {
    background: rgba(230,0,26,0.08);
    color: var(--text-primary);
    border-left-color: rgba(230,0,26,0.6);
}

.nav-item.active {
    background: rgba(230,0,26,0.12);
    color: var(--red-bright);
    border-left-color: var(--red-primary);
}

.nav-item .nav-icon {
    width: 18px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-badge {
    margin-left: auto;
    background: var(--red-primary);
    color: #fff;
    font-size: 10px;
    font-family: 'Share Tech Mono', monospace;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 0 8px var(--red-glow);
}

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

.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 22px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}

.topbar-title {
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.topbar-title .page-icon { color: var(--red-primary); font-size: 14px; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 34px; height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.18s;
    position: relative;
    text-decoration: none;
}

.topbar-btn:hover {
    background: var(--red-dim);
    border-color: var(--red-border);
    color: var(--red-primary);
    box-shadow: 0 0 10px var(--red-glow);
}

.notif-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 6px; height: 6px;
    background: var(--red-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--red-glow);
}

.page-content {
    padding: 22px 24px;
    flex: 1;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: var(--red-border);
    box-shadow: 0 2px 20px rgba(230,0,26,0.12);
}

.card-header {
    padding: 13px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(230,0,26,0.035);
    gap: 10px;
    min-height: 48px;
}

.card-title {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.card-title .icon,
.card-title i { color: var(--red-primary); font-size: 13px; }

.card-body { padding: 18px; }

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.22s;
    text-decoration: none;
    color: inherit;
    min-height: 78px;
}

.stat-card:hover {
    border-color: var(--red-border);
    box-shadow: 0 4px 24px rgba(230,0,26,0.14);
    transform: translateY(-2px);
    color: inherit;
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--red-dim);
    border: 1px solid var(--red-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--red-primary);
    box-shadow: 0 0 12px var(--red-glow);
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}

.stat-card:hover .stat-icon { box-shadow: 0 0 22px var(--red-glow); }

.stat-icon.green  { background: rgba(0,230,118,0.1);  border-color: rgba(0,230,118,0.3);  color: var(--success); box-shadow: 0 0 12px rgba(0,230,118,0.25); }
.stat-icon.yellow { background: rgba(255,171,0,0.1);  border-color: rgba(255,171,0,0.3);  color: var(--warning); box-shadow: 0 0 12px rgba(255,171,0,0.25); }
.stat-icon.blue   { background: rgba(0,176,255,0.1);  border-color: rgba(0,176,255,0.3);  color: var(--info);    box-shadow: 0 0 12px rgba(0,176,255,0.25); }
.stat-icon.red    { background: rgba(255,61,61,0.1);  border-color: rgba(255,61,61,0.3);  color: var(--danger);  box-shadow: 0 0 12px rgba(255,61,61,0.25); }

.stat-info { flex: 1; min-width: 0; }

.stat-info .stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-info .stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
    font-family: 'Share Tech Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== BUTTONS ===== */
.btn-cyber {
    background: var(--red-primary);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 7px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    box-shadow: 0 2px 12px var(--red-glow);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-cyber:hover {
    background: var(--red-bright);
    box-shadow: 0 4px 22px var(--red-glow);
    transform: translateY(-1px);
    color: #fff;
}

.btn-cyber:active { transform: translateY(0); }

.btn-cyber-outline {
    background: transparent;
    color: var(--red-primary);
    border: 1px solid var(--red-border);
    padding: 8px 16px;
    border-radius: 7px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-cyber-outline:hover {
    background: var(--red-dim);
    border-color: var(--red-primary);
    box-shadow: 0 0 12px var(--red-glow);
    color: var(--red-bright);
}

/* Neutral/cancel button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: 7px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary);
}

.btn-sm { padding: 5px 12px !important; font-size: 12px !important; }
.btn-xs { padding: 3px 9px !important; font-size: 11px !important; }

.btn-success-c {
    background: var(--success) !important;
    box-shadow: 0 2px 12px rgba(0,230,118,0.3) !important;
    color: #000 !important;
}
.btn-success-c:hover { background: #00cc66 !important; color: #000 !important; }

.btn-warning-c {
    background: var(--warning) !important;
    box-shadow: 0 2px 12px rgba(255,171,0,0.3) !important;
    color: #000 !important;
}

.btn-danger-c {
    background: var(--danger) !important;
    box-shadow: 0 2px 12px rgba(255,61,61,0.3) !important;
    color: #fff !important;
}

/* ===== TABLES ===== */
.cyber-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cyber-table thead { position: sticky; top: 0; z-index: 1; }

.cyber-table th {
    background: rgba(230,0,26,0.07);
    color: var(--red-primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
    user-select: none;
}

.cyber-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(230,0,26,0.06);
    color: var(--text-secondary);
    vertical-align: middle;
}

.cyber-table tbody tr:hover td {
    background: rgba(230,0,26,0.04);
    color: var(--text-primary);
}

.cyber-table tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge-cyber {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.5px;
    border: 1px solid;
    white-space: nowrap;
    font-weight: 600;
    line-height: 1.4;
}

.badge-paid       { background: rgba(0,230,118,0.1);   color: var(--success); border-color: rgba(0,230,118,0.35); }
.badge-unpaid     { background: rgba(255,61,61,0.1);   color: var(--danger);  border-color: rgba(255,61,61,0.35); }
.badge-partial    { background: rgba(255,171,0,0.1);   color: var(--warning); border-color: rgba(255,171,0,0.35); }
.badge-active     { background: rgba(0,230,118,0.1);   color: var(--success); border-color: rgba(0,230,118,0.35); }
.badge-inactive   { background: rgba(100,100,120,0.15);color: var(--text-dim);border-color: rgba(100,100,120,0.25); }
.badge-offensive  { background: rgba(230,0,26,0.12);   color: #ff6680;        border-color: rgba(230,0,26,0.4); }
.badge-defensive  { background: rgba(0,176,255,0.1);   color: var(--info);    border-color: rgba(0,176,255,0.35); }
.badge-completed  { background: rgba(0,176,255,0.1);   color: var(--info);    border-color: rgba(0,176,255,0.35); }
.badge-dropped    { background: rgba(100,100,120,0.15);color: var(--text-dim);border-color: rgba(100,100,120,0.25); }
.badge-upcoming   { background: rgba(255,171,0,0.1);   color: var(--warning); border-color: rgba(255,171,0,0.35); }
.badge-owner      { background: rgba(230,0,26,0.12);   color: var(--red-bright); border-color: var(--red-border); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 15px; }

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 6px;
    line-height: 1;
}

.form-label i { font-size: 10px; color: var(--red-primary); }

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    padding: 9px 12px;
    border-radius: 7px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.4;
}

.form-control:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 0 2px rgba(230,0,26,0.15);
    background: var(--bg-secondary);
}

.form-control:hover:not(:focus) {
    border-color: rgba(255,255,255,0.14);
}

.form-control::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

/* Select */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23e6001a'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    cursor: pointer;
    color-scheme: dark;
}

select.form-control option {
    background: #1a1a22;
    color: var(--text-primary);
    padding: 8px;
}

/* Date / Month inputs */
input[type="date"].form-control,
input[type="month"].form-control,
input[type="time"].form-control {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(300deg);
    opacity: 0.7;
    cursor: pointer;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* Number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
    filter: invert(1);
}

.form-row { display: grid; gap: 14px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-error {
    color: var(--danger);
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-hint {
    color: var(--text-dim);
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    margin-top: 5px;
    letter-spacing: 0.3px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 11px 15px;
    border-radius: 8px;
    border-left: 3px solid;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.alert i { flex-shrink: 0; margin-top: 1px; }

.alert-success { background: rgba(0,230,118,0.07); border-color: var(--success); color: var(--success); }
.alert-danger  { background: rgba(255,61,61,0.07);  border-color: var(--danger);  color: var(--danger); }
.alert-warning { background: rgba(255,171,0,0.07);  border-color: var(--warning); color: var(--warning); }
.alert-info    { background: rgba(0,176,255,0.07);  border-color: var(--info);    color: var(--info); }

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.modal-overlay.show { display: flex; }

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: 12px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 8px 60px rgba(230,0,26,0.2), 0 0 0 1px rgba(255,255,255,0.03);
    animation: modalIn 0.22s cubic-bezier(.4,0,.2,1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.94) translateY(-12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--red-primary);
    text-transform: uppercase;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}
.modal-close:hover { color: var(--red-primary); background: var(--red-dim); }

.modal-body { padding: 20px; }

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== REMINDER POPUP ===== */
.reminder-popup {
    display: none;
    position: fixed;
    top: 14px; right: 14px;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(230,0,26,0.25), 0 0 0 1px rgba(255,255,255,0.03);
    z-index: 3000;
    overflow: hidden;
}

.reminder-popup.show {
    display: block;
    animation: slideInRight 0.35s cubic-bezier(.4,0,.2,1);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(110%); }
    to   { opacity: 1; transform: translateX(0); }
}

.reminder-popup-header {
    background: var(--red-primary);
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.reminder-popup-title {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.reminder-popup-body {
    padding: 12px 14px;
    max-height: 280px;
    overflow-y: auto;
}

.reminder-item {
    padding: 7px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.reminder-item:last-child { border-bottom: none; }

.reminder-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--red-primary);
    box-shadow: 0 0 6px var(--red-glow);
    flex-shrink: 0;
}

/* ===== AVATAR ===== */
.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    display: block;
}

.avatar-placeholder {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--red-dim);
    border: 2px solid var(--red-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--red-primary);
    flex-shrink: 0;
    text-transform: uppercase;
}

/* ===== GRID ===== */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ===== FILTER / SEARCH BAR ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-bar .form-control { width: auto; min-width: 160px; }

.search-box { position: relative; }
.search-box input { padding-left: 36px; }
.search-box .search-icon {
    position: absolute;
    left: 11px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 13px;
    pointer-events: none;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-wrap {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    height: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--red-primary);
    box-shadow: 0 0 6px var(--red-glow);
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.progress-bar-fill.green  { background: var(--success); box-shadow: 0 0 6px rgba(0,230,118,0.5); }
.progress-bar-fill.yellow { background: var(--warning); box-shadow: 0 0 6px rgba(255,171,0,0.5); }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.page-btn:hover, .page-btn.active {
    border-color: var(--red-primary);
    color: var(--red-primary);
    box-shadow: 0 0 8px var(--red-glow);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(230,0,26,0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(230,0,26,0.04) 0%, transparent 60%),
        var(--bg-primary);
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: 14px;
    padding: 38px 34px;
    width: 100%;
    max-width: 395px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 8px 60px rgba(230,0,26,0.18),
        0 24px 80px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
    animation: topGlow 3s ease-in-out infinite;
}

@keyframes topGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo .logo-icon {
    width: 62px; height: 62px;
    background: var(--red-dim);
    border: 2px solid var(--red-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--red-primary);
    margin: 0 auto 14px;
    box-shadow: 0 0 0 6px rgba(230,0,26,0.06), 0 0 30px var(--red-glow);
    animation: logoPulse 2.5s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(230,0,26,0.06), 0 0 24px var(--red-glow); }
    50%       { box-shadow: 0 0 0 10px rgba(230,0,26,0.04), 0 0 44px var(--red-glow); }
}

.login-logo h1 {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 4px;
}

.login-logo p {
    font-size: 14px;
    color: var(--red-primary);
    letter-spacing: 3px;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    margin-top: 5px;
    opacity: 0.9;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-dim);
    margin-bottom: 14px;
    letter-spacing: 0.3px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--text-secondary); }

.breadcrumb .sep {
    color: var(--text-dim);
    opacity: 0.4;
    font-size: 13px;
}

.breadcrumb .current { color: var(--red-primary); }

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-header-left .page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.page-header-left .page-subtitle {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.page-header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ===== DIVIDER ===== */
.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 16px 0;
}

.divider-label {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0 16px;
    position: relative;
    text-align: center;
}

.divider-label::after {
    content: attr(data-label);
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    padding: 0 12px;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 2px;
    color: var(--red-primary);
    text-transform: uppercase;
}

/* ===== TOOLTIP ===== */
[data-tooltip] { position: relative; }

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
    font-family: 'Share Tech Mono', monospace;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transform: translateX(-50%) translateY(4px);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 52px 20px;
    color: var(--text-dim);
}

.empty-state .empty-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: var(--text-dim);
}

.empty-state .empty-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.empty-state .empty-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 18px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== SECTION CARD FORM ===== */
.form-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.form-section-card:hover { border-color: var(--red-border); }

.form-section-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(230,0,26,0.04);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.form-section-header i { color: var(--red-primary); font-size: 13px; }

.form-section-body { padding: 18px; }

/* ===== UTILS ===== */
.text-red    { color: var(--red-primary) !important; }
.text-green  { color: var(--success) !important; }
.text-yellow { color: var(--warning) !important; }
.text-blue   { color: var(--info) !important; }
.text-dim    { color: var(--text-dim) !important; }
.text-muted  { color: var(--text-secondary) !important; }
.text-mono   { font-family: 'Share Tech Mono', monospace !important; }
.text-orb    { font-family: 'Orbitron', monospace !important; }
.fw-700      { font-weight: 700 !important; }
.fw-600      { font-weight: 600 !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 6px !important; }
.mb-2 { margin-bottom: 12px !important; }
.mb-3 { margin-bottom: 18px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-1 { margin-top: 6px !important; }
.mt-2 { margin-top: 12px !important; }
.mt-3 { margin-top: 18px !important; }
.mt-4 { margin-top: 24px !important; }

.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-none  { display: none !important; }

.align-center  { align-items: center !important; }
.align-start   { align-items: flex-start !important; }
.justify-between { justify-content: space-between !important; }
.justify-center  { justify-content: center !important; }
.justify-end     { justify-content: flex-end !important; }
.flex-wrap     { flex-wrap: wrap !important; }
.flex-1        { flex: 1 !important; }

.gap-1 { gap: 5px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }

.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-left   { text-align: left !important; }

.fs-11 { font-size: 11px !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }

/* ===== MONEY DISPLAY ===== */
.money-value {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.money-lg {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 20px;
}

/* ===== BLINK CURSOR ===== */
.blink {
    animation: blink 1.2s step-end infinite;
    opacity: 0.7;
}
@keyframes blink { 0%, 100% { opacity: 0.7; } 50% { opacity: 0; } }

/* ===== PRINT ===== */
@media print {
    body { background: #fff; color: #000; font-family: Arial, sans-serif; }
    .sidebar, .topbar, .no-print, .reminder-popup { display: none !important; }
    .main-content { margin-left: 0; }
    .card { border: 1px solid #ddd !important; box-shadow: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.6); }
    .main-content { margin-left: 0; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
    .page-content { padding: 14px 14px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .form-control { min-width: unset; width: 100%; }
}

/* ===== GLOW / ANIMATION ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* ===== ATTENDANCE GRID ===== */
.att-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid;
    border-radius: 5px;
    padding: 5px 2px;
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    text-align: center;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, color 0.15s;
}
