/* Restaurant login — Kohzad-inspired professional layout */

:root {
    --auth-bg: #f4f6f9;
    --auth-brand: #0f2744;
    --auth-brand-accent: #c9a227;
    --auth-brand-muted: rgba(255, 255, 255, 0.72);
    --auth-card: #ffffff;
    --auth-text: #1e293b;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-primary: #0d6e4f;
    --auth-primary-hover: #0a5a41;
    --auth-danger-bg: #fef2f2;
    --auth-danger-text: #991b1b;
    --auth-success-bg: #f0fdf4;
    --auth-success-text: #166534;
    --auth-radius: 12px;
    --auth-shadow: 0 4px 24px rgba(15, 39, 68, 0.08);
    --auth-font: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
}

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

html,
body {
    width: 100%;
    min-height: 100%;
    font-family: var(--auth-font);
}

.auth-page {
    background: var(--auth-bg);
    min-height: 100vh;
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
}

/* Shell: split layout */
.auth-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Brand / hero panel */
.auth-brand {
    flex: 0 0 42%;
    max-width: 520px;
    background: linear-gradient(145deg, var(--auth-brand) 0%, #163a5f 55%, #1a4d3e 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.auth-brand-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        radial-gradient(circle at 20% 80%, #fff 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, #fff 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 360px;
}

.auth-brand-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(201, 162, 39, 0.2);
    border: 1px solid rgba(201, 162, 39, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--auth-brand-accent);
    margin-bottom: 28px;
}

.auth-brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.auth-brand-tagline {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--auth-brand-muted);
    margin-bottom: 32px;
}

.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.auth-features i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--auth-brand-accent);
}

/* Main login column */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px 24px;
    min-width: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--auth-card);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border);
    padding: 40px 36px 32px;
}

/* Header — Kohzad-style centered branding */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-link {
    display: inline-block;
    margin-bottom: 12px;
}

.auth-logo {
    max-height: 64px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-site-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--auth-text-muted);
    margin-bottom: 8px;
}

.auth-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 6px;
    text-transform: none !important;
    padding: 0 !important;
}

.auth-subheading {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    font-weight: 400;
}

/* Email / PIN mode switch */
.auth-mode-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
}

.auth-mode-btn,
.btn_login_pin_type {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    text-decoration: none;
    border-radius: 8px;
    border: none;
    background: transparent;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    line-height: 1.2;
}

.auth-mode-btn:hover,
.btn_login_pin_type:hover {
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-mode-btn.active_login_btn,
.btn_login_pin_type.active_login_btn {
    background: var(--auth-card);
    color: var(--auth-primary);
    box-shadow: 0 1px 4px rgba(15, 39, 68, 0.1);
}

.auth-mode-btn.active_login_btn:hover,
.btn_login_pin_type.active_login_btn:hover {
    color: var(--auth-primary);
    background: var(--auth-card);
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    line-height: 1.45;
}

.auth-alert i {
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-alert-danger {
    background: var(--auth-danger-bg);
    color: var(--auth-danger-text);
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: var(--auth-success-bg);
    color: var(--auth-success-text);
    border: 1px solid #bbf7d0;
}

/* Form */
.auth-form {
    width: 100%;
}

.auth-field {
    margin-bottom: 20px;
}

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

.auth-required {
    color: #dc2626;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 79, 0.12);
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-field-error {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 6px;
}

.auth-submit,
.submit_login {
    width: 100%;
    margin-top: 8px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--auth-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.02em;
}

.auth-submit:hover,
.submit_login:hover {
    background: var(--auth-primary-hover);
}

.auth-submit:active,
.submit_login:active {
    transform: scale(0.99);
}

.auth-signup {
    text-align: center;
    margin-top: 16px;
    font-size: 0.875rem;
}

.auth-signup a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-signup a:hover {
    text-decoration: underline;
}

.auth-forgot {
    text-align: center;
    margin-top: 18px;
}

.auth-forgot a {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot a:hover {
    color: var(--auth-primary);
}

/* PIN login */
.auth-pin-wrap {
    margin-bottom: 8px;
}

.auth-pin-wrap .pinlogin {
    margin: 0 auto;
}

.auth-pin-wrap .pinlogin-field {
    border-radius: 8px !important;
    border: 1px solid var(--auth-border) !important;
    font-size: 1.25rem !important;
}

.auth-pin-wrap .pinlogin-field:focus {
    border-color: var(--auth-primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 79, 0.12) !important;
}

/* Demo accounts */
.auth-demo {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
}

.auth-demo-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--auth-text-muted);
    text-align: center;
    margin-bottom: 14px;
}

.auth-demo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.auth-demo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-demo-btn i {
    font-size: 14px;
}

.auth-demo-btn:hover {
    background: var(--auth-primary);
    color: #fff;
    border-color: var(--auth-primary);
    text-decoration: none;
}

/* Footer */
.auth-footer {
    margin-top: 28px;
    text-align: center;
}

.auth-version {
    display: block;
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    margin-bottom: 4px;
}

.auth-copyright {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Utilities (login.js) */
.display_none_login {
    display: none !important;
}

.text_center {
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .auth-shell {
        flex-direction: column;
    }

    .auth-brand {
        flex: none;
        max-width: none;
        width: 100%;
        min-height: auto;
        padding: 32px 24px;
    }

    .auth-brand-tagline {
        display: none;
    }

    .auth-features {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .auth-features li {
        font-size: 0.8rem;
    }

    .auth-main {
        padding: 24px 16px;
    }

    .auth-card {
        padding: 32px 24px 24px;
    }
}

@media (max-width: 480px) {
    .auth-demo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .auth-mode-switch {
        flex-direction: column;
    }

    .auth-card {
        padding: 28px 20px 20px;
        border-radius: 10px;
    }
}

@media print {
    .auth-brand {
        display: none;
    }
}
