/* =====================================================
   Digital Menu Book — Auth Pages (Login & Signup)
   Premium navy + orange SaaS design
   ===================================================== */

:root {
    --navy:        #0F172A;
    --navy-dark:   #020617;
    --navy-light:  #1E293B;
    --orange:      #FF6B35;
    --orange-dark: #e55a2b;
    --orange-glow: rgba(255,107,53,0.15);
    --green:       #00D4AA;
    --text:        #1A202C;
    --text-muted:  #718096;
    --border:      #E2E8F0;
    --white:       #ffffff;
    --danger:      #E53E3E;
    --success:     #38A169;
    --radius:      10px;
    --radius-lg:   16px;
    --transition:  0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--navy-dark);
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* =====================================================
   WRAPPER
   ===================================================== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* =====================================================
   LEFT PANEL — Pure CSS premium design
   ===================================================== */
.auth-left {
    width: 46%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, var(--navy) 0%, #172336 40%, var(--navy-light) 80%, var(--navy) 100%);
}

/* Subtle dot grid background */
.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Orange radial glow */
.auth-left::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,107,53,0.12) 0%, transparent 60%);
    pointer-events: none;
}

/* Teal glow bottom-left */
.auth-left-glow {
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,212,170,0.07) 0%, transparent 60%);
    pointer-events: none;
}

.auth-panel-top,
.auth-panel-center,
.auth-panel-bottom {
    position: relative;
    z-index: 2;
}

/* ---- Top: Logo ---- */
.auth-panel-top {
    padding: 50px 60px 0;
}

.auth-logo {
    height: 38px;
    width: auto;
    display: block;
    opacity: 1;
}

/* ---- Center: Content ---- */
.auth-panel-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 60px;
    z-index: 2;
}

/* ---- Bottom: Animation container ---- */
.auth-panel-bottom {
    flex: 1.1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 0 40px;
}

/* Badge */
.auth-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,107,53,0.12);
    border: 1px solid rgba(255,107,53,0.3);
    color: #ffb89a;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 6px;
    margin-bottom: 30px;
    width: fit-content;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.auth-panel-badge i { font-size: 11px; color: var(--orange); }

/* Title */
.auth-panel-title {
    font-size: 44px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.12;
    letter-spacing: -1.2px;
    margin-bottom: 20px;
}

.auth-panel-title span { color: var(--orange); }

/* Subtitle */
.auth-panel-sub {
    font-size: 17px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 420px;
}

/* ---- 3D Tablet Dashboard Animation Elements ---- */
.auth-hero-animation {
    width: 100%;
    margin-top: 40px;
    margin-bottom: -50px; /* Bleeds off the bottom to look larger and anchored */
    perspective: 1200px;
    display: flex;
    justify-content: center;
}

@media (max-width: 767px) {
    .auth-hero-animation { display: none !important; }
}

.anim-tablet-wrapper {
    width: 320px;
    height: 220px;
    transform-style: preserve-3d;
    animation: tabletHover 8s ease-in-out infinite;
}

/* Scale up the tablet immensely for a premium realistic hero look */
@keyframes tabletHover {
    0%, 100% { transform: scale(1.45) rotateX(15deg) rotateY(-15deg) rotateZ(5deg) translateY(0px); }
    50% { transform: scale(1.45) rotateX(15deg) rotateY(-15deg) rotateZ(5deg) translateY(-15px); }
}

.anim-tablet {
    width: 100%;
    height: 100%;
    background: #1e293b;
    border-radius: 20px;
    position: relative;
    box-shadow: 
        inset 0 0 0 2px #334155,
        -10px 20px 30px rgba(0,0,0,0.5),
        -5px 10px 15px rgba(0,0,0,0.3);
    padding: 8px; /* bezel */
}

/* glare */
.anim-tablet::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(105deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.05) 45%, rgba(255,255,255,0) 55%);
    pointer-events: none;
    z-index: 100;
}

