/* ============================================================
   HAYES GLOBAL MOBILITIES — Main Stylesheet
   Version: 1.0.0
   Brand: Primary #071A40  |  Secondary #E0921A
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    --brand-primary:        #071A40;
    --brand-primary-600:    #0d2a63;
    --brand-primary-700:    #051330;
    --brand-secondary:      #E0921A;
    --brand-secondary-600:  #c97e15;
    --brand-secondary-100:  #fdf3e1;

    --text-dark:    #1a1a2e;
    --text-muted:   #6b7280;
    --text-light:   #9ca3af;

    --border-color: #e5e7eb;
    --bg-light:     #f9fafb;
    --bg-page:      #f0f2f5;

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.12);

    --transition: all .2s ease;

    --font-body:  'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-secondary); text-decoration: none; }
a:hover { color: var(--brand-secondary-600); }

img { max-width: 100%; }

/* ── Bootstrap Overrides ───────────────────────────────────── */
.btn-primary {
    background:    var(--brand-primary);
    border-color:  var(--brand-primary);
    font-weight:   600;
}
.btn-primary:hover,
.btn-primary:focus {
    background:   var(--brand-primary-600);
    border-color: var(--brand-primary-600);
}

.btn-secondary-brand {
    background:    var(--brand-secondary);
    border-color:  var(--brand-secondary);
    color:         #fff;
    font-weight:   600;
}
.btn-secondary-brand:hover {
    background:   var(--brand-secondary-600);
    border-color: var(--brand-secondary-600);
    color:        #fff;
}

.btn-outline-primary {
    color:        var(--brand-primary);
    border-color: var(--brand-primary);
}
.btn-outline-primary:hover {
    background:   var(--brand-primary);
    border-color: var(--brand-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-secondary);
    box-shadow:   0 0 0 3px rgba(224,146,26,.15);
}

