@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Syne:wght@600;700;800&display=swap');

:root {
    --primary: #06152f;
    --secondary: #174ea6;
    --gold: #d4af37;
    --gold-light: #f3d779;
    --gold-dark: #a88318;
    --emerald: #087c5a;
    --dark: #020a18;
    --text-dark: #0d1a2d;
    --text-light: #f8f6ef;
    --muted: #6c7787;
    --danger: #c62845;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #020a18, #06152f, #0b2145, #174ea6);
    background-size: 300% 300%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-dark);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.background-slider {
    position: fixed;
    inset: 0;
    z-index: -3;
}

.bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.bg-slide:nth-child(1) { background-image: url("images/background1.jpg"); }
.bg-slide:nth-child(2) { background-image: url("images/background2.jpeg"); }
.bg-slide:nth-child(3) { background-image: url("images/background3.jpeg"); }
.bg-slide:nth-child(4) { background-image: url("images/background4.jpg"); }

.bg-slide.active { opacity: 1; }

.background-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.25), transparent 60%),
        linear-gradient(135deg, rgba(2, 10, 24, 0.94), rgba(6, 21, 47, 0.85), rgba(23, 78, 166, 0.75));
    z-index: -2;
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

#screen-home { align-items: center; justify-content: center; padding: 30px; }
.home-content { width: 100%; display: flex; justify-content: center; }

.glass-home-card {
    width: 100%;
    max-width: 650px;
    text-align: center;
    padding: 55px 40px;
    border-radius: 35px;
    background: linear-gradient(145deg, rgba(8, 29, 63, 0.78), rgba(4, 16, 36, 0.65));
    backdrop-filter: blur(22px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: var(--text-light);
}

.home-logo {
    width: 115px;
    height: 115px;
    object-fit: cover;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, var(--gold), #ffffff, var(--gold));
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 0 8px rgba(212, 175, 55, 0.1);
}

.small-heading {
    font-family: 'Syne', sans-serif;
    letter-spacing: 4px;
    font-size: 13px;
    font-weight: 800;
    color: var(--gold-light);
    text-shadow: 0 2px 12px rgba(212, 175, 55, 0.4);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.glass-home-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    letter-spacing: 2px;
    line-height: 0.95;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff, var(--gold-light), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
}

.tagline {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-style: italic;
    color: #c5d0df;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.home-description {
    max-width: 500px;
    margin: auto;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 30px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.explore-btn {
    border: none;
    padding: 18px 36px;
    border-radius: 50px;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 16px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--dark);
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.explore-btn span { margin-left: 8px; }

.explore-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, var(--white), var(--gold-light));
    color: var(--dark);
    box-shadow: 0 18px 40px rgba(212, 175, 55, 0.4);
}

