* {
    box-sizing: border-box;
}

:root {
    --bg: #f3f6fb;
    --card: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #d9e3ee;
    --soft-line: #edf2f7;
    --panel: #f8fafc;
    --teal: #0f766e;
    --teal-2: #14b8a6;
    --teal-soft: #ecfeff;
    --danger: #b91c1c;
    --danger-soft: #fef2f2;
    --success: #166534;
    --success-soft: #f0fdf4;
    --warning: #92400e;
    --warning-soft: #fffbeb;
    --shadow: 0 16px 40px rgba(15, 23, 42, .08);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, .055);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 92% 4%, rgba(15, 118, 110, .10), transparent 28%),
        radial-gradient(circle at 8% 0%, rgba(15, 23, 42, .045), transparent 24%),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.portal-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.portal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,.88);
    border-bottom: 1px solid rgba(217, 227, 238, .95);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f766e, #0d9488);
    color: #fff;
    font-weight: 950;
    letter-spacing: -.04em;
    box-shadow: 0 12px 24px rgba(15, 118, 110, .24);
    flex: 0 0 auto;
}

.brand h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -.035em;
    color: var(--ink);
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
}

.portal-main {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 22px 16px 34px;
}

.card {
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card + .card {
    margin-top: 16px;
}

.card-header {
    padding: 21px 20px 18px;
    border-bottom: 1px solid var(--soft-line);
    background:
        linear-gradient(135deg, rgba(15,118,110,.055), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.card-header h2 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -.045em;
}

.card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.card-body {
    padding: 20px;
}

/*
|--------------------------------------------------------------------------
| Login
|--------------------------------------------------------------------------
*/

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.login-card .card-header {
    padding: 26px 24px 22px;
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, .16), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
    color: #fff;
}

.login-card .brand {
    align-items: flex-start;
}

.login-card .logo {
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: none;
}

.login-card .brand h1 {
    color: #fff;
    font-size: 24px;
}

.login-card .brand p {
    color: rgba(255,255,255,.78);
    max-width: none;
    white-space: normal;
}

/*
|--------------------------------------------------------------------------
| Forms / Buttons
|--------------------------------------------------------------------------
*/

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 850;
}

input,
select,
textarea {
    width: 100%;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    outline: none;
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal-2);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, .13);
}

.btn {
    min-height: 48px;
    border-radius: 15px;
    padding: 12px 17px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: .58;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    width: 100%;
    border-color: var(--teal);
    background: linear-gradient(135deg, var(--teal), #0d9488);
    color: #fff;
    box-shadow: 0 14px 26px rgba(15, 118, 110, .23);
}

.btn-primary:hover {
    box-shadow: 0 18px 32px rgba(15, 118, 110, .28);
}

.btn-light {
    background: #fff;
    border-color: var(--line);
}

.btn-light:hover {
    background: var(--panel);
}

.btn-danger {
    border-color: #fecaca;
    background: var(--danger-soft);
    color: var(--danger);
}

/*
|--------------------------------------------------------------------------
| Alerts
|--------------------------------------------------------------------------
*/

.alert {
    margin-bottom: 14px;
    padding: 13px 14px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.4;
}

.alert-error {
    border: 1px solid #fecaca;
    background: var(--danger-soft);
    color: var(--danger);
}

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

/*
|--------------------------------------------------------------------------
| Dashboard
|--------------------------------------------------------------------------
*/

.dashboard-grid {
    display: grid;
    gap: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.info-box {
    position: relative;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.info-box::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 12px;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: #99f6e4;
}

.info-label {
    margin: 9px 0 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.info-value {
    color: var(--ink);
    font-size: 17px;
    font-weight: 950;
    line-height: 1.3;
    word-break: break-word;
}

.action-grid {
    display: grid;
    gap: 12px;
}

.big-action {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 18px 18px 18px 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(15,118,110,.055), transparent 34%),
        #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.big-action::after {
    content: "→";
    position: absolute;
    right: 18px;
    top: 18px;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--teal-soft);
    color: var(--teal);
    font-weight: 950;
}

.big-action:hover {
    transform: translateY(-1px);
    border-color: #99f6e4;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .075);
}

.big-action strong {
    padding-right: 44px;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -.02em;
}

.big-action span {
    padding-right: 44px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

/*
|--------------------------------------------------------------------------
| GPS Check-In
|--------------------------------------------------------------------------
*/

.gps-status {
    margin: 14px 0;
    padding: 14px 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 750;
}

.gps-status.good {
    border-color: #bbf7d0;
    background: var(--success-soft);
    color: var(--success);
}

.gps-status.bad {
    border-color: #fecaca;
    background: var(--danger-soft);
    color: var(--danger);
}

.gps-status.warning {
    border-color: #fde68a;
    background: var(--warning-soft);
    color: var(--warning);
}

#useGpsBtn {
    min-height: 58px;
    font-size: 17px;
    border-radius: 18px;
}

#submitBtn {
    margin-top: 4px;
}

