/* ==========================================================================
   Hop In Group - Admin Glassmorphism & Claymorphism Hybrid Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;1,400&display=swap');

:root {
    /* Color Palette */
    --bg-dark-1: #060911;
    --bg-dark-2: #0f172a;
    --bg-dark-3: #131c31;
    
    --gold-primary: #d4af37;
    --gold-light: #f5d77f;
    --gold-dark: #aa841c;
    --gold-glow: rgba(212, 175, 55, 0.35);
    
    --glass-bg: rgba(18, 26, 45, 0.58);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-border-focus: rgba(212, 175, 55, 0.6);
    
    --clay-bg: #182238;
    --clay-surface: #1e2942;
    --clay-shadow-outer: 20px 24px 48px rgba(0, 0, 0, 0.65), -12px -12px 32px rgba(255, 255, 255, 0.025);
    --clay-shadow-inner: inset -5px -5px 12px rgba(255, 255, 255, 0.12), inset 5px 5px 14px rgba(0, 0, 0, 0.5);
    --clay-input-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.55), inset -3px -3px 8px rgba(255, 255, 255, 0.07);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-gold: #e6c566;
    
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-full: 9999px;
    
    --transition-smooth: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark-1);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 1.5rem;
}

/* ==========================================================================
   Background Canvas & Ambient Glowing Blobs
   ========================================================================== */

.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, var(--bg-dark-3) 0%, var(--bg-dark-1) 80%);
}

.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    pointer-events: none;
    will-change: transform;
}

.blob-1 {
    top: -10%;
    left: 15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, rgba(170, 132, 28, 0.05) 70%);
    animation: floatBlob1 18s ease-in-out infinite alternate;
}

.blob-2 {
    bottom: -15%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(30, 58, 138, 0.05) 70%);
    animation: floatBlob2 22s ease-in-out infinite alternate;
}

.blob-3 {
    top: 40%;
    left: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(88, 28, 135, 0.05) 70%);
    animation: floatBlob3 15s ease-in-out infinite alternate;
}

@keyframes floatBlob1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 80px) scale(1.15); }
    100% { transform: translate(-40px, 40px) scale(0.95); }
}

@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, -60px) scale(1.1); }
    100% { transform: translate(50px, -100px) scale(0.9); }
}

@keyframes floatBlob3 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, -50px) scale(1.2); }
    100% { transform: translate(30px, 70px) scale(1); }
}

/* Ambient Grid pattern overlay */
.ambient-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 75%);
    pointer-events: none;
}

/* ==========================================================================
   Main Glass & Clay Container
   ========================================================================== */

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    perspective: 1000px;
}

.login-card {
    /* Glassmorphism Base */
    background: var(--glass-bg);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    
    /* Claymorphism 3D Tactile Depth */
    box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
    
    padding: 2.75rem 2.25rem 2.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 40%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 60%
    );
    pointer-events: none;
    transform: rotate(-15deg);
}

/* Glow ring top highlight */
.card-top-glow {
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    opacity: 0.7;
    box-shadow: 0 0 15px var(--gold-primary);
}

/* ==========================================================================
   Header & Branding Section
   ========================================================================== */

.brand-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.brand-logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(18, 26, 45, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.45),
        -4px -4px 10px rgba(255, 255, 255, 0.1),
        inset -2px -2px 6px rgba(0, 0, 0, 0.5),
        inset 2px 2px 6px rgba(255, 255, 255, 0.2);
    margin-bottom: 1.25rem;
    position: relative;
    transition: var(--transition-smooth);
}

.brand-logo-container:hover {
    transform: translateY(-3px) rotate(3deg);
    border-color: var(--gold-light);
    box-shadow: 
        12px 14px 24px rgba(0, 0, 0, 0.55),
        0 0 25px var(--gold-glow);
}

.brand-logo-icon {
    width: 38px;
    height: 38px;
    fill: var(--gold-primary);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.brand-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.brand-title span {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* ==========================================================================
   Alert Messages
   ========================================================================== */

.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    animation: alertSlideDown 0.4s ease-out;
}

@keyframes alertSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    box-shadow: inset 2px 2px 6px rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    box-shadow: inset 2px 2px 6px rgba(16, 185, 129, 0.2);
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Claymorphic & Glass Form Elements
   ========================================================================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-left: 0.3rem;
    transition: var(--transition-fast);
}

