/* =========================================================
   Auth pages (login / register) — standalone, non-AMP
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.auth-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Tajawal", "Cairo", sans-serif;
    background: linear-gradient(135deg, #f5f7fb 0%, #eef2f7 100%);
    color: #1f2937;
    min-height: 100vh;
}
.auth-shell {
    max-width: 520px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.auth-back {
    align-self: flex-start;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
}
.auth-back:hover { color: #111827; }
.auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    padding: 36px 32px;
}
.auth-card--wide { max-width: 640px; }
.auth-card-head {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 0 8px !important;
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    border: none !important;
    box-shadow: none !important;
}
.auth-card-head h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
}
.auth-card-head p {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}
.auth-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 10px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 18px;
    transition: background .15s, border-color .15s;
}
.auth-google-btn:hover { background: #f9fafb; border-color: #9ca3af; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 13px;
    margin: 14px 0;
}
.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}
.auth-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font: inherit;
    background: #fff;
    color: #111827;
    transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .auth-field-row { grid-template-columns: 1fr; } }

.auth-submit {
    margin-top: 8px;
    padding: 12px 18px;
    background: #111827;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background .15s;
}
.auth-submit:hover { background: #1f2937; }
.auth-card-foot {
    margin-top: 22px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}
.auth-card-foot a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    margin-inline-start: 4px;
}
.auth-card-foot a:hover { text-decoration: underline; }

/* Tabs (company / visitor) */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.auth-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #1f2937;
    background: #f9fafb;
    transition: all .15s;
}
.auth-tab strong { font-size: 15px; }
.auth-tab span { font-size: 12px; color: #6b7280; }
.auth-tab:hover { border-color: #9ca3af; background: #f3f4f6; }
.auth-tab.is-active {
    border-color: var(--button-color, #2563eb);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.auth-tab.is-active strong { color: var(--button-color, #1e40af); }

/* =========================================================
   Top bar — site header for auth pages (login / register)
   ========================================================= */
.auth-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    position: sticky;
    top: 0;
    z-index: 50;
}
.auth-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.auth-topbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: .2px;
}
.auth-topbar-brand:hover { color: #2563eb; }
.auth-topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.auth-topbar-nav a {
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .15s, color .15s;
}
.auth-topbar-nav a:hover { background: #f3f4f6; color: #111827; }
.auth-topbar-nav .auth-topbar-cta {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}
.auth-topbar-nav .auth-topbar-cta:hover { background: #1d4ed8; color: #fff; }
@media (max-width: 600px) {
    .auth-topbar-inner { padding: 10px 14px; gap: 8px; }
    .auth-topbar-brand { font-size: 17px; }
    .auth-topbar-nav a { padding: 6px 8px; font-size: 13px; }
}
