/* SBM Foods — Cinematic Masala Jar Login Engine Stylesheet */
:root {
    --login-emerald-dark: #071A14;
    --login-emerald-mid: #0E2E25;
    --login-emerald-light: #18483B;
    --spice-turmeric: #F59E0B;
    --spice-saffron: #EA580C;
    --spice-chilli: #DC2626;
    --jar-glass-bg: rgba(255, 255, 255, 0.12);
    --jar-glass-border: rgba(255, 255, 255, 0.25);
}

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

body.masala-login-body {
    background: radial-gradient(circle at 50% 20%, #174E3E 0%, #0C281F 50%, #061510 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    color: #F8FAFC;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* Background Ambient Glow & Floating Spice Dust */
.login-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(220, 38, 38, 0.05) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    filter: blur(40px);
}

.masala-login-card {
    position: relative;
    z-index: 10;
    background: rgba(15, 35, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(245, 158, 11, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Masala Jar Illustration Container */
.masala-jar-stage {
    position: relative;
    width: 140px;
    height: 170px;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* The Interactive Jar Cap */
.jar-cap-wrapper {
    position: absolute;
    top: 6px;
    z-index: 15;
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
}

.jar-cap-svg {
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* The Glass Spice Jar Body */
.jar-body-wrapper {
    position: absolute;
    bottom: 8px;
    z-index: 10;
    transition: transform 0.3s ease;
}

.jar-body-svg {
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
}

/* Aroma Steam / Spice Particles */
.jar-spice-aroma {
    position: absolute;
    top: -10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.aroma-particle {
    width: 6px;
    height: 6px;
    background: #FBBF24;
    border-radius: 50%;
    box-shadow: 0 0 8px #F59E0B;
}

/* States & Interactive Animation Classes */

/* 1. Username Focus -> Cap gently lifts and tilts */
.jar-cap-lifted {
    transform: translateY(-24px) rotate(-12deg) scale(1.05);
}
.jar-cap-lifted + .jar-spice-aroma,
.jar-stage-lifted .jar-spice-aroma {
    opacity: 1;
    animation: aromaFloat 1.8s infinite ease-in-out;
}

/* 2. Password Focus -> Cap tightly sealed */
.jar-cap-sealed {
    transform: translateY(4px) scale(0.98);
}
.jar-stage-sealed .jar-cap-svg path.cap-ring {
    stroke: #10B981;
    stroke-width: 3;
}

/* 3. Submitting Authentication -> Rotating Cap & Ambient Pulse */
.jar-stage-authenticating .jar-cap-wrapper {
    animation: capSpinPulse 1.2s infinite ease-in-out;
}
.jar-stage-authenticating .jar-body-wrapper {
    animation: jarPulse 1.2s infinite ease-in-out;
}

/* 4. Error Shake */
.jar-stage-error {
    animation: jarShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes aromaFloat {
    0%, 100% {
        transform: translateY(0) scale(0.8);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-12px) scale(1.2);
        opacity: 0.9;
    }
}

@keyframes capSpinPulse {
    0% {
        transform: translateY(-12px) rotate(0deg);
        filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
    }
    50% {
        transform: translateY(-18px) rotate(180deg);
        filter: drop-shadow(0 0 20px rgba(245, 158, 11, 1));
    }
    100% {
        transform: translateY(-12px) rotate(360deg);
        filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
    }
}

@keyframes jarPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@keyframes jarShake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Form Styles */
.masala-form-group {
    width: 100%;
    margin-bottom: 1.25rem;
    text-align: left;
}

.masala-form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #E2E8F0;
    margin-bottom: 0.4rem;
}

.masala-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.25s ease;
    outline: none;
}

.masala-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.masala-submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #0A1D16;
    font-weight: 800;
    font-size: 0.9375rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.masala-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, #FBBF24 0%, #EA580C 100%);
}

.masala-submit-btn:active {
    transform: translateY(1px);
}

/* Role Quick Fill Buttons */
.role-picker {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.role-picker-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94A3B8;
    text-align: center;
    margin-bottom: 0.75rem;
}

.role-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.role-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #E2E8F0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.role-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #F59E0B;
    color: #FDE68A;
}
