/* ═══════════════════════════════════════════════════════════════════════════
   BHAGAT CAKE - Admin Login
   Theobroma Style • Clean • Modern
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --font-primary: "Figtree", "Open Sans", "Helvetica Neue Light", Helvetica, Arial, sans-serif;
    --primary: #3BBFAD;
    --primary-dark: #2A9D8F;
    --primary-light: #5DD3C3;
    --header-bg: #1A3A34;
    --text-dark: #1A202C;
    --text-body: #4A5568;
    --text-muted: #718096;
    --bg-white: #FFFFFF;
    --bg-gray: #F7FAFC;
    --bg-light: #FAFAFA;
    --border: #E2E8F0;
    --border-light: #EDF2F7;
    --success: #22C55E;
    --danger: #EF4444;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--header-bg) 0%, #0D1F1C 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 191, 173, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(59, 191, 173, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(59, 191, 173, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Floating Elements */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.float {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: var(--primary);
    animation: floating 20s infinite ease-in-out;
}

.float-1 {
    width: 400px;
    height: 400px;
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.float-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -10%;
    animation-delay: 3s;
}

.float-3 {
    width: 250px;
    height: 250px;
    bottom: -5%;
    left: 20%;
    animation-delay: 6s;
}

.float-4 {
    width: 200px;
    height: 200px;
    top: 30%;
    left: 50%;
    animation-delay: 2s;
}

.float-5 {
    width: 350px;
    height: 350px;
    bottom: 10%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes floating {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 1;
}

.login-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

/* Login Card */
.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 191, 173, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.brand-mark-lg {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(59, 191, 173, 0.3);
    position: relative;
}

.mark-glow {
    position: absolute;
    inset: -6px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    opacity: 0.3;
    filter: blur(12px);
    z-index: -1;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 16px;
    font-weight: 500;
}

.header-underline {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    margin: 0 auto;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-control {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: all var(--transition);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 191, 173, 0.15);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 48px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    color: var(--text-muted);
    transition: all var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

/* Checkbox Group */
.checkbox-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-body);
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(59, 191, 173, 0.35);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 191, 173, 0.45);
}

.btn-login:active {
    transform: translateY(0);
}

/* Messages */
.login-messages {
    min-height: 20px;
    margin-top: 8px;
}

.text-danger {
    color: var(--danger);
    font-weight: 600;
    font-size: 0.85rem;
    animation: shake 0.5s ease-in-out;
}

.text-success {
    color: var(--success);
    font-weight: 600;
    font-size: 0.85rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.d-none { display: none !important; }
.small { font-size: 0.85rem; }

/* Footer */
.login-footer {
    text-align: center;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Info Card */
.info-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    animation: slideInRight 0.6s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 191, 173, 0.5), transparent);
}

.info-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.info-card h3 {
    font-size: 1.5rem;
    color: white;
    margin: 0 0 12px;
    font-weight: 700;
}

.info-card p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 28px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature {
    padding: 14px 18px;
    background: rgba(59, 191, 173, 0.15);
    border: 1px solid rgba(59, 191, 173, 0.25);
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    text-align: left;
}

.feature:hover {
    transform: translateX(6px);
    background: rgba(59, 191, 173, 0.25);
}

/* Back to Menu Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    margin-top: 24px;
    transition: all var(--transition);
}

.back-link:hover {
    color: var(--primary-light);
}

/* Decorative shapes - hidden for cleaner look */
.shape, .card-border { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .login-shell {
        gap: 32px;
    }
    
    .login-card {
        padding: 40px;
    }
    
    .info-card {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .login-shell {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 440px;
        margin: 0 auto;
    }
    
    .login-card {
        padding: 32px 28px;
        order: 1;
    }
    
    .brand-mark-lg {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .info-card {
        display: none;
    }
    
    .float {
        opacity: 0.04;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    
    .login-card {
        padding: 28px 24px;
        border-radius: var(--radius-md);
    }
    
    .login-header {
        margin-bottom: 28px;
    }
    
    .brand-mark-lg {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
    
    .login-title {
        font-size: 1.35rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .btn-login {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .float {
        display: none;
    }
}

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Button Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-login:disabled {
    opacity: 0.85;
    cursor: not-allowed;
}
