/* assets/css/login.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-blue: #2563eb;
    --indigo: #4f46e5;
    --navy: #0f172a;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --danger: #ef4444;
    --success: #10b981;
}

/* ===== BASE ===== */
body {
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-x: hidden;
    position: relative;
}

/* ===== BOTH BACKGROUNDS — same blue ===== */
body.admin-bg,
body.staff-bg {
    background:
       radial-gradient(circle at 15% 25%, rgba(37,99,235,.12), transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(79,70,229,.12), transparent 30%),
        radial-gradient(circle at 50% 10%, rgba(59,130,246,.08), transparent 25%);
}

body.admin-bg::before,
body.staff-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(37,99,235,.12), transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(79,70,229,.12), transparent 30%),
        radial-gradient(circle at 50% 10%, rgba(59,130,246,.08), transparent 25%);
    pointer-events: none;
    z-index: 1;
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    background: rgba(255,255,255,0.92);
    border-radius: 24px;
    max-width: 860px;
    width: 100%;
    display: flex;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: slideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
    border: 1.5px solid rgba(147,197,253,0.5);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.8) inset,
        0 40px 80px -20px rgba(37,99,235,0.25),
        0 0 60px rgba(100,200,255,0.15);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== LEFT PANEL ===== */
.login-left {
    flex: 1.15;
    color: white;
    padding: 2rem 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(160deg, #1d4ed8 0%, #1e3a8a 45%, #312e81 100%);
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.22) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(255,255,255,.10) 0%, transparent 50%);
    pointer-events: none;
}

.login-left::after {
    content: '';
    position: absolute;
    inset: -60%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.1), transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,.07), transparent 40%);
    animation: rotate 50s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ===== LOGO ===== */
.logo-container {
    margin-bottom: 1.1rem;
    position: relative;
    z-index: 2;
}

.logo-circle {
    width: 90px;
    height: 90px;
    margin: 0 auto 0.75rem;
    position: relative;
    cursor: pointer;
}

.logo-circle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255,255,255,0.7), rgba(255,255,255,0.1), rgba(255,255,255,0.7));
    animation: spinRing 4s linear infinite;
    z-index: -1;
}

@keyframes spinRing {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.logo-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.5);
    box-shadow: 0 8px 30px rgba(0,0,0,0.35), 0 0 20px rgba(255,255,255,0.2);
    background: white;
    padding: 5px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.logo-circle:hover img {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(255,255,255,0.85);
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.85rem;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    background: linear-gradient(90deg, #fff 0%, #bfdbfe 40%, #fff 60%, #c7d2fe 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 4s linear infinite;
}

@keyframes textShimmer {
    to { background-position: 200% center; }
}

.brand-tagline {
    opacity: 0.85;
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 2;
    font-weight: 500;
    line-height: 1.4;
}

/* ===== FEATURES LIST ===== */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 2;
    position: relative;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 500;
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.features-list li:hover {
    transform: translateX(7px);
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.35);
}

.features-list i {
    background: rgba(255,255,255,0.25);
    padding: 0.4rem;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.features-list li:hover i {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

/* ===== ROLE BADGE ===== */
.role-badge {
    background: rgba(255,255,255,0.18);
    color: white;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
}
.role-badge i { font-size: 0.88rem; }

/* ===== RIGHT PANEL ===== */
.login-right {
    flex: 1;
    padding: 1.75rem 2rem;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 130px; height: 130px;
    background: radial-gradient(circle at top right, rgba(37,99,235,0.06), transparent 70%);
    pointer-events: none;
}

/* ===== HEADER ===== */
.login-header {
    text-align: left;
    margin-bottom: 1.25rem;
}

.login-header h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--slate-400);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

/* ===================================================
   FORM TOGGLE
   =================================================== */
.login-form-wrapper {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity    0.35s ease;
}

.login-form-wrapper.is-open {
    max-height: 600px;
    opacity: 1;
}

/* Trigger button */
.btn-show-login {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 2px solid rgba(37,99,235,0.2);
    background: linear-gradient(135deg, rgba(37,99,235,0.06) 0%, rgba(79,70,229,0.06) 100%);
    color: var(--primary-blue);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-show-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.btn-show-login:hover {
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(37,99,235,0.45);
}

.btn-show-login:hover::before { opacity: 1; }

.btn-show-login span,
.btn-show-login i { position: relative; z-index: 1; }

.btn-show-login .chevron {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-show-login.is-open .chevron {
    transform: rotate(180deg);
}

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.85rem 0 0.4rem;
    opacity: 0;
    transition: opacity 0.3s ease 0.15s;
    pointer-events: none;
}
.form-divider.is-open {
    opacity: 1;
    pointer-events: auto;
}
.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--slate-200);
}
.form-divider span {
    font-size: 0.7rem;
    color: var(--slate-400);
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ===== FORM FIELDS ===== */
.form-group {
    margin-bottom: 0.85rem;
    position: relative;
}

.form-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: var(--slate-500);
    margin-bottom: 0.35rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1.5px solid var(--slate-200);
    background: var(--slate-50);
    transition: all 0.25s ease;
    font-size: 0.88rem;
    color: var(--slate-800);
    font-family: 'Inter', sans-serif;
}

.form-control::placeholder { color: var(--slate-400); }

.form-control:focus {
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    transform: translateY(-1px);
    outline: none;
}

.form-control.is-invalid { border-color: var(--danger); background: #fff5f5; }
.invalid-feedback { color: var(--danger); font-size: 0.75rem; margin-top: 0.3rem; display: block; font-weight: 500; }

/* Password wrapper */
.password-wrapper { position: relative; }
.password-toggle {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--slate-400);
    cursor: pointer; padding: 5px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    z-index: 10;
}
.password-toggle:hover { color: var(--primary-blue); transform: translateY(-50%) scale(1.15); }

