/* ============================================
   Design tokens — matches the Brokerage Tracker's
   navy blue / white corporate look
   ============================================ */
:root {
    --bg: #F4F6F8;
    --surface: #FFFFFF;
    --surface-hover: #F0F4F9;
    --border: #DCE4EE;
    --text: #222222;
    --text-dim: #666666;
    --accent: #1A3C6E;   /* navy — matches Brokerage Tracker's nav/buttons/headings */
    --accent-hover: #14304F;
    --accent-soft: rgba(26, 60, 110, 0.08);
    --danger: #C0392B;
    --font-display: 'Segoe UI', Arial, sans-serif;
    --font-body: 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
}

/* Generic table styling — navy header band, zebra striping, matching
   Brokerage Tracker's tables. Most tables across the site are built
   with inline styles that only set padding/borders, so this cascades
   in cleanly wherever a page doesn't already override it. */
table {
    border-collapse: collapse;
}
th {
    background: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
}
tr:nth-child(even) td {
    background: #F7F9FB;
}

/* ============================================
   Login / OTP screen
   ============================================ */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-container {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2.5rem 2.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.auth-container h2 {
    margin: 0 0 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--accent);
}

.auth-container form {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.auth-container label {
    margin-top: 1rem;
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 600;
}

.auth-container input {
    padding: 0.7rem 0.85rem;
    margin-top: 0.4rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.15s ease;
}

.auth-container input:focus {
    border-color: var(--accent);
}

.auth-container button {
    margin-top: 1.75rem;
    padding: 0.75rem;
    background: var(--accent);
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.15s ease;
}

.auth-container button:hover {
    background: var(--accent-hover);
}

.auth-container p {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.auth-container a {
    color: var(--accent);
    text-decoration: none;
}

.errors {
    color: #991B1B;
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.25);
    padding: 0.7rem 1rem;
    border-radius: 5px;
    list-style: none;
    margin: 0 0 1rem;
    text-align: left;
    font-size: 0.88rem;
}

.success {
    color: #1A7A3A;
    background: rgba(26, 122, 58, 0.08);
    border: 1px solid rgba(26, 122, 58, 0.25);
    padding: 0.7rem 1rem;
    border-radius: 5px;
    font-weight: 600;
}

/* ============================================
   Dashboard
   ============================================ */
.dash-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(26, 60, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.eyebrow {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-header h1 {
    margin: 0.15rem 0 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--accent);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.logout-btn:hover {
    color: var(--accent);
    border-color: rgba(26, 60, 110, 0.35);
}

.section-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.9rem;
    font-weight: 600;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    min-height: 110px;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tile:hover {
    border-color: var(--accent);
    background: var(--surface);
}

.tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.tile:hover .tile-icon {
    background: var(--accent);
    color: #FFFFFF;
}

.tile-label {
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 480px) {
    .dash-header h1 { font-size: 1.2rem; }
    .logout-btn span { display: none; }
    .tile-grid { grid-template-columns: repeat(2, 1fr); }
}