.form-label { font-weight: 500; color: #374151; font-size: .9rem; }

/* ── Utility Classes ───────────────────────────────────────── */
.text-brand-primary   { color: var(--brand-primary)   !important; }
.text-brand-secondary { color: var(--brand-secondary) !important; }
.bg-brand-primary     { background: var(--brand-primary)   !important; color: #fff; }
.bg-brand-secondary   { background: var(--brand-secondary) !important; color: #fff; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.border-brand { border-color: var(--brand-secondary) !important; }

/* ── AUTH PAGE LAYOUT ──────────────────────────────────────── */

.auth-body {
    min-height: 100vh;
    background: var(--bg-page);
    padding: 0;
    margin: 0;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Brand Panel (left side) ───────────────────────────────── */
.auth-brand-panel {
    width: 42%;
    min-height: 100vh;
    background: var(--brand-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 3rem 2.75rem;
    flex-shrink: 0;
}

.auth-brand-inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    margin-bottom: 3.5rem;
}
.auth-logo-icon {
    width: 52px;
    height: 52px;
    background: var(--brand-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(224,146,26,.4);
}
.auth-logo-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.auth-logo-sub {
    font-size: .8rem;
    color: rgba(255,255,255,.6);
    font-weight: 400;
}

/* Headline */
.auth-brand-content { margin-bottom: 2.5rem; }
.auth-brand-headline {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: .75rem;
}
.auth-brand-sub {
    color: rgba(255,255,255,.65);
    font-size: .95rem;
    line-height: 1.65;
}

/* Feature List */
.auth-features {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.auth-features li {
    color: rgba(255,255,255,.82);
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.auth-features li .fas {
    color: var(--brand-secondary);
    font-size: .95rem;
    width: 18px;
    flex-shrink: 0;
}

/* Footer link */
.auth-brand-footer a {
    color: rgba(255,255,255,.45);
    font-size: .8rem;
    text-decoration: none;
    transition: var(--transition);
}
.auth-brand-footer a:hover { color: var(--brand-secondary); }

/* Decorative circles */
.auth-brand-circle {
    position: absolute;
    border-radius: 50%;
    opacity: .06;
    background: #fff;
    z-index: 1;
}
.auth-brand-circle-1 { width: 380px; height: 380px; bottom: -80px;  right: -120px; }
.auth-brand-circle-2 { width: 220px; height: 220px; top:    -60px;  right: -40px;  opacity: .04; }
.auth-brand-circle-3 { width: 140px; height: 140px; bottom: 120px;  left:  -50px;  opacity: .05; }

/* ── Form Panel (right side) ───────────────────────────────── */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: #fff;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 460px;
}

/* Mobile logo — hidden on desktop */
.auth-mobile-logo {
    display: none;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.auth-mobile-logo .auth-logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

/* ── Auth Form Typography ──────────────────────────────────── */
.auth-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: .25rem;
}
.auth-page-subtitle {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 1.75rem;
}

/* ── Input groups with icon ────────────────────────────────── */
.input-icon-wrapper {
    position: relative;
}
.input-icon-wrapper .form-control {
    padding-left: 2.75rem;
}
.input-icon-wrapper .input-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: .9rem;
    pointer-events: none;
}

/* ── Password toggle button ────────────────────────────────── */
.btn-pw-toggle {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: .2rem .4rem;
    color: var(--text-light);
    cursor: pointer;
    font-size: .9rem;
    transition: var(--transition);
}
.btn-pw-toggle:hover { color: var(--brand-primary); }

/* ── Auth submit button ────────────────────────────────────── */
.btn-auth-submit {
    width: 100%;
    padding: .85rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: #fff;
    transition: var(--transition);
    letter-spacing: .02em;
}
.btn-auth-submit:hover {
    background: var(--brand-secondary-600);
    border-color: var(--brand-secondary-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(224,146,26,.35);
}
.btn-auth-submit:active { transform: translateY(0); }

/* ── Auth divider ──────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-light);
    font-size: .8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ── Auth footer link row ──────────────────────────────────── */
.auth-footer-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .875rem;
    color: var(--text-muted);
}
.auth-footer-links a {
    color: var(--brand-primary);
    font-weight: 600;
}
.auth-footer-links a:hover { color: var(--brand-secondary); }

/* ── Success / info state card ─────────────────────────────── */
.auth-success-card {
    text-align: center;
    padding: 2rem 1rem;
}
.auth-success-icon {
    width: 72px;
    height: 72px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #16a34a;
    margin: 0 auto 1.25rem;
}
.auth-info-icon {
    background: var(--brand-secondary-100);
    color: var(--brand-secondary);
}

/* ── Alert overrides for auth pages ───────────────────────── */
.alert { border-radius: var(--radius-md); font-size: .9rem; }

/* ── Password strength indicator ──────────────────────────── */
.pw-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    margin-top: .4rem;
    overflow: hidden;
    transition: var(--transition);
}
.pw-strength-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s ease, background .3s ease;
}

/* ── Responsive: tablet ────────────────────────────────────── */
@media (max-width: 992px) {
    .auth-brand-panel { width: 38%; padding: 2rem; }
    .auth-brand-headline { font-size: 1.35rem; }
}

/* ── Responsive: mobile ────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-wrapper      { flex-direction: column; }
    .auth-brand-panel  {
        width: 100%;
        min-height: auto;
        padding: 1.25rem 1.5rem;
        display: block;
    }
    .auth-brand-content,
    .auth-features,
    .auth-brand-footer { display: none; }
    .auth-logo         { margin-bottom: 0; }
    .auth-brand-circle { display: none; }
    .auth-mobile-logo  { display: flex !important; }
    .auth-form-panel   {
        padding: 2rem 1.25rem;
        align-items: flex-start;
    }
    .auth-form-container { max-width: 100%; }
}

/* ── SHARED COMPONENT: Status Badge ───────────────────────── */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .75rem;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── SHARED COMPONENT: Section Card ───────────────────────── */
.hgm-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.hgm-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--brand-primary);
}
.hgm-card-body { padding: 1.5rem; }

/* ── SHARED COMPONENT: Progress Timeline ──────────────────── */
.progress-timeline {
    position: relative;
    padding-left: 2rem;
}
.progress-timeline::before {
    content: '';
    position: absolute;
    left: .55rem;
    top: 0; bottom: 0;
    width: 2px;
    background: var(--border-color);
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -1.55rem;
    top: .15rem;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--border-color);
}
.timeline-dot.active  { background: var(--brand-secondary); box-shadow: 0 0 0 2px rgba(224,146,26,.3); }
.timeline-dot.done    { background: #16a34a; box-shadow: 0 0 0 2px rgba(22,163,74,.25); }
.timeline-dot.refused { background: #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,.25); }
.timeline-label { font-size: .9rem; font-weight: 600; color: var(--text-dark); }
.timeline-date  { font-size: .78rem; color: var(--text-muted); }
.timeline-note  { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }
