/*
 * File: styles.css
 * Purpose: Global system stylesheet defining custom fonts, variables, CSS classes,
 *          glassmorphism cards, buttons, badges, toast notifications, custom prompts,
 *          and mobile responsiveness across the entire application interface.
 * Fit: Ingested by both student and administrative HTML pages to guarantee identical styling and aesthetics.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --secondary: #ec4899;
    --accent: #6366f1;
    --background: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text);
}

.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--background);
    border-color: var(--text-muted);
}

.input-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

input,
textarea,
select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    font-size: 0.875rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active {
    font-weight: 600;
}

.nav-link i {
    font-size: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.logo span {
    color: var(--primary);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 4px;
    color: transparent !important;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes pulse-soft {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse-soft 2s infinite ease-in-out;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    color: var(--text);
}

.toast i {
    font-size: 1.25rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.info i {
    color: var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Custom Prompt Modal */
#prompt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9900;
    justify-content: center;
    align-items: center;
}

.prompt-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments for Small Devices */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .glass-card {
        padding: 1rem;
    }

    .nav {
        padding: 0.6rem 1rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    .nav {
        padding: 0.6rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        flex: 1;
        display: flex;
        justify-content: center;
        margin-left: 0;
    }

    .hide-mobile {
        display: none !important;
    }

    .show-mobile-only {
        display: block !important;
    }

    .menu-toggle {
        display: block;
        font-size: 1.25rem;
        background: none;
        border: none;
        color: var(--text);
        cursor: pointer;
        padding: 0.5rem;
        z-index: 101;
        order: -1;
        width: 40px;
    }

    .nav>div:last-child {
        width: 40px;
        display: flex;
        justify-content: flex-end;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--card);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .student-table th,
    .student-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
    }

    .badge {
        padding: 0.1rem 0.4rem;
        font-size: 0.65rem;
    }

    .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .search-box {
        max-width: none;
    }

    .student-table td:last-child {
        display: flex;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .student-table .btn {
        padding: 0.3rem 0.5rem;
        min-width: auto;
    }
}

@media (min-width: 641px) {
    .menu-toggle {
        display: none;
    }
}

/* Minimal Footer */
.minimal-footer {
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.minimal-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.minimal-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.minimal-footer a:hover {
    text-decoration: underline;
}