.small-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    margin: 12px 0 0;
}

/*
|--------------------------------------------------------------------------
| Mobile polish
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {
    body {
        background:
            radial-gradient(circle at top right, rgba(15, 118, 110, .10), transparent 34%),
            linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    }

    .portal-header {
        align-items: center;
        padding: 12px 12px;
    }

    .logo {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 13px;
    }

    .brand h1 {
        font-size: 16px;
    }

    .brand p {
        font-size: 11px;
        max-width: 48vw;
    }

    .portal-main {
        padding: 16px 12px 28px;
    }

    .card {
        border-radius: 20px;
    }

    .card-header {
        padding: 18px 16px 15px;
    }

    .card-header h2 {
        font-size: 22px;
    }

    .card-body {
        padding: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-box {
        padding: 14px;
    }

    .big-action {
        padding: 17px 16px;
    }

    .btn {
        min-height: 50px;
    }

    .login-wrap {
        align-items: stretch;
        place-items: center;
        padding: 14px;
    }

    .login-card {
        max-width: none;
    }
}



/*
|--------------------------------------------------------------------------
| New professional driver portal layouts
|--------------------------------------------------------------------------
*/

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.login-card-pro {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr .85fr;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}

.login-brand-panel {
    min-height: 560px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 80% 12%, rgba(20, 184, 166, .25), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
    color: #fff;
}

.login-logo-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.login-logo-row h1 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.05em;
}

.login-logo-row p {
    margin: 0;
    max-width: 440px;
    color: rgba(255,255,255,.78);
    line-height: 1.5;
}

.login-benefits {
    display: grid;
    gap: 12px;
}

.login-benefits div {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
}

.login-benefits strong {
    display: block;
    margin-bottom: 5px;
    font-weight: 950;
}

.login-benefits span {
    color: rgba(255,255,255,.75);
    font-size: 13px;
    line-height: 1.45;
}

.login-form-panel {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-header {
    margin-bottom: 20px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .10em;
}

.login-form-header h2 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.05em;
}

.login-form-header p,
.login-note {
    color: var(--muted);
}

.driver-hero-card,
.checkin-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(15,118,110,.075), transparent 36%),
        #fff;
    box-shadow: var(--shadow-soft);
}

.driver-hero-card h2,
.checkin-hero-card h2 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.05em;
}

.driver-hero-card p,
.checkin-hero-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    max-width: 620px;
}

.hero-checkin-btn {
    min-height: 54px;
    white-space: nowrap;
    border-radius: 17px;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--teal), #0d9488);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 14px 26px rgba(15, 118, 110, .23);
}

.primary-big-action {
    border-color: #99f6e4;
    background:
        linear-gradient(135deg, rgba(15,118,110,.09), transparent 34%),
        #fff;
}

.disabled-action {
    opacity: .76;
}

.disabled-action::after {
    content: "Soon";
    font-size: 11px;
    width: auto;
    padding: 0 10px;
}

.last-checkin-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid #99f6e4;
    border-radius: 18px;
    background: linear-gradient(135deg, #ecfeff, #fff);
}

.last-checkin-summary strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.last-checkin-summary p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    display: grid;
    gap: 9px;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: var(--panel);
}

.empty-state strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.gps-main-btn {
    min-height: 62px !important;
    font-size: 18px !important;
    border-radius: 20px !important;
}

.gps-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.gps-detail-box {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.gps-detail-box span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.gps-detail-box strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 950;
}

@media (max-width: 850px) {
    .login-card-pro {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .login-brand-panel {
        min-height: auto;
        gap: 26px;
        padding: 26px;
    }

    .login-form-panel {
        padding: 24px;
    }

    .login-logo-row h1,
    .login-form-header h2 {
        font-size: 30px;
    }

    .driver-hero-card,
    .checkin-hero-card,
    .last-checkin-summary {
        display: grid;
    }

    .hero-checkin-btn {
        text-align: center;
    }
}

@media (max-width: 700px) {
    .login-page {
        padding: 12px;
        place-items: stretch;
        align-items: center;
    }

    .login-card-pro {
        border-radius: 24px;
    }

    .login-brand-panel {
        padding: 22px;
    }

    .login-form-panel {
        padding: 20px;
    }

    .driver-hero-card,
    .checkin-hero-card {
        padding: 18px;
        border-radius: 22px;
    }

    .driver-hero-card h2,
    .checkin-hero-card h2 {
        font-size: 26px;
    }

    .gps-detail-grid {
        grid-template-columns: 1fr;
    }
}