.tablet-screen {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dashboard UI */
.dash-hdr {
    height: 32px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}
.dash-logo {
    width: 60px; height: 8px; background: #cbd5e1; border-radius: 4px;
}
.dash-user {
    width: 16px; height: 16px; background: #FF6B35; border-radius: 50%;
}

.dash-body {
    flex: 1;
    display: flex;
    padding: 10px;
    gap: 10px;
}

.dash-side {
    width: 40px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ds-item {
    height: 6px; background: #e2e8f0; border-radius: 3px;
}
.ds-item.active { background: #FF6B35; width: 80%; }

.dash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-cards {
    display: flex;
    gap: 10px;
}
.d-card {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    height: 36px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 0 6px;
    gap: 6px;
}
.d-card i { font-size: 10px; }
.d-card-line { height: 4px; border-radius: 2px; background: #cbd5e1; flex: 1; }

.dash-chart {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-end;
    padding: 10px;
    gap: 6px;
    justify-content: center;
}

.c-bar {
    width: 14px;
    background: #00D4AA;
    border-radius: 3px 3px 0 0;
    animation: barGrow 8s infinite;
    transform-origin: bottom;
}

@keyframes barGrow {
    0%, 25% { transform: scaleY(0.1); }
    30%, 100% { transform: scaleY(1); }
}

/* Dashboard Lock Overlay */
.dash-login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,37,64,0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: unlockDash 8s infinite;
}

.dash-login-overlay .lock-icon {
    font-size: 24px;
    color: #fff;
    margin-bottom: 10px;
    animation: lockIconStatus 8s infinite;
}

.auth-line-wrap {
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.auth-loader-line {
    width: 30px;
    height: 100%;
    background: #FFB800;
    border-radius: 2px;
    animation: authLoad 8s infinite;
}

/* Notification Popup */
.dash-alert {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    transform: translateY(20px);
    animation: orderAlert 8s infinite;
}
.dash-alert-icon {
    width: 20px; height: 20px; background: #00D4AA; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 10px;
}
.dash-alert-text .l1 { font-size: 9px; font-weight: 700; color: #0A2540; line-height: 1.2; }
.dash-alert-text .l2 { font-size: 7px; color: #718096; }

/* Animations Keyframes for Tablet Dashboard */
@keyframes unlockDash {
    0%, 15% { opacity: 1; backdrop-filter: blur(4px); visibility: visible; }
    20%, 25% { opacity: 0; backdrop-filter: blur(0px); visibility: hidden; }
    85%, 90% { opacity: 0; backdrop-filter: blur(0px); visibility: hidden; }
    95%, 100% { opacity: 1; backdrop-filter: blur(4px); visibility: visible; }
}

@keyframes authLoad {
    0%, 5% { transform: translateX(-30px); }
    15% { transform: translateX(80px); }
    20%, 100% { transform: translateX(80px); }
}

@keyframes orderAlert {
    0%, 35% { opacity: 0; transform: translateY(20px); }
    40%, 80% { opacity: 1; transform: translateY(0); }
    85%, 100% { opacity: 0; transform: translateY(20px); }
}

@keyframes lockIconStatus {
    0%, 12% { transform: scale(1); color: #fff;}
    15% { transform: scale(1.2); color: #00D4AA; } /* unlocked green briefly */
    20%, 100% { transform: scale(1); color: #fff;}
}

/* ---- SVG Feature Grid (Signup Left Panel) ---- */
.fpa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
}

.fpa-grid-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.fpa-grid-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Subtle glass sweep effect on hover */
.fpa-grid-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: none;
}
.fpa-grid-card:hover::after {
    animation: authCardSweep 1.5s infinite;
}
@keyframes authCardSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

.fpa-grid-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fpa-grid-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
}

.fpa-grid-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    letter-spacing: -0.2px;
}

.fpa-grid-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    line-height: 1.4;
}

/* Color Themes for Grid Icons */
.fpa-grid-icon.orange { background: rgba(255,107,53,0.15); color: var(--orange); border: 1px solid rgba(255,107,53,0.3); }
.fpa-grid-icon.teal   { background: rgba(0,212,170,0.15); color: var(--green); border: 1px solid rgba(0,212,170,0.3); }
.fpa-grid-icon.blue   { background: rgba(59,130,246,0.15); color: #60A5FA; border: 1px solid rgba(59,130,246,0.3); }
.fpa-grid-icon.purple { background: rgba(168,85,247,0.15); color: #C084FC; border: 1px solid rgba(168,85,247,0.3); }

/* ---- Micro-Animations ---- */
/* 1. Menu Pulse Line */
.fpa-pulse-line {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: menuDrawDash 3s ease-in-out infinite alternate;
}
@keyframes menuDrawDash {
    0%, 20% { stroke-dashoffset: 40; }
    80%, 100% { stroke-dashoffset: 0; }
}

/* 2. Lightning Bolt float & glow */
.fpa-grid-card:hover .fpa-bolt {
    animation: boltFlash 1.5s ease-in-out infinite;
}
@keyframes boltFlash {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 6px var(--green)); }
}

/* 3. Paper Print sliding out */
.fpa-print-out {
    transform-origin: top;
    animation: printSlideDown 3s infinite;
}
@keyframes printSlideDown {
    0%, 20% { transform: scaleY(0); }
    40%, 80% { transform: scaleY(1); }
    90%, 100% { transform: scaleY(0); }
}

/* 4. Headset bobbing slightly */
.fpa-headset-band { transform-origin: bottom; }
.fpa-grid-card:hover .fpa-headset-band,
.fpa-grid-card:hover .fpa-headset-mic {
    animation: headsetBob 2s ease-in-out infinite;
}
@keyframes headsetBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* ---- Bottom: Stats ---- */
.auth-panel-bottom {
    padding: 24px 44px 32px;
    display: flex;
    align-items: center;
}

.auth-stat {
    flex: 1;
    text-align: center;
}

.auth-stat-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
    line-height: 1;
    margin-bottom: 4px;
}

.auth-stat-num span {
    color: var(--orange);
    font-size: 16px;
}

.auth-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.auth-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

/* =====================================================
   RIGHT PANEL — Form
   ===================================================== */
.auth-right {
    flex: 1;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    overflow-y: auto;
}

.auth-form-wrap {
    width: 100%;
    max-width: 610px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
    transition: var(--transition);
}
.auth-back:hover { color: var(--navy); }

.auth-form-header { margin-bottom: 28px; }

.auth-form-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* ---- Form elements ---- */
.auth-field { margin-bottom: 18px; }

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    overflow: hidden;
}

.auth-input-wrap:focus-within {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.12);
}

.auth-input-icon {
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
    transition: var(--transition);
}

.auth-input-wrap:focus-within .auth-input-icon { color: var(--orange); }

.auth-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text);
    padding: 12px 14px 12px 0;
    min-width: 0;
}

