/* Premium Modern Light Theme Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --input-focus: rgba(79, 70, 229, 0.15);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
}

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

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Base Layout & Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--text-primary);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

.nav-links .active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 4px;
}

/* Main Container */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

/* Flash Messages */
.flash-container {
    position: fixed;
    top: 5rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    width: 100%;
}

.flash-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.flash-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.flash-warning {
    background: #fffbef;
    border-color: #fef08a;
    color: #854d0e;
}

.flash-close {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

/* Card Panel Container */
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.4s ease-out forwards;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--input-focus);
    background: #ffffff;
}

.error-feedback {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: block;
}

/* Password Strength Indicator */
.password-requirements {
    margin-top: 0.75rem;
    background: #f8fafc;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
}

.requirement-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    transition: color 0.2s;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-item.valid {
    color: var(--success);
    font-weight: 500;
}

.requirement-item::before {
    content: "●";
    font-size: 0.5rem;
}

.requirement-item.valid::before {
    content: "✓";
    font-size: 0.75rem;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

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

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

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

/* Footer / Extra Options */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

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

/* Responsive Grid / Dashboard Elements */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.card h3 {
    margin-bottom: 0.85rem;
    font-size: 1.15rem;
    color: var(--text-primary);
}

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media(max-width: 580px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
}