.form-group:focus-within .form-label {
    color: var(--gold-light);
}

.input-clay-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.1rem;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition-fast);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.95rem 1.1rem 0.95rem 3rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    
    /* Claymorphic inset shadow + Glass background */
    background: rgba(12, 18, 32, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--clay-input-shadow);
    
    outline: none;
    transition: var(--transition-fast);
}

.form-input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.form-input:focus {
    background: rgba(15, 23, 42, 0.85);
    border-color: var(--glass-border-focus);
    box-shadow: 
        var(--clay-input-shadow),
        0 0 18px var(--gold-glow);
}

.form-group:focus-within .input-icon {
    color: var(--gold-primary);
}

/* Password Toggle Button */
.password-toggle-btn {
    position: absolute;
    right: 0.85rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.password-toggle-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

/* Form Helper Row (Remember Me & Forgot Link) */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.1rem;
    margin-bottom: 0.5rem;
}

/* Claymorphic Switch / Checkbox */
.remember-me-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-me-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(12, 18, 32, 0.8);
    border: 1px solid var(--glass-border);
    box-shadow: var(--clay-input-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.remember-me-label input[type="checkbox"]:checked + .custom-checkbox {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    border-color: var(--gold-light);
    box-shadow: 0 0 10px var(--gold-glow);
}

.custom-checkbox-icon {
    width: 14px;
    height: 14px;
    color: #0d1322;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-fast);
}

.remember-me-label input[type="checkbox"]:checked + .custom-checkbox .custom-checkbox-icon {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--text-gold);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.forgot-link:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* ==========================================================================
   Claymorphic Tactile Action Button
   ========================================================================== */

.btn-clay-submit {
    position: relative;
    width: 100%;
    padding: 1.05rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #0b111e;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-lg);
    
    /* Clay 3D Pill Gradient */
    background: linear-gradient(135deg, #f6e095 0%, #d4af37 60%, #b88e1e 100%);
    
    /* Clay Outer + Inner Shadows for 3D Volume */
    box-shadow: 
        0 12px 24px rgba(212, 175, 55, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset -4px -4px 8px rgba(138, 98, 12, 0.6),
        inset 4px 4px 8px rgba(255, 255, 255, 0.7);
        
    transition: var(--transition-smooth);
    overflow: hidden;
}

.btn-clay-submit:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 
        0 18px 32px rgba(212, 175, 55, 0.45),
        0 6px 12px rgba(0, 0, 0, 0.5),
        inset -4px -4px 8px rgba(138, 98, 12, 0.6),
        inset 4px 4px 8px rgba(255, 255, 255, 0.85);
}

.btn-clay-submit:active {
    transform: translateY(2px) scale(0.985);
    box-shadow: 
        0 4px 10px rgba(212, 175, 55, 0.25),
        inset 4px 4px 8px rgba(100, 70, 8, 0.7),
        inset -2px -2px 4px rgba(255, 255, 255, 0.4);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    z-index: 2;
}

.btn-arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-clay-submit:hover .btn-arrow-icon {
    transform: translateX(4px);
}

/* ==========================================================================
   Footer & Demo Tooltip Box
   ========================================================================== */

.demo-credentials-box {
    margin-top: 1.75rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.demo-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.demo-title {
    font-weight: 600;
    color: var(--text-gold);
}

.demo-fill-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.demo-fill-btn:hover {
    background: var(--gold-primary);
    color: #0b111e;
    border-color: var(--gold-light);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.6);
}

.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--text-gold);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2.25rem 1.5rem 1.75rem;
        border-radius: 24px;
    }
    
    .brand-title {
        font-size: 1.6rem;
    }
    
    .brand-logo-container {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }
    
    .brand-logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .form-input {
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
        font-size: 0.9rem;
    }
    
    .btn-clay-submit {
        padding: 0.95rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .demo-credentials-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    
    .demo-fill-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 1.75rem 1.15rem 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}
