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

:root {
    /* Formal Color Palette */
    --primary-color: #0f172a;
    /* Slate 900 */
    --secondary-color: #334155;
    /* Slate 700 */
    --accent-color: #ca8a04;
    /* Gold-ish for subtle accents, like a badge/seal */
    --background-color: #f8fafc;
    /* Slate 50 */
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;

    --spacing-unit: 1rem;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

main {
    flex: 1;
    padding: 3rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

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

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

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

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

.btn-full {
    width: 100%;
}

/* Forms */
.form-card {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    max-width: 450px;
    margin: 0 auto;
    border-top: 4px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

input,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

/* Footer */
footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

/* Toast Notifications - Prominent Style */
#toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.toast {
    min-width: 320px;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    background: var(--surface-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    /* Default text color for solid toasts */
    text-align: center;
}

/* Solid Colors for Impact */
.toast.success {
    background-color: #059669;
    /* Emerald 600 */
    border: 2px solid #047857;
}

.toast.error {
    background-color: #dc2626;
    /* Red 600 */
    border: 2px solid #b91c1c;
}

.toast.info {
    background-color: #2563eb;
    /* Blue 600 */
    border: 2px solid #1d4ed8;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Page Entry Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

header {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

main {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}

footer {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

/* --- MOBILE RESPONSIVENESS --- */

/* Mobile Menu Button - Hidden by default */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

@media (max-width: 768px) {

    /* Layout */
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Navigation */
    .mobile-menu-btn {
        display: block;
        /* Show hamburger on mobile */
    }

    .nav-links {
        display: none;
        /* Hide links by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        align-items: stretch;
        /* Full width links */
        border-top: 1px solid var(--border-color);
    }

    /* Show menu when active */
    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .nav-links a {
        padding: 0.75rem;
        text-align: center;
        border-radius: var(--border-radius);
    }

    .nav-links a:hover {
        background-color: var(--background-color);
    }

    /* Buttons in Hero */
    .hero .mt-4 {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero .mt-4 a,
    .hero .mt-4 button {
        margin-left: 0 !important;
        width: 100%;
    }

    /* Table Responsiveness */
    .form-card {
        padding: 1.5rem;
        overflow-x: auto;
        /* Allow card to scroll */
    }

    table {
        min-width: 600px;
        /* Force table width so it scrolls */
    }

    /* Login/Register Forms */
    .form-card {
        width: 100%;
    }
}