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

:root {
    --bg-color: #000000;
    --card-bg: #0a0a0a;
    --primary-color: #DC2726;
    /* Crimson Red */
    --primary-hover: #b91d1d;
    --text-color: #ffffff;
    --text-muted: #888888;
    --gray: #333333;
    --black: #000000;
    --input-bg: #111111;
    --border-color: #DC2726;
    /* Red Borders */
    --success: #28a745;
    --error: #dc3545;
    --glow: 0 0 20px rgba(220, 39, 38, 0.4);
    --shadow-red: 0 10px 30px rgba(220, 39, 38, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    font-family: 'Outfit', 'Nunito', sans-serif;
    background: radial-gradient(circle at center, #1a0000 0%, #0a0a0a 100%);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(220, 39, 38, 0.15);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(220, 39, 38, 0.05);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
    display: contents;
}

.navbar-logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
}

.navbar-logo-img {
    height: 75px;
    width: auto;
}

/* Auth Page Logo Customization */
.auth-container .logo {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.auth-container .navbar-logo-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Text starts from left edge of logo */
    gap: 2px;
}

.auth-container .navbar-logo-text {
    font-size: 2rem;
    margin-top: -5px;
    margin-left: 0px;
}

.navbar-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

/* Specific logo text style for Dashboard and Settings */
.dashboard-body .navbar-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    align-self: center;
    margin-top: auto;
}


.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
    align-self: center;
}


.logo span {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(220, 39, 38, 0.5);
}

h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 15px;
    background-color: var(--input-bg);
    border: 1px solid var(--gray);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    height: 95px;
    resize: none;

}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(220, 39, 38, 0.3);
    background-color: #000;
}

.btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Adjust margin for QR Download button specifically */
.dashboard-section .qr-download-btn {
    margin-top: -5px;
}

.btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 25px rgba(220, 39, 38, 0.6);
    transform: scale(1.02);
}

.btn:active {
    transform: scale(0.98);
}

.auth-links {
    margin-top: 25px;
    text-align: left;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
    color: #fff;
}

.alert {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
    overflow: hidden;
    /* Important for smooth height shrinking */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.5s ease-out forwards;
}

/* Class added via JS to trigger the fluid exit */
.alert.alert-hide {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.alert-error {
    background-color: rgba(220, 39, 38, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

/* Dashboard Styles */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    padding: 20px 40px;
    align-items: center;
    /* Center the content */
    justify-content: flex-start;
}

.navbar {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--gray);
    padding: 5px 0;
}

.user-welcome {
    font-size: 0.95rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-right: 15px;
}

.user-welcome strong {
    color: var(--text-color);
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a i {
    color: var(--primary-color);
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Navbar Responsiveness */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding-bottom: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .nav-links a {
        margin-left: 0;
        background: rgba(255, 255, 255, 0.03);
        padding: 8px 15px;
        border-radius: 8px;
        font-size: 0.85rem;
    }

    .user-welcome {
        margin-right: 0;
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        width: calc(50% - 10px);
        justify-content: center;
    }

    .user-welcome {
        font-size: 0.85rem;
    }
}

.dashboard-card {
    width: 100%;
    max-width: 100%;
    margin: -15px auto;

}

.card {
    background-color: var(--card-bg);
    border: 0.1px solid var(--border-color);
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-red);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2.5px);
    box-shadow: 0 15px 40px rgba(220, 39, 38, 0.4), var(--glow);
}