@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&display=swap');

:root {
    --primary-bordeaux: #800020;
    --secondary-bordeaux: #4a0012;
    --gold-accent: #d4af37;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #2c2c2c;
    --text-light: #666;
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-dark);
}

/* Elegant Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease-in-out;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-bordeaux);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 10px;
}

.loader-line {
    width: 0;
    height: 3px;
    background: var(--primary-bordeaux);
    margin: 10px auto 0;
    animation: lineGrow 1.5s ease-in-out forwards;
}

@keyframes lineGrow {
    0% {
        width: 0;
        opacity: 0;
    }

    50% {
        width: 40%;
        opacity: 1;
    }

    100% {
        width: 80%;
        opacity: 0;
    }
}

/* Auth Container */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border-top: 5px solid var(--primary-bordeaux);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h2 {
    color: var(--primary-bordeaux);
    font-weight: 600;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

/* Role Selection Tabs */
.role-selection {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: 30px;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--text-light);
    background: transparent;
}

.btn.active,
.btn:hover {
    background: var(--primary-bordeaux);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
}

/* Forms */
.form-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    background: #fcfcfc;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
    border-color: var(--primary-bordeaux);
    outline: none;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-bordeaux), var(--secondary-bordeaux));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(128, 0, 32, 0.4);
}

.hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-form:not(.hidden) {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1000px;
    width: 90%;
    margin: 40px auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    border-left: 5px solid var(--primary-bordeaux);
}

.header h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-bordeaux);
}

.header p {
    margin: 5px 0 0;
    color: var(--text-light);
}

.header .btn {
    border: 2px solid var(--primary-bordeaux);
    color: var(--primary-bordeaux);
}

.header .btn:hover {
    background: var(--primary-bordeaux);
    color: var(--white);
}

/* Tables */
.table-container {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    margin-top: 40px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Gap between rows */
}

th {
    text-align: left;
    padding: 15px 20px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

td {
    background: var(--white);
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-dark);
}

tr td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-left: 1px solid #f0f0f0;
}

tr td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-right: 1px solid #f0f0f0;
}

tr:hover td {
    background: #fff8f9;
    /* Light reddish tint */
    border-color: #ffe6ea;
}

.error-message {
    color: #d32f2f;
    font-size: 0.9em;
    margin-top: 10px;
    background: #ffebee;
    padding: 10px;
    border-radius: 8px;
}