.contact-info {
    margin-top: 35px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info div {
    background: rgba(4, 16, 38, 0.6);
    padding: 12px 20px;
    border-radius: 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#screen-login { align-items: center; justify-content: center; padding: 25px; }
.login-wrapper { width: 100%; display: flex; justify-content: center; }

.login-card {
    position: relative;
    width: 100%;
    max-width: 450px;
    padding: 45px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 30px 70px rgba(2, 10, 24, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.8);
}

.back-button {
    border: none;
    background: transparent;
    color: var(--secondary);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 25px;
    transition: 0.2s;
}

.back-button:hover { color: var(--gold-dark); }

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

.login-logo {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid var(--gold);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.login-logo-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--primary);
}

.login-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-text {
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 30px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #dce2e9;
    background: #f8fafc;
    color: var(--text-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: var(--secondary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(23, 78, 166, 0.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 25px rgba(6, 21, 47, 0.3);
}

.login-btn:hover {
    transform: translateY(-3px);
    background: var(--secondary);
    box-shadow: 0 12px 30px rgba(23, 78, 166, 0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}

.switch-link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.switch-link a {
    color: var(--secondary);
    font-weight: 800;
    text-decoration: none;
}

.switch-link a:hover { color: var(--gold-dark); }

.form-error {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.form-error.error {
    background: #fff0f2;
    color: var(--danger);
    border: 1px solid rgba(198, 40, 69, 0.25);
}

.form-error.success {
    background: #eafbf3;
    color: var(--emerald);
    border: 1px solid rgba(8, 124, 90, 0.25);
}

.request-password-input {
    padding: 8px 10px;
    border-radius: 8px;
    border: 2px solid #dce2e9;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    width: 140px;
}

.approve-btn {
    border: none;
    background: var(--emerald);
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.approve-btn:hover { opacity: 0.85; }
.approve-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.dashboard-screen { padding: 35px; align-items: flex-start; justify-content: center; }

.dashboard {
    width: 100%;
    max-width: 1250px;
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 35px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 30px 80px rgba(2, 10, 24, 0.35);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e4e8ed;
    margin-bottom: 25px;
}

.brand { display: flex; align-items: center; gap: 15px; }

.brand img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.brand h2 { font-family: 'Playfair Display', serif; font-size: 30px; color: var(--primary); }

.brand p, .user-area p { font-size: 13px; color: var(--muted); font-weight: 600; }

.user-area { display: flex; align-items: center; gap: 12px; }

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--gold-light);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 6px 18px rgba(6, 21, 47, 0.25);
}

.admin-avatar { background: var(--secondary); box-shadow: 0 6px 18px rgba(23, 78, 166, 0.3); }

.logout-btn {
    border: none;
    background: #fff0f2;
    color: var(--danger);
    padding: 10px 18px;
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(198, 40, 69, 0.1);
}

.logout-btn:hover { background: #ffe0e5; transform: translateY(-2px); }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.breadcrumb-link { color: var(--secondary); font-weight: 800; cursor: pointer; transition: 0.2s; }
.breadcrumb-link:hover { color: var(--gold-dark); }

.hidden { display: none; }

.section-title { display: flex; gap: 15px; align-items: center; margin-bottom: 25px; }
.section-title > span { font-size: 35px; }
.section-title h2 { font-family: 'Syne', sans-serif; font-size: 26px; color: var(--primary); }
.section-title p { color: var(--muted); font-weight: 600; margin-top: 5px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.selection-card {
    padding: 30px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e4e8ed;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(5, 20, 50, 0.05);
}

.selection-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 6px;
    background: linear-gradient(90deg, var(--gold), var(--secondary), var(--primary));
}

.selection-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 20px 40px rgba(5, 20, 50, 0.12);
}

.card-icon { font-size: 42px; margin-bottom: 20px; }
.selection-card h3 { font-family: 'Syne', sans-serif; font-size: 21px; color: var(--primary); margin-bottom: 7px; }
.selection-card p { color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.selection-card span { color: var(--secondary); font-weight: 800; }
.year-number { font-family: 'Playfair Display', serif; font-size: 58px; color: var(--gold-dark); font-weight: 800; }

.materials-list { display: flex; flex-direction: column; gap: 15px; }

.material-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e4e8ed;
    transition: 0.3s;
}

.material-item:hover {
    transform: translateX(6px);
    border-color: rgba(23, 78, 166, 0.3);
    box-shadow: 0 12px 30px rgba(5, 20, 50, 0.08);
}

.material-info { display: flex; gap: 15px; align-items: center; }
.file-icon { font-size: 35px; }
.material-info h3 { font-family: 'Syne', sans-serif; font-size: 17px; color: var(--primary); margin-bottom: 5px; }
.material-info p { font-size: 13px; color: var(--muted); font-weight: 600; }

.view-btn {
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 6px 18px rgba(6, 21, 47, 0.2);
}

.view-btn:hover { background: var(--secondary); box-shadow: 0 10px 25px rgba(23, 78, 166, 0.3); }

.admin-welcome {
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 20px 40px rgba(6, 21, 47, 0.3);
}

.admin-welcome h1 { font-family: 'Playfair Display', serif; font-size: 40px; margin-bottom: 10px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 25px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.1);
}

.stat-card span { font-size: 35px; }
.stat-card h3 { font-family: 'Syne', sans-serif; font-size: 30px; color: var(--primary); }
.stat-card p { color: var(--gold-dark); font-weight: 700; }

.admin-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 22px;
    margin-bottom: 25px;
    border: 1px solid #e4e8ed;
    box-shadow: 0 12px 30px rgba(5, 20, 50, 0.06);
}

.admin-card h2 { font-family: 'Syne', sans-serif; font-size: 24px; color: var(--primary); margin-bottom: 8px; }
.admin-description, .admin-card-header p { color: var(--muted); font-weight: 600; margin-bottom: 25px; }

.upload-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.upload-form input, .upload-form select {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #dce2e8;
    background: #f9fafb;
    color: var(--text-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    outline: none;
    transition: 0.3s;
}

.upload-form input:focus, .upload-form select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(23, 78, 166, 0.08);
    background: #ffffff;
}

.file-upload-wrapper { display: flex; align-items: center; }

.upload-btn {
    border: none;
    padding: 16px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    grid-column: 1 / -1;
    transition: 0.3s;
    box-shadow: 0 10px 25px rgba(6, 21, 47, 0.25);
}

.upload-btn:hover { background: var(--secondary); box-shadow: 0 12px 30px rgba(23, 78, 166, 0.35); }
.upload-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid #e4e8ed;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

table { width: 100%; border-collapse: collapse; }

th {
    text-align: left;
    background: #f6f8fa;
    padding: 16px;
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

td {
    padding: 16px;
    border-bottom: 1px solid #edf0f3;
    background: #ffffff;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

tr:nth-child(even) td { background: #fafbfd; }
tr:hover td { background: #f4f6f9; }

.delete-btn {
    border: none;
    background: #fff0f2;
    color: var(--danger);
    padding: 8px 14px;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.delete-btn:hover { background: #ffe0e5; }

.small-view-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 800;
    transition: 0.2s;
}

.small-view-btn:hover { background: var(--secondary); box-shadow: 0 4px 12px rgba(23, 78, 166, 0.3); }

@media (max-width: 800px) {
    .dashboard-screen { padding: 15px; }
    .dashboard { padding: 22px; }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .glass-home-card h1 { font-size: 52px; }
    .material-item { flex-direction: column; align-items: flex-start; }
    .user-area { flex-wrap: wrap; }
}

@media (max-width: 500px) {
    .glass-home-card { padding: 40px 20px; }
    .glass-home-card h1 { font-size: 42px; }
    .tagline { font-size: 24px; }
    .login-card { padding: 30px 22px; }
    .contact-info { flex-direction: column; }
}