/* Unique Professional Grey & Charcoal SaaS ERP Theme with 3D Depth */
:root {
    --bg-main: #12141c;
    --sidebar-bg: #181b26;
    --card-bg: #1e2230;
    --border: #2a2f42;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #64748b; /* Professional Slate Grey Accent */
    --primary-gradient: linear-gradient(135deg, #475569 100%, #334155 0%);
    --secondary: #38bdf8; /* Bright Cyan Pop for Highlights */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* { box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; margin: 0; padding: 0; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

/* Navbar 3D Depth */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #1e2230, #12141c);
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(to right, #cbd5e1, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Auth Portal 3D Box */
.auth-wrapper {
    max-width: 440px;
    margin: 60px auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.06);
}

.auth-header { text-align: center; margin-bottom: 25px; }
.auth-header h2 { margin: 0; font-size: 1.6rem; color: #fff; }
.auth-header p { color: var(--text-muted); font-size: 0.88rem; margin-top: 6px; }

.form-group { margin-bottom: 16px; display: flex; flex-direction: column; }
label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.83rem; font-weight: 600; }

input, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-main);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

input:focus, select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* 3D Styled Buttons */
.btn {
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: linear-gradient(135deg, #475569 0%, #334155 100%); color: white; width: 100%; padding: 12px; font-size: 0.92rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); }
.btn-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; }
.btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; }
.btn-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: black; font-weight: 800; }
.btn-info { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: white; }

/* Workspace Layout */
.dashboard-container { display: none; }
.erp-layout { display: flex; min-height: calc(100vh - 61px); }

/* Sidebar 3D Professional Look */
.erp-sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
}

.sidebar-header { padding: 18px; border-bottom: 1px solid var(--border); text-align: center; }
.sidebar-header h3 { margin: 0 0 5px 0; font-size: 1.1rem; color: var(--secondary); }

.sidebar-menu { list-style: none; padding: 15px 10px; margin: 0; }
.sidebar-menu li {
    padding: 11px 14px;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-menu li:hover {
    background: rgba(148, 163, 184, 0.08);
    color: #fff;
    transform: translateX(4px);
}

/* 3D Active Tab Highlight Effect */
.sidebar-menu li.active {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 15px rgba(71, 85, 105, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Submenu Dropdown for Exams */
.submenu-container {
    display: none;
    padding-left: 15px;
    margin-top: 4px;
    margin-bottom: 6px;
    border-left: 2px solid var(--border);
}
.submenu-container li {
    padding: 8px 12px;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.erp-main { flex-grow: 1; padding: 25px; overflow-y: auto; background: var(--bg-main); }

/* Cards with 3D Soft Elevation */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }

.stat-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--secondary);
    transition: transform 0.2s ease;
}

.stat-card:hover { transform: translateY(-3px); }

.stat-card h3 { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; font-weight: 700; }
.stat-card .amount { font-size: 1.3rem; font-weight: 800; color: #fff; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 15px; }

table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.88rem; }
table th, table td { padding: 10px 12px; text-align: left; border: 1px solid var(--border); }
table th { background: rgba(30, 41, 59, 0.8); font-weight: 700; color: var(--secondary); }
tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }

.badge-active { background: rgba(239, 68, 68, 0.2); color: var(--danger); padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 0.75rem; }
.badge-paid { background: rgba(16, 185, 129, 0.2); color: var(--success); padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 0.75rem; }
.badge-na { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 0.75rem; }
.badge-rte { background: rgba(245, 158, 11, 0.2); color: var(--warning); padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 0.75rem; }

.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); justify-content: center; align-items: center; z-index: 1000; overflow-y: auto;
}

.modal-content {
    background: var(--card-bg); padding: 25px; border-radius: 12px;
    width: 750px; max-height: 90vh; overflow-y: auto; border: 1px solid var(--border);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.receipt-box { border: 2px dashed #333; padding: 20px; width: 100%; background: #fff; color: #000; margin: 0 auto; }
.receipt-header { text-align: center; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }

@media print {
    body * { visibility: hidden; }
    #receipt-modal, #receipt-modal *, #printable-receipt, #printable-receipt *, #summary-modal, #summary-modal * { visibility: visible; }
    #receipt-modal, #summary-modal { position: absolute; left: 0; top: 0; background: white; width: 100%; height: 100%; display: block !important; color: #000; }
    .modal-content { box-shadow: none; padding: 0; width: 100%; background: white; color: #000; }
    .no-print { display: none !important; }
}