/* ===== ALERTS ===== */
.alert {
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    animation: slideDown 0.4s ease;
    font-size: 0.83rem;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert-danger  { background: #fef2f2; border: 1px solid #fee2e2; color: var(--danger); }
.alert-success { background: #f0fdf4; border: 1px solid #dcfce7; color: #166534; }
.alert i { font-size: 0.95rem; }
.alert .btn-close {
    margin-left: auto; background: transparent; border: none;
    color: currentColor; cursor: pointer; padding: 0.3rem;
    font-size: 0.8rem; transition: transform 0.3s ease;
}
.alert .btn-close:hover { transform: rotate(90deg); }

/* ===== SIGN IN BUTTON ===== */
.btn-login {
    width: 100%;
    padding: 0.7rem;
    border-radius: 10px;
    border: none;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.93rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 0.75rem 0 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
    box-shadow: 0 6px 18px -4px rgba(37,99,235,0.55);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}
.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -4px rgba(37,99,235,0.6);
}
.btn-login:hover::before { left: 100%; }
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-login.loading { pointer-events: none; opacity: 0.9; }
.btn-login.loading i { animation: spin 1s linear infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ===== CHECKBOXES ===== */
.form-check { display: flex; align-items: center; gap: 0.45rem; }
.form-check-input {
    width: 15px; height: 15px;
    border: 2px solid var(--slate-300);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}
.form-check-input:focus { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); outline: none; }
.form-check-label { color: var(--slate-600); font-size: 0.82rem; cursor: pointer; font-weight: 500; }

/* ===== LINKS ===== */
.forgot-link { text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: all 0.2s ease; color: var(--primary-blue); }
.forgot-link:hover { color: var(--indigo); text-decoration: underline; }

.role-switch-link { color: var(--slate-400); text-decoration: none; font-size: 0.82rem; font-weight: 500; transition: all 0.2s ease; }
.role-switch-link:hover { color: var(--primary-blue); text-decoration: underline; }

/* ===== SECURITY NOTE ===== */
.security-note {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    text-align: center;
    font-size: 0.73rem;
    color: var(--slate-500);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 500;
}
.security-note i { font-size: 0.85rem; }

/* ===================================================
   BUBBLES — blue for both pages, very visible
   =================================================== */
.bubble-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -150px;
    border-radius: 50%;
    animation: bubbleRise linear infinite;
}

.admin-bg .bubble,
.staff-bg .bubble {
    background: radial-gradient(circle at 32% 28%,
        rgba(255,255,255,1.0)   0%,
        rgba(147,197,253,0.85)  28%,
        rgba(59,130,246,0.5)    60%,
        rgba(29,78,216,0.2)     100%
    );
    border: 2px solid rgba(147,197,253,0.9);
    box-shadow:
        inset -4px -4px 10px rgba(29,78,216,0.25),
        inset  4px  4px 10px rgba(255,255,255,1.0),
        0 0 18px rgba(59,130,246,0.45),
        0 0 40px rgba(59,130,246,0.15);
}

.bubble::after {
    content: '';
    position: absolute;
    top: 16%; left: 20%;
    width: 28%; height: 28%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.4) 100%);
    filter: blur(1.5px);
}

.bubble::before {
    content: '';
    position: absolute;
    bottom: 22%; right: 18%;
    width: 14%; height: 14%;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    filter: blur(1px);
}

@keyframes bubbleRise {
    0%   { transform: translateX(0) translateY(0); opacity: 0; }
    6%   { opacity: 0.95; }
    85%  { opacity: 0.8; }
    100% { transform: translateX(var(--drift, 30px)) translateY(-115vh); opacity: 0; }
}

/* ===== WATER WAVES ===== */
.water-waves {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 140px;
    z-index: 5;
    pointer-events: none;
}
.water-wave { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; }
.admin-bg .water-wave path:first-child,
.staff-bg .water-wave path:first-child { fill: url(#waveGradient); }

/* ===== FLOATING PARTICLES ===== */
.floating-particles { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.particle { position: absolute; border-radius: 50%; opacity: 0.5; }
.particle-drop {
    width: 4px; height: 11px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(100,200,255,0.4));
    border-radius: 50% 50% 40% 40%;
}
.particle-shimmer {
    width: 3px; height: 3px;
    background: white;
    box-shadow: 0 0 8px 2px rgba(255,255,255,0.9);
    animation: shimmer 2s ease-in-out infinite;
}
.particle-soap {
    width: 6px; height: 6px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(200,220,255,0.4));
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 0 6px rgba(100,180,255,0.3);
}
@keyframes shimmer {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.4); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .login-container { max-width: 760px; }
    .login-left, .login-right { padding: 1.75rem; }
    .brand-name { font-size: 1.65rem; }
}

@media (max-width: 768px) {
    .login-container { flex-direction: column; max-width: 440px; }
    .login-left  { padding: 1.75rem 1.5rem; }
    .login-right { padding: 1.75rem 1.5rem; }
    .logo-circle { width: 78px; height: 78px; }
    .brand-name  { font-size: 1.5rem; }
    .features-list li { padding: 0.45rem 0.75rem; }
    .login-form-wrapper.is-open { max-height: 700px; }
}

@media (max-width: 480px) {
    body { padding: 8px; }
    .login-left, .login-right { padding: 1.4rem 1.1rem; }
    .login-header h3 { font-size: 1.35rem; }
    .brand-name { font-size: 1.35rem; }
    .btn-login { padding: 0.65rem; font-size: 0.9rem; }
}
