/* ========================================
   IDMASS - Dark Mode Design System
   ======================================== */

/* ---------- FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #333333;
    color: #1eb3b3;
    min-height: 100vh;
}

/* ---------- LOGIN PAGE ---------- */
.login-page {
    background: #0a0a0f;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 50%;
    top: -150px;
    right: -100px;
    filter: blur(100px);
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.06);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    filter: blur(80px);
}

.login-box {
    background: rgba(15, 15, 25, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 50px 45px;
    border-radius: 24px;
    width: 440px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.login-logo {
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.login-subtitle {
    color: #64748b;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.login-dept {
    color: #ec4899;
    font-size: 12px;
    margin-top: 8px;
    letter-spacing: 2px;
    font-weight: 600;
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 14px;
    border-left: 4px solid #ef4444;
    font-weight: 500;
}

.success-msg {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #22c55e;
    font-weight: 500;
}

.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.03);
    color: #e2e8f0;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    background: rgba(255,255,255,0.05);
}

.form-group select option {
    background: #1a1a2e;
    color: #e2e8f0;
}

.login-hint {
    margin-top: 25px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}

/* ---------- BUTTONS ---------- */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 12px;
    border-radius: 14px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.15);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 10px;
}

.btn-logout {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    padding: 8px 20px;
    font-size: 13px;
    border-radius: 10px;
    margin-left: 15px;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    transform: none;
    box-shadow: none;
}

/* ---------- TOP NAVIGATION ---------- */
.topbar {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0 30px;
    display: flex;
    align-items: center;
    height: 65px;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.brand {
    color: white;
    font-size: 22px;
    font-weight: 800;
    margin-right: 35px;
    flex-shrink: 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    height: 100%;
    flex: 1;
}

.nav-links a {
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    padding: 0 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    height: 100%;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
}

.nav-links a:hover {
    color: rgba(255,255,255,0.8);
}

.nav-links a.active {
    color: white;
    border-bottom-color: #8b5cf6;
}

.nav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    flex-shrink: 0;
    gap: 12px;
    font-weight: 500;
}

.nav-user strong {
    color: rgba(255,255,255,0.8);
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

/* ---------- STATS ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 28px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
    opacity: 0.5;
}

.stat-card.accent::before {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

.stat-card.green::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.stat-card.blue::before {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.stat-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #f1f5f9;
    margin-top: 8px;
    letter-spacing: -1px;
}

.stat-card.accent .stat-value {
    color: #f9a8d4;
}

.stat-card.green .stat-value {
    color: #86efac;
}

.stat-card.blue .stat-value {
    color: #93c5fd;
}

/* ---------- PANELS ---------- */
.panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 28px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.panel-title {
    font-size: 17px;
    color: #f1f5f9;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ---------- TABLE ---------- */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 16px 18px;
    text-align: left;
    font-size: 14px;
}

th {
    background: rgba(255,255,255,0.03);
    color: #64748b;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

td {
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
    color: #cbd5e1;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* ---------- FORM ROW ---------- */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
}

.form-row .form-group {
    min-width: 180px;
}

/* ---------- TWO COLUMN ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

/* ---------- ITEM LIST ---------- */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.item-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    transform: translateX(4px);
}

.item-info {
    font-size: 14px;
    font-weight: 500;
    color: #e2e8f0;
}

.item-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

/* ---------- ANNOUNCEMENTS ---------- */
.announcement {
    padding: 22px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 4px solid #8b5cf6;
    border-radius: 0 16px 16px 0;
    margin-bottom: 14px;
    transition: all 0.3s ease;
}

.announcement:hover {
    background: rgba(255,255,255,0.04);
    transform: translateX(4px);
}

.announcement.urgent {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.ann-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    color: #f1f5f9;
}

.ann-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 500;
}

.ann-body {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.badge-gray {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
}

/* ---------- EMPTY STATE ---------- */
.empty {
    text-align: center;
    padding: 50px 20px;
    color: #475569;
    font-weight: 500;
    font-size: 15px;
}

/* ---------- TIMETABLE GRID ---------- */
.tt-grid {
    overflow-x: auto;
}

.tt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    overflow: hidden;
}

.tt-table th {
    background: rgba(139, 92, 246, 0.15);
    color: #e2e8f0;
    padding: 16px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    letter-spacing: 0.5px;
}

.tt-table td {
    padding: 12px;
    vertical-align: top;
    min-width: 160px;
    border: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.2);
}

.class-card {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    border-left: 4px solid #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
    transition: all 0.3s ease;
}

.class-card:hover {
    background: rgba(139, 92, 246, 0.12);
    transform: translateY(-2px);
}

.class-card.cancelled {
    background: rgba(239, 68, 68, 0.05);
    border-left-color: #ef4444;
    opacity: 0.5;
    text-decoration: line-through;
}

.class-card.replacement {
    background: rgba(34, 197, 94, 0.08);
    border-left-color: #22c55e;
}

.cc-course {
    font-weight: 700;
    color: #f1f5f9;
    font-size: 13px;
}

.cc-detail {
    color: #94a3b8;
    margin-top: 4px;
    font-weight: 500;
}

/* ---------- EVENTS ---------- */
.event-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 4px solid #8b5cf6;
    border-radius: 0 20px 20px 0;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.event-card:hover {
    background: rgba(255,255,255,0.04);
    transform: translateX(4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.event-card.past {
    opacity: 0.4;
    border-left-color: #334155;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.event-title {
    font-size: 19px;
    font-weight: 700;
    color: #f1f5f9;
}

.event-meta {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
    font-weight: 500;
}

.event-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item .stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.event-desc {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.event-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.event-actions select {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 13px;
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
    outline: none;
}

.event-actions select option {
    background: #1e1e2e;
}

/* ---------- INFO CARDS ---------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.info-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: white;
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}

.info-card-code {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #c084fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.info-card-name {
    font-size: 13px;
    margin-top: 8px;
    opacity: 0.7;
    font-weight: 500;
    position: relative;
}

/* ---------- FOOTER ---------- */
.footer {
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.3);
    padding: 40px 30px;
    text-align: center;
    clear: both;
    margin-top: 50px;
}

.footer-brand {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text {
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* ---------- SELECTION ---------- */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #e2e8f0;
}

/* ---------- TEXTAREA ---------- */
textarea {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: #e2e8f0 !important;
    border-radius: 12px !important;
    font-family: inherit !important;
}

textarea:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1) !important;
    outline: none !important;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel, .stat-card, .item-row, .announcement, .event-card, .class-card, .info-card {
    animation: fadeIn 0.4s ease;
}