/* assets/css/style.css - Premium Elegant Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* =========================================
   Reset & Base Variables
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
    /* Refined Color Palette */
    --primary: #0F172A;
    --primary-hover: #334155;
    --accent: #6366F1;
    --accent-light: #EEF2FF;

    --success: #059669;
    --success-bg: #D1FAE5;
    --danger: #DC2626;
    --danger-bg: #FEE2E2;

    /* Grays & Neutrals */
    --bg-color: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border-light: #E2E8F0;
    --border-focus: #CBD5E1;

    /* Soft, multi-layered shadows */
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-input: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-btn: 0 4px 14px 0 rgba(15, 23, 42, 0.15);
}

/* =========================================
   Body & Grid Background
   ========================================= */
body {
    background-color: #FAFAFA;
    /* Elegant subtle grid */
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;

    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-main);
}

body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* =========================================
   Container & Card (Glassmorphism)
   ========================================= */
.container {
    width: 100%;
    max-width: 420px;
    perspective: 1000px;
}

.auth-wrapper {
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow: var(--shadow-glass);
}

/* =========================================
   Typography & Header
   ========================================= */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-header h1 {
    font-size: 26px;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* =========================================
   Forms & Inputs
   ========================================= */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-main);
    box-shadow: var(--shadow-input);
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
    background: #FFFFFF;
}

.form-group input::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.01em;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 8px;
}

.btn-primary,
.btn-success {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover,
.btn-success:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(15, 23, 42, 0.2);
}

.btn-primary:active,
.btn-success:active {
    transform: translateY(0);
}

/* =========================================
   Auth Switch Links
   ========================================= */
.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.auth-switch a:hover {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* =========================================
   Alerts / Flash Messages
   ========================================= */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 28px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.4s ease;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(167, 243, 208, 0.5);
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(254, 202, 202, 0.5);
}

.alert-dismissible .close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 4px;
    transition: opacity 0.2s;
}

.alert-dismissible .close:hover {
    opacity: 1;
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 640px) {
    .auth-card {
        padding: 36px 24px;
        border-radius: 24px;
    }

    .auth-header h1 {
        font-size: 24px;
    }
}