.auth-input::placeholder { color: #bdc8d4; }

.auth-pw-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0 14px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    height: 100%;
    transition: var(--transition);
    flex-shrink: 0;
}
.auth-pw-toggle:hover { color: var(--navy); }

/* Select */
.auth-select {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text);
    padding: 12px 14px 12px 0;
    min-width: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.auth-select-caret {
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
    flex-shrink: 0;
}

/* Field errors */
.auth-field-error {
    display: none;
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
    font-weight: 500;
}

.auth-field.has-error .auth-field-error { display: block; }
.auth-field.has-error .auth-input-wrap  { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229,62,62,0.1); }

/* Password strength */
.pw-strength-wrap { margin-top: 6px; display: none; }

.pw-strength-bar {
    height: 3px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pw-strength-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.4s ease, background 0.4s ease;
    width: 0;
}

.pw-strength-label { font-size: 11px; color: var(--text-muted); }

/* Two-col row */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Checkbox */
.auth-check-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-check-wrap input[type="checkbox"] {
    width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
    accent-color: var(--orange); cursor: pointer;
}

.auth-check-wrap label { font-size: 13px; color: var(--text-muted); cursor: pointer; line-height: 1.5; }
.auth-check-wrap a { color: var(--orange); font-weight: 600; }
.auth-check-wrap a:hover { text-decoration: underline; }

/* Options row */
.auth-options {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; gap: 10px;
}

.auth-options label {
    font-size: 13px; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; gap: 7px;
}

.auth-options input[type="checkbox"] { accent-color: var(--orange); }
.auth-forgot { font-size: 13px; color: var(--orange); font-weight: 600; transition: var(--transition); }
.auth-forgot:hover { color: var(--orange-dark); }

/* Submit */
.auth-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 24px;
    background: var(--orange); color: var(--white); border: none;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: var(--transition); margin-bottom: 20px;
}

.auth-submit:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(255,107,53,0.38);
}

.auth-submit:active  { transform: none; }
.auth-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-submit .spinner {
    display: none; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite;
}

.auth-submit.loading .spinner   { display: block; }
.auth-submit.loading .btn-label { display: none; }

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

/* Alt link */
.auth-alt-link { text-align: center; font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.auth-alt-link a { color: var(--orange); font-weight: 700; transition: var(--transition); }
.auth-alt-link a:hover { color: var(--orange-dark); }

/* Alerts */
.auth-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 13px 16px; border-radius: var(--radius);
    font-size: 13px; font-weight: 500; margin-bottom: 20px; line-height: 1.5;
}

.auth-alert.error   { background: rgba(229,62,62,0.08); color: var(--danger);  border: 1px solid rgba(229,62,62,0.2); }
.auth-alert.success { background: rgba(56,161,105,0.08); color: var(--success); border: 1px solid rgba(56,161,105,0.2); }
.auth-alert i { font-size: 15px; margin-top: 1px; flex-shrink: 0; }

/* Section label */
.auth-section-label {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}
.auth-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Footer */
.auth-footer {
    text-align: center; font-size: 12px; color: var(--text-muted);
    padding-top: 16px; border-top: 1px solid var(--border);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1100px) {
    .auth-left { width: 42%; }
    .auth-panel-title { font-size: 28px; }
    .auth-panel-top, .auth-panel-center { padding-left: 32px; padding-right: 32px; }
    .auth-panel-bottom { padding-left: 32px; padding-right: 32px; }
    .auth-cards { max-width: 100%; }
}

@media (max-width: 899px) {
    .auth-left { width: 38%; }
    .auth-panel-title { font-size: 24px; }
    .auth-cards { grid-template-columns: 1fr; gap: 10px; max-width: 240px; }
    .auth-panel-sub { font-size: 13px; margin-bottom: 24px; }
}

@media (max-width: 767px) {
    .auth-wrapper { flex-direction: column; }

    .auth-left {
        width: 100%;
        padding: 0;
    }

    .auth-left::before { display: none; }

    .auth-panel-top { padding: 20px 24px 0; }
    .auth-logo { height: 30px; }

    .auth-panel-center { padding: 16px 24px 20px; }
    .auth-panel-badge { display: none; }
    .auth-panel-title { font-size: 22px; margin-bottom: 0; }
    .auth-panel-sub, .auth-cards { display: none; }

    .auth-panel-bottom { display: none; }

    .auth-right { padding: 24px 20px 36px; align-items: flex-start; }
    .auth-form-wrap { max-width: 100%; }
    .auth-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 359px) {
    .auth-right { padding: 18px 14px 28px; }
}
