body.site-body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    /* Override milligram's font-weight: 300 (loaded only on admin pages),
       which makes inherited body text look anaemically thin. */
    font-weight: 400;
    letter-spacing: 0;
    background: #f3f6fb;
    color: #1f2a44;
}

.container {
    width: 90%;
    max-width: 1240px;
    margin: 0 auto;
}

.site-header {
    padding: 24px 0 10px;
}

.nav-wrapper {
    background: #ffffff;
    border-radius: 24px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 56px;
    max-height: 56px;
    display: block;
    object-fit: contain;
    flex: 0 0 56px;
}

.brand-text h1,
.brand-text .brand-title {
    display: block;
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.1;
    font-weight: 700;
    color: inherit;
}

.brand-text p {
    margin: 2px 0 0;
    color: #556680;
    font-size: 0.95rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: #455873;
    font-weight: 500;
}

.main-nav a:hover {
    color: #2f5fd7;
}

.btn-primary {
    background: #4f7cf0;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(79, 124, 240, 0.22);
}

.btn-primary:hover {
    background: #3f6de4;
}

.site-main {
    min-height: 75vh;
    padding: 20px 0 50px;
}

.error-page-card {
    max-width: 760px;
    margin: 3.2rem auto 0;
    background: #fff;
    border: 1px solid #dfe8f5;
    border-radius: 28px;
    box-shadow: 0 18px 46px rgba(31, 42, 68, 0.08);
    padding: 2.2rem;
}

.error-page-card h2 {
    margin: 0 0 0.8rem;
    color: #1f2a44;
    font-size: 2rem;
}

.error-page-card p {
    margin: 0 0 0.65rem;
    color: #4a5672;
    line-height: 1.7;
}

.error-page-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    margin-bottom: 1.25rem;
}

.error-page-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.error-page-brand span {
    color: #1f2a44;
    font-weight: 700;
}

.error-page-actions {
    margin-top: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.error-page-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid #d7e0ef;
    color: #35507f;
    text-decoration: none;
    font-weight: 600;
}

.site-footer {
    padding: 20px 0 40px;
    color: #556680;
    text-align: center;
}

.page-shell {
    padding-top: 10px;
}

.page-card,
.service-card,
.benefit-panel,
.info-panel,
.contact-banner {
    border-radius: 28px;
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.05);
}

.showcase {
    margin-top: 24px;
    margin-bottom: 32px;
}

.showcase__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 24px;
    align-items: stretch;
}

.showcase__copy,
.showcase__visual {
    background: #eaf1fb;
    border-radius: 28px;
    box-sizing: border-box;
}

.showcase__copy {
    min-height: 530px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 14px;
    color: #4f7cf0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.showcase__copy h1,
.showcase__copy .showcase__lede {
    margin: 0 0 22px;
    font-size: 4rem;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: #1f2a44;
    max-width: 700px;
}

.showcase__text {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #6c7a96;
    max-width: 760px;
}

.showcase__actions {
    margin-top: 30px;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.showcase__secondary {
    color: #2f5fd7;
    text-decoration: none;
    font-weight: 600;
}

.showcase__secondary:hover {
    text-decoration: underline;
}

.showcase__visual--image {
    position: relative;
    min-height: 530px;
    overflow: hidden;
    border-radius: 28px;
    background: #eaf1fb;
    display: flex;
    align-items: stretch;
}

.showcase__visual--image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.88;
}

.showcase-highlight-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    padding: 20px 22px;
    box-shadow: 0 10px 28px rgba(31, 42, 68, 0.12);
    max-width: 260px;
    z-index: 2;
}

.showcase-highlight-card p {
    margin: 0;
    color: #6c7a96;
    line-height: 1.5;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

.showcase-card__eyebrow {
    margin: 0 0 8px !important;
    color: #4f7cf0 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-size: 0.95rem !important;
}

.showcase-highlight-card--top {
    top: 30px;
    right: 30px;
}

.showcase-highlight-card--middle {
    top: 180px;
    left: 30px;
}

.showcase-highlight-card--bottom {
    bottom: 30px;
    right: 30px;
}

.section {
    margin: 0 0 32px;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading--left {
    margin-bottom: 20px;
}

.section-heading h2,
.info-panel__header h2,
.contact-banner__copy h2 {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1.2;
    color: #1f2a44;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: #ffffff;
    padding: 28px;
}

.service-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 18px;
    display: block;
}

.service-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1f2a44;
    font-size: 1.2rem;
}

.service-card p {
    margin: 0;
    color: #6c7a96;
    line-height: 1.6;
}

.split-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.benefit-panel,
.info-panel,
.contact-banner {
    background: #eef3fb;
}

.benefit-panel {
    padding: 30px;
}

.benefit-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #dfe8f5;
}

.benefit-item:last-child {
    border-bottom: none;
}

.benefit-item span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4f7cf0;
    margin-top: 8px;
    flex-shrink: 0;
}

.benefit-item h3 {
    margin: 0 0 8px;
    color: #1f2a44;
    font-size: 1.15rem;
}

.benefit-item p {
    margin: 0;
    color: #6c7a96;
    line-height: 1.6;
}

.info-panel {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-panel img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 22px;
    display: block;
}

.info-panel p {
    color: #6c7a96;
    line-height: 1.7;
    margin-top: 0;
}

.contact-banner {
    padding: 30px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: start;
}

.contact-banner__copy p,
.contact-banner__meta p {
    color: #6c7a96;
    line-height: 1.7;
    margin-top: 0;
}

.contact-banner__meta strong {
    color: #1f2a44;
    margin-right: 8px;
}

.contact-banner__meta a {
    color: #2f5fd7;
    text-decoration: none;
    font-weight: 600;
}

.contact-banner__meta a:hover {
    text-decoration: underline;
}

.section-spacing {
    margin-bottom: 30px;
}

@media (max-width: 1100px) {
    .showcase__grid,
    .split-grid,
    .contact-banner {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .showcase__copy h1,
.showcase__copy .showcase__lede {
        font-size: 3rem;
    }

    .showcase__visual--image {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .nav-wrapper {
        align-items: stretch;
        gap: 12px;
        padding: 14px 18px;
    }

    .main-nav {
        justify-content: center;
        gap: 10px;
    }

    .main-nav a {
        font-size: 0.95rem;
    }

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

@media (max-width: 640px) {
    .showcase__copy,
    .service-card,
    .benefit-panel,
    .info-panel,
    .contact-banner {
        padding: 22px;
    }

    .showcase__copy h1,
.showcase__copy .showcase__lede {
        font-size: 2.3rem;
    }

    .showcase-highlight-card {
        position: static;
        margin: 14px;
        max-width: none;
    }

    .showcase__visual--image {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }

    .showcase__visual--image img {
        position: static;
        height: 260px;
        opacity: 0.92;
    }

    .info-panel img,
    .service-card img {
        height: auto;
    }
}


/*contact us page */
.contact-hero {
    padding: 3.5rem 0 1.5rem;
}

.contact-hero-content {
    max-width: 760px;
}

.contact-hero .eyebrow {
    display: inline-block;
    margin-bottom: 0.9rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #4c7cf0;
    text-transform: uppercase;
}

.contact-hero h2 {
    margin: 0 0 1rem;
    font-size: 2.5rem;
    line-height: 1.15;
    color: #1f2a44;
}

.contact-hero p {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.7;
    color: #5b6475;
}

.contact-form-section {
    padding: 1rem 0 4rem;
}

.contact-form-wrapper {
    max-width: 920px;
    margin: 0 auto;
}

.contact-form-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 2.25rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.contact-form-card h3 {
    margin: 0 0 1.5rem;
    font-size: 1.7rem;
    color: #1f2a44;
}

.quote-form .input,
.quote-form .textarea,
.quote-form .select {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.quote-form label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #1f2a44;
}

.quote-form input,
.quote-form textarea,
.quote-form select {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid #d7ddea;
    border-radius: 16px;
    font-size: 1rem;
    background: #fff;
    color: #1f2a44;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quote-form input:focus,
.quote-form textarea:focus,
.quote-form select:focus {
    outline: none;
    border-color: #4c7cf0;
    box-shadow: 0 0 0 4px rgba(76, 124, 240, 0.12);
}

.quote-form textarea {
    resize: vertical;
    min-height: 150px;
}

.form-actions {
    margin-top: 1.4rem;
}

.quote-btn {
    min-width: 180px;
    padding: 0.95rem 1.4rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 768px) {
    .contact-hero h2 {
        font-size: 2rem;
    }

    .contact-form-card {
        padding: 1.5rem;
        border-radius: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* login and contact pages */
.auth-section {
    display: flex;
    justify-content: center;
    padding: 3rem 0 4rem;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-header h2 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    color: #1f2a44;
}

.auth-header p {
    margin: 0;
    color: #64748b;
}

.auth-form .form-group {
    margin-bottom: 1.2rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #1f2a44;
}

.form-control,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    font-size: 1rem;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: #4f7df3;
    box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.15);
    background: #ffffff;
}

.auth-actions {
    margin-top: 1.5rem;
}

.auth-btn {
    width: 100%;
    border: none;
    cursor: pointer;
}

.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    color: #64748b;
}

.auth-footer a {
    color: #4f7df3;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-section {
    padding: 2rem 0 3rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-header h2 {
    margin: 0 0 0.4rem;
    font-size: 2rem;
    color: #1f2a44;
}

.dashboard-header p {
    margin: 0;
    color: #64748b;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dashboard-card-header h3 {
    margin: 0;
    color: #1f2a44;
}

.dashboard-count {
    background: #eef4ff;
    color: #4f7df3;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.dashboard-table thead th {
    text-align: left;
    padding: 0.9rem 0.8rem;
    background: #f8fafc;
    color: #1f2a44;
    font-size: 0.95rem;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-table tbody td {
    padding: 1rem 0.8rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
    color: #334155;
}

.message-cell {
    max-width: 320px;
    white-space: normal;
    line-height: 1.5;
}

.actions-col {
    white-space: nowrap;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-secondary,
.btn-danger,
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.btn-secondary {
    background: #eef2ff;
    color: #334155;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #64748b;
}

.empty-state h4 {
    margin-bottom: 0.5rem;
    color: #1f2a44;
}

/*create account page */
.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.password-toggle-wrap {
    position: relative;
}

.password-toggle-wrap .form-control {
    padding-right: 72px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #4f7df0;
    font-weight: 600;
    cursor: pointer;
}

/*# Contacts add success message */
.form-flash-wrap {
    margin: 18px 0 24px;
}

.form-flash-wrap .message {
    padding: 16px 18px;
    border-radius: 14px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.08);
}

.form-flash-wrap .success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.form-flash-wrap .error,
.message.error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 6px solid #b91c1c;
    border-top: 1px solid #fecaca;
    border-right: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
    border-radius: 12px;
    padding: 16px 64px 16px 56px;
    margin: 12px 0;
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.5;
    box-shadow: 0 6px 18px rgba(185, 28, 28, 0.12);
}

.form-flash-wrap .error::before,
.message.error::before {
    content: "\26A0";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.35rem;
    line-height: 1;
    color: #b91c1c;
}

/* Success flash card — mirrors .message.error so success messages rendered
   straight from $this->Flash->success() (no .flash-wrap parent) still get a
   proper card with room for the close button. Colours match the existing
   .flash-wrap .success / .form-flash-wrap .success validation palette. */
.message.success {
    background: #ecfdf3;
    color: #166534;
    border-left: 6px solid #16a34a;
    border-top: 1px solid #bbf7d0;
    border-right: 1px solid #bbf7d0;
    border-bottom: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px 64px 16px 56px;
    margin: 12px 0;
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.5;
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.12);
}

.message.success::before {
    content: "\2714";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    line-height: 1;
    color: #16a34a;
}

.form-flash-wrap .warning,
.message.warning,
.form-flash-wrap .info,
.message.info {
    padding: 16px 64px 16px 56px;
    position: relative;
    display: flex;
    align-items: center;
}

.js-flash {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.js-flash .message-body {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.js-flash .message-close {
    position: absolute;
    right: 14px;
    top: 12px;
    transform: none;
    margin: 0;
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-flash-wrap .warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.form-flash-wrap .info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* ── Google Places autocomplete dropdown ────────────────── */
.pac-container {
    border-radius: 12px;
    border: 1px solid #dce3f0;
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.12);
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 4px;
    z-index: 9999;
}

.pac-item {
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #1f2a44;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f8;
}

.pac-item:hover {
    background: #eef4ff;
}

.pac-item-query {
    font-weight: 700;
    color: #1f2a44;
}

.pac-matched {
    color: #4f7df0;
    font-weight: 700;
}


/* customer-facing UI refinements */
.section--how-it-works .section-heading {
    max-width: 72rem;
}

.steps-list {
    display: grid;
    gap: 0;
    max-width: 78rem;
}

.step-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.4rem;
    align-items: start;
    padding: 1.6rem 0;
    border-bottom: 1px solid #dfe8f5;
}

.step-item:last-child {
    border-bottom: none;
}

.step-bullet {
    width: 14px;
    height: 14px;
    margin-top: 0.75rem;
    border-radius: 50%;
    background: #4f7cf0;
    box-shadow: 0 0 0 6px rgba(79, 124, 240, 0.12);
    flex-shrink: 0;
}

.step-content h3 {
    margin: 0;
    color: #1f2a44;
    font-size: 1.4rem;
}

.step-content p {
    margin: 0.6rem 0 0;
    color: #6c7a96;
    line-height: 1.7;
    max-width: 70rem;
}

.step-meta {
    margin: 0 0 0.45rem !important;
    color: #4f7cf0 !important;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-section--login {
    padding: 3.5rem 0 5rem;
}

.login-page-shell {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.auth-card--login {
    max-width: 560px;
    padding: 2.5rem 2.35rem;
    border-radius: 30px;
    border: 1px solid #dfe8f5;
    box-shadow: 0 18px 46px rgba(31, 42, 68, 0.08);
}

.auth-header--login .eyebrow {
    margin-bottom: 0.9rem;
}

.auth-header--login h2 {
    margin-bottom: 0.65rem;
    font-size: 2.1rem;
}

.auth-header--login p:last-child {
    max-width: 30rem;
    margin: 0 auto;
    line-height: 1.6;
}

.auth-section--login .form-group {
    margin-bottom: 1.3rem;
}

.auth-section--login .auth-actions--login {
    margin-top: 1.8rem;
}

.auth-section--login .auth-btn {
    min-height: 48px;
}

.auth-footer--login {
    margin-top: 1.5rem;
    font-size: 0.96rem;
}

.driver-job-detail-card {
    max-width: 1120px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e3ecf8;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(31, 42, 68, 0.08);
    padding: 1.9rem;
}

.driver-job-detail-card .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.35rem;
    flex-wrap: wrap;
}

.driver-job-detail-card .detail-header h2 {
    margin: 0;
    color: #1f2a44;
}

.driver-job-detail-card .detail-header p {
    margin: 0.45rem 0 0;
    color: #6c7a96;
}

.driver-job-detail-card .detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 0.95rem;
}

.driver-job-detail-card .detail-box {
    padding: 0.95rem 1.05rem;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #e3ecf8;
}

.driver-job-detail-card .detail-box .label {
    display: block;
    margin-bottom: 0.32rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.driver-job-detail-card .detail-box .value {
    color: #1f2a44;
    line-height: 1.5;
}

.driver-job-detail-card .status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f5fd7;
    font-size: 0.86rem;
    font-weight: 700;
}

.driver-decision-panel {
    margin-top: 1.25rem;
    border-radius: 18px;
    border: 1px solid #e3ecf8;
    background: #f8fbff;
    padding: 1rem;
}

.driver-decision-panel h3 {
    margin: 0;
    color: #1f2a44;
    font-size: 1.12rem;
}

.driver-decision-panel p {
    margin: 0.35rem 0 0.8rem;
    color: #64748b;
    font-size: 0.94rem;
}

.driver-decision-actions {
    margin-bottom: 0.8rem;
}

.driver-decision-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.driver-decision-btn--accept {
    background: #dcfce7;
    color: #166534;
}

.driver-decision-btn--reject {
    background: #fee2e2;
    color: #991b1b;
}

.driver-reject-form label {
    margin: 0 0 0.38rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

.driver-reject-form textarea {
    min-height: 82px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid #dce3f0;
    background: #fff;
    font-size: 0.92rem;
    line-height: 1.45;
    resize: vertical;
}

.customer-dashboard-page {
    padding: 2.25rem 0 4rem;
}

.customer-dashboard-shell {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.customer-dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 2.1rem;
    border-radius: 30px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.customer-dashboard-hero h2 {
    margin: 0;
    color: #1f2a44;
    font-size: 2.25rem;
}

.customer-dashboard-hero p:last-child {
    margin: 0.7rem 0 0;
    color: #6c7a96;
    line-height: 1.7;
    max-width: 42rem;
}

.customer-dashboard-hero__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-dashboard-hero__actions form {
    margin: 0;
}

.customer-dashboard-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 165px;
    padding: 0.82rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #d8e3f5;
    background: #fff;
    color: #2f5fd7;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.06);
}

.customer-dashboard-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.82rem 1.2rem;
    border-radius: 999px;
    background: #4f7cf0;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(79, 124, 240, 0.24);
}

.customer-dashboard-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 165px;
    padding: 0.82rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.16);
}

.customer-dashboard-delete:hover {
    background: #fecaca;
}

.customer-summary-grid {
    margin: 0;
}

.customer-dashboard-account-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.customer-dashboard-account-actions form {
    margin: 0;
}

.customer-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.customer-dashboard-card {
    border-radius: 30px;
    padding: 1.9rem;
}

.customer-dashboard-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.customer-dashboard-card__header h3 {
    margin: 0;
    font-size: 1.45rem;
    color: #1f2a44;
}

.customer-dashboard-card__eyebrow {
    margin: 0 0 0.4rem;
    color: #4f7cf0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.customer-account-list {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.customer-account-list div {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid #e3ecf8;
}

.customer-account-list dt {
    margin: 0 0 0.35rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.customer-account-list dd {
    margin: 0;
    color: #1f2a44;
    line-height: 1.6;
    word-break: break-word;
}

.customer-table-wrap {
    border: 1px solid #e5ecf6;
    border-radius: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.customer-bookings-table {
    width: 100%;
    min-width: 660px;
    border-collapse: collapse;
}

.customer-bookings-table th,
.customer-bookings-table td {
    padding: 1rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid #edf2f8;
}

.customer-bookings-table th {
    background: #f8fbff;
    color: #1f2a44;
    font-size: 0.92rem;
}

.customer-bookings-table td {
    color: #334155;
}

.customer-bookings-table tbody tr:last-child td {
    border-bottom: none;
}

.customer-booking-status {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f5fd7;
    font-size: 0.88rem;
    font-weight: 700;
}

.customer-dashboard-card--quotes {
    border-radius: 30px;
    padding: 1.9rem;
}

.customer-quotes-wrap {
    margin-top: 0.2rem;
}

.customer-quotes-table {
    min-width: 860px;
}

.customer-quote-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.customer-quote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.customer-quote-btn--view {
    background: #e8effb;
    color: #1f2a44;
}

.customer-quote-btn--accept {
    background: #dcfce7;
    color: #166534;
}

.customer-quote-btn--reject {
    background: #fee2e2;
    color: #991b1b;
}

.customer-reject-details {
    margin: 0;
}

.customer-reject-details > summary {
    list-style: none;
}

.customer-reject-details > summary::-webkit-details-marker {
    display: none;
}

.customer-reject-form {
    margin-top: 0.45rem;
    display: grid;
    gap: 0.4rem;
    min-width: 220px;
}

.customer-reject-form textarea {
    min-height: 70px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid #dce3f0;
    background: #fff;
    font-size: 0.9rem;
    line-height: 1.45;
    resize: vertical;
}

.customer-quote-reason-row td {
    background: #f8fbff;
    color: #475569;
    font-size: 0.92rem;
}

.customer-quote-view-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.quote-reject-inline-form {
    display: grid;
    gap: 0.45rem;
    min-width: min(420px, 100%);
}

.quote-reject-inline-form label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

.quote-reject-inline-form textarea {
    min-height: 92px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid #dce3f0;
    background: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
}

.customer-empty-state {
    padding: 2.75rem 1rem;
    text-align: center;
    border-radius: 20px;
    background: #f8fbff;
    border: 1px dashed #d6e4f7;
}

.customer-empty-state h4 {
    margin: 0 0 0.45rem;
    color: #1f2a44;
    font-size: 1.15rem;
}

.customer-empty-state p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .customer-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .customer-dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .step-item {
        gap: 1rem;
        padding: 1.25rem 0;
    }

    .step-content h3 {
        font-size: 1.2rem;
    }

    .auth-card--login,
    .customer-dashboard-card,
    .customer-dashboard-hero {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .customer-dashboard-hero h2 {
        font-size: 1.75rem;
    }
}

/* driver dashboard */
.driver-dashboard-page {
    padding: 2.25rem 0 4rem;
}

.driver-dashboard-shell {
    max-width: 1220px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.driver-dashboard-account-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.driver-dashboard-account-actions form {
    margin: 0;
}

.driver-dashboard-delete-btn,
.driver-dashboard-account-actions .driver-dashboard-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.82rem 1.2rem;
    min-width: 165px;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
}

.driver-dashboard-delete-btn {
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #b91c1c;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.14);
}

.driver-dashboard-delete-btn:hover {
    background: #fecaca;
}

.driver-dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 2.1rem;
    border-radius: 30px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.driver-dashboard-hero h2 {
    margin: 0;
    color: #1f2a44;
    font-size: 2.25rem;
}

.driver-dashboard-hero p:last-child {
    margin: 0.7rem 0 0;
    color: #6c7a96;
    line-height: 1.7;
    max-width: 42rem;
}

.driver-dashboard-hero__actions {
    flex-shrink: 0;
}

.driver-dashboard-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.82rem 1.25rem;
    border-radius: 999px;
    border: 1px solid #d8e3f5;
    background: #fff;
    color: #2f5fd7;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.06);
}

.driver-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.driver-dashboard-card {
    border-radius: 30px;
    padding: 1.9rem;
}

.driver-dashboard-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.driver-dashboard-card__header h3 {
    margin: 0;
    font-size: 1.45rem;
    color: #1f2a44;
}

.driver-dashboard-card__eyebrow {
    margin: 0 0 0.4rem;
    color: #4f7cf0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.driver-account-list {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.driver-account-list div {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid #e3ecf8;
}

.driver-account-list dt {
    margin: 0 0 0.35rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.driver-account-list dd {
    margin: 0;
    color: #1f2a44;
    line-height: 1.6;
    word-break: break-word;
}

.driver-jobs-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.driver-jobs-table th,
.driver-jobs-table td {
    padding: 1rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid #edf2f8;
}

.driver-jobs-table th {
    background: #f8fbff;
    color: #1f2a44;
    font-size: 0.92rem;
}

.driver-jobs-table td {
    color: #334155;
}

.driver-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.driver-inline-select {
    min-width: 132px;
    height: 36px;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    background: #fff;
    padding: 0 10px;
}

.driver-inline-btn.btn-primary {
    padding: 8px 12px;
    box-shadow: none;
}

.driver-pending-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.driver-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.driver-action-btn--accept {
    background: #dcfce7;
    color: #166534;
}

.driver-action-btn--reject {
    background: #fee2e2;
    color: #991b1b;
}

.driver-action-btn--review {
    background: #e8effb;
    color: #1f2a44;
}

.driver-action-btn--reject-submit {
    background: #991b1b;
    color: #fff;
}

.driver-reject-details {
    margin: 0;
}

.driver-reject-details > summary {
    list-style: none;
}

.driver-reject-details > summary::-webkit-details-marker {
    display: none;
}

.driver-reject-inline-form {
    margin-top: 0.45rem;
    display: grid;
    gap: 0.4rem;
    min-width: 220px;
}

.driver-reject-inline-form textarea {
    min-height: 68px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid #dce3f0;
    background: #fff;
    font-size: 0.9rem;
    line-height: 1.45;
    resize: vertical;
}

@media (max-width: 980px) {
    .driver-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .driver-dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 640px) {
    .driver-dashboard-card,
    .driver-dashboard-hero {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .driver-dashboard-hero h2 {
        font-size: 1.75rem;
    }
}

/* driver calendar (restored from teammate commit c104175) */
.driver-dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.driver-profile-card,
.driver-calendar-card,
.driver-job-detail-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.driver-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}

.driver-profile-item {
    background: #f8fafc;
    border: 1px solid #e8eef7;
    border-radius: 16px;
    padding: 14px 16px;
}

.driver-calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.driver-calendar-toolbar h3 {
    margin: 0;
    color: #1f2a44;
}

.driver-calendar-toolbar p {
    margin: 6px 0 0;
    color: #64748b;
}

.driver-calendar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.calendar-toggle,
.calendar-nav-btn {
    display: inline-block;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
}

.calendar-toggle {
    background: #edf2ff;
    color: #3d5ec9;
}

.calendar-toggle.active {
    background: #4f7df0;
    color: #ffffff;
}

.calendar-nav-btn {
    background: #f8fafc;
    color: #1f2a44;
    border: 1px solid #dbe4f0;
}

.driver-calendar-grid {
    display: grid;
    gap: 16px;
}

.driver-calendar-grid-week {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.driver-calendar-grid-day {
    grid-template-columns: 1fr;
}

.driver-day-column {
    background: #f8fafc;
    border: 1px solid #e5edf7;
    border-radius: 18px;
    min-height: 220px;
    overflow: hidden;
}

.driver-day-header {
    padding: 14px 16px;
    background: #eef4ff;
    border-bottom: 1px solid #dbe6fb;
}

.driver-day-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4f7df0;
    text-transform: uppercase;
}

.driver-day-date {
    margin-top: 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2a44;
}

.driver-day-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-empty-state {
    color: #64748b;
    font-size: 0.95rem;
    background: #ffffff;
    border: 1px dashed #d6dfed;
    border-radius: 14px;
    padding: 14px;
}

.schedule-job-card {
    border-radius: 16px;
    padding: 14px;
    background: #ffffff;
}

.schedule-job-card h4 {
    margin: 0 0 10px;
    color: #1f2a44;
    font-size: 1rem;
}

.schedule-job-card p {
    margin: 0 0 8px;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.45;
}

.schedule-job-card-confirmed {
    border: 2px solid #4f7df0;
    background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.schedule-job-card-pending {
    border: 2px dashed #4f7df0;
    background: #fcfdff;
}

.schedule-job-card-rejected {
    border: 2px solid #f0b4b4;
    background: #fff8f8;
}

.schedule-job-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.schedule-job-time {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #355ecc;
    font-weight: 700;
    font-size: 0.82rem;
}

.schedule-job-status {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.schedule-job-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

@media (max-width: 1100px) {
    .driver-calendar-grid-week {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .driver-profile-grid {
        grid-template-columns: 1fr;
    }

    .driver-job-detail-card .detail-grid {
        grid-template-columns: 1fr;
    }
}


/*form layout*/
.enhanced-form-shell {
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 10px 28px rgba(31, 42, 68, 0.08);
    padding: 32px;
}

.enhanced-user-form {
    width: 100%;
}

.enhanced-form-grid {
    display: grid;
    gap: 20px;
}

.enhanced-form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.enhanced-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.enhanced-field.full-width {
    grid-column: 1 / -1;
}

.enhanced-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #1f2a44;
}

.enhanced-input,
.enhanced-field input,
.enhanced-field select,
.enhanced-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #dbe4f0;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 1rem;
    line-height: 1.4;
    background: #fff;
    color: #1f2a44;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    appearance: none;
}

select.enhanced-input,
.enhanced-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237b879d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px 8px;
    padding-right: 44px;
}

.enhanced-input:focus,
.enhanced-field input:focus,
.enhanced-field select:focus,
.enhanced-field textarea:focus {
    outline: none;
    border-color: #4f7cf0;
    box-shadow: 0 0 0 4px rgba(79, 124, 240, 0.12);
}

.enhanced-input.is-valid,
.enhanced-field input.is-valid,
.enhanced-field select.is-valid,
.enhanced-field textarea.is-valid {
    border-color: #20a562;
    background: #f3fcf7;
}

.enhanced-input.is-invalid,
.enhanced-field input.is-invalid,
.enhanced-field select.is-invalid,
.enhanced-field textarea.is-invalid {
    border-color: #d93025;
    background: #fff7f7;
}

.live-feedback {
    min-height: 20px;
    margin-top: 7px;
    font-size: 0.92rem;
    font-weight: 600;
}

.live-feedback.success {
    color: #17864f;
}

.live-feedback.error {
    color: #d93025;
}

.field-hint {
    margin: 8px 0 0;
    color: #667792;
    font-size: 0.94rem;
    line-height: 1.5;
}

.password-toggle-wrap {
    position: relative;
}

.password-toggle-wrap .enhanced-input {
    padding-right: 90px;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #4f7cf0;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    width: auto;
    min-width: 0;
    min-height: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.password-toggle-btn--login {
    right: 18px;
}

.password-rules {
    margin-top: 10px;
}

.password-checklist {
    margin: 8px 0 0;
    padding-left: 0;
    list-style: none;
}

.password-checklist li {
    margin-bottom: 6px;
    padding-left: 22px;
    position: relative;
    font-size: 0.94rem;
    font-weight: 600;
}

.password-checklist li::before {
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    text-align: center;
    font-weight: 700;
}

.password-checklist li.valid {
    color: #17864f;
}

.password-checklist li.valid::before {
    content: '\2713';
    color: #17864f;
}

.password-checklist li.invalid {
    color: #d93025;
}

.password-checklist li.invalid::before {
    content: '\2715';
    color: #d93025;
}

.auth-actions,
.enhanced-form-actions {
    margin-top: 28px;
}

.auth-btn,
.enhanced-form-actions .btn-primary {
    min-width: 180px;
}

@media (max-width: 768px) {
    .enhanced-form-grid.two-col {
        grid-template-columns: 1fr;
    }

    .enhanced-form-shell {
        padding: 22px;
    }
}

/*Customer dashboard top cards */
.dashboard-stats-grid {
    display: grid;
    gap: 18px;
    margin: 24px 0 30px;
}

.dashboard-stats-grid.five-cols {
    grid-template-columns: repeat(5, 1fr);
}

.dashboard-stat-card {
    background: #ffffff;
    border: 1px solid #e4ecfb;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 12px 26px rgba(59,130,246,0.07);
}

.dashboard-stat-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #7a88a8;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.dashboard-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #1d2b4d;
}

@media (max-width: 1200px) {
    .dashboard-stats-grid.five-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .dashboard-stats-grid.five-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .dashboard-stats-grid.five-cols {
        grid-template-columns: 1fr;
    }
}
/*customer dashboard*/

.customer-dashboard-page {
    padding: 10px 0 40px;
}

.customer-dashboard-shell {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* HERO */
.customer-dashboard-hero {
    background: #ffffff;
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.customer-dashboard-hero h2 {
    margin: 0 0 10px;
    font-size: 3rem;
    color: #1f2a44;
}

.customer-dashboard-hero p:last-child {
    margin: 0;
    color: #6c7a96;
    font-size: 1.08rem;
}

@media (max-width: 600px) {
    .customer-dashboard-hero {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        align-items: flex-start;
    }

    .customer-dashboard-hero h2 {
        font-size: 2rem;
    }
}

.customer-dashboard-quick-link {
    background: #4f7cf0;
    color: #fff !important;
    text-decoration: none;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 10px 22px rgba(79,124,240,.22);
}

.customer-dashboard-quick-link:hover {
    background: #3d68dd;
}

/* SUMMARY */
.customer-summary-cards {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
}

.customer-dashboard-search-card,
.driver-dashboard-search-card {
    padding: 1.2rem 1.4rem;
}

.dashboard-search-form {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.dashboard-search-input {
    flex: 1 1 320px;
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    padding: 0.8rem 1rem;
    border: 1px solid #dce6f5;
    border-radius: 999px;
    background: #f8fbff;
    color: #1f2a44;
    font-size: 0.95rem;
}

.dashboard-search-input:focus {
    outline: none;
    border-color: #7aa2ff;
    box-shadow: 0 0 0 4px rgba(79, 124, 240, 0.12);
}

.customer-summary-card {
    background: #fff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(31,42,68,.05);
    border: 1px solid #eef3fb;
}

.customer-summary-card__label {
    display: block;
    color: #7a8aa8;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    margin-bottom: 10px;
}

.customer-summary-card__value {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2a44;
    line-height: 1;
}

/* TOP NAV TABS */
.customer-dashboard-tabs {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.customer-dashboard-tab {
    background: #ffffff;
    border: 1px solid #dfe8f5;
    border-radius: 999px;
    padding: 12px 20px;
    text-decoration: none;
    color: #52627f;
    font-weight: 700;
    transition: .2s;
}

.customer-dashboard-tab:hover {
    color: #2f5fd7;
    border-color: #c8d8f5;
}

.customer-dashboard-tab.is-active {
    background: #4f7cf0;
    color: #fff;
    border-color: #4f7cf0;
}

/* MAIN CARDS */
.customer-dashboard-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(31,42,68,.05);
    border: 1px solid #edf2fb;
}

.customer-dashboard-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.customer-dashboard-card__header h3 {
    margin: 0;
    font-size: 2rem;
    color: #1f2a44;
}

.customer-dashboard-card__eyebrow {
    margin: 0 0 8px;
    color: #4f7cf0;
    font-size: .88rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .05em;
}

.dashboard-count {
    background: #eef4ff;
    color: #4f7cf0;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
}

/* ACCOUNT SMALL CARD */
.customer-account-mini {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 18px;
    margin-top: 16px;
}

.customer-account-box {
    background: #f8fbff;
    border: 1px solid #e4edf8;
    border-radius: 18px;
    padding: 16px;
}

.customer-account-box span {
    display: block;
    font-size: .78rem;
    color: #7b89a4;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
}

.customer-account-box strong {
    display: block;
    color: #1f2a44;
    font-size: 1rem;
}

.customer-edit-btn {
    display: inline-block;
    margin-top: 18px;
    background: #4f7cf0;
    color: #fff !important;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
}

/* TABLES */
.customer-table-wrap {
    overflow-x: auto;
}

.customer-bookings-table {
    width: 100%;
    border-collapse: collapse;
}

.customer-bookings-table thead th {
    background: #f5f8fe;
    color: #1f2a44;
    font-weight: 700;
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid #e6edf8;
    white-space: nowrap;
}

.customer-bookings-table tbody td {
    padding: 14px;
    border-bottom: 1px solid #eef3fb;
    color: #44506a;
    vertical-align: top;
}

.customer-bookings-table tbody tr:hover {
    background: #fafcff;
}

/* STATUS */
.customer-booking-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #4f7cf0;
    font-size: .85rem;
    font-weight: 700;
}

/* QUOTE BUTTONS */
.customer-quote-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.customer-quote-btn {
    text-decoration: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .88rem;
}

.customer-quote-btn--view {
    background: #e9eef8;
    color: #1f2a44;
}

.customer-quote-btn--accept {
    background: #e9f9ef;
    color: #13733d;
}

.customer-quote-btn--reject {
    background: #fff1ec;
    color: #b44d1d;
}

/* EMPTY */
.customer-empty-state {
    background: #f8fbff;
    border: 1px dashed #d7e2f3;
    border-radius: 22px;
    padding: 30px;
    text-align: center;
}

.customer-empty-state h4 {
    margin: 0 0 10px;
    color: #1f2a44;
}

.customer-empty-state p {
    margin: 0;
    color: #556680;
}

/* FOOTER BUTTONS */
.customer-dashboard-account-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.customer-dashboard-delete,
.customer-dashboard-logout {
    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
}

.customer-dashboard-delete {
    background: #fff1f1;
    color: #a62626;
}

.customer-dashboard-logout {
    background: #e9eef8;
    color: #1f2a44;
}

/* MOBILE */
@media (max-width: 1100px) {
    .customer-summary-cards {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 768px) {
    .customer-dashboard-hero h2 {
        font-size: 2.2rem;
    }

    .customer-account-mini {
        grid-template-columns: 1fr;
    }

    .customer-summary-cards {
        grid-template-columns: 1fr;
    }

    .customer-dashboard-tabs {
        flex-direction: column;
    }

    .customer-dashboard-tab {
        width: 100%;
        text-align: center;
    }
}

/* global navbar*/

.nav-wrapper {
    background: #ffffff;
    border-radius: 28px;
    padding: 18px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 10px 28px rgba(31, 42, 68, 0.07);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link,
.main-nav > a:not(.btn-primary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: #60708f;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-link:hover,
.main-nav > a:not(.btn-primary):hover {
    color: #2f5fd7;
    background: #eef4ff;
}

.nav-link--active {
    background: #e6efff;
    color: #2f5fd7 !important;
    font-weight: 800;
    box-shadow: inset 0 0 0 2px rgba(79, 124, 240, 0.16), 0 8px 18px rgba(79, 124, 240, 0.12);
}

.enquiry-back-row {
    margin-bottom: 14px;
}

.enquiry-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid #dce6fb;
    background: #eef4ff;
    color: #2f5fd7;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(53, 94, 204, 0.10);
}

.enquiry-back-btn:hover {
    background: #e3edff;
}

.nav-logout-btn,
.nav-login-btn {
    padding: 12px 22px;
    min-height: 46px;
}

/* customer dashboard page */

.customer-dashboard-page {
    padding: 10px 0 40px;
}

.customer-dashboard-shell {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.customer-dashboard-hero {
    background: #ffffff;
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.customer-dashboard-hero h2 {
    margin: 0 0 10px;
    font-size: 3rem;
    color: #1f2a44;
}

.customer-dashboard-hero p:last-child {
    margin: 0;
    color: #6c7a96;
    font-size: 1.08rem;
}

.customer-dashboard-quick-link {
    background: #4f7cf0;
    color: #fff !important;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 10px 22px rgba(79, 124, 240, 0.22);
    border: none;
    cursor: pointer;
}

.customer-dashboard-quick-link:hover {
    background: #3e6de6;
}

.customer-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.customer-summary-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.05);
    border: 1px solid #eef3fb;
}

.customer-summary-card__label {
    display: block;
    color: #7a8aa8;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 10px;
}

.customer-summary-card__value {
    font-size: 2.1rem;
    font-weight: 800;
    color: #1f2a44;
    line-height: 1;
}

.customer-dashboard-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.customer-dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.customer-dashboard-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.customer-dashboard-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.05);
    border: 1px solid #edf2fb;
}

.customer-dashboard-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.customer-dashboard-card__header h3 {
    margin: 0;
    font-size: 2rem;
    color: #1f2a44;
}

.customer-dashboard-card__eyebrow {
    margin: 0 0 8px;
    color: #4f7cf0;
    font-size: 0.88rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.dashboard-count {
    background: #eef4ff;
    color: #4f7cf0;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
}

/* Account card */
.customer-account-mini {
    display: grid;
    gap: 14px;
}

.customer-account-box {
    background: #f8fbff;
    border: 1px solid #e4edf8;
    border-radius: 18px;
    padding: 16px;
}

.customer-account-box span {
    display: block;
    font-size: 0.78rem;
    color: #7b89a4;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.customer-account-box strong {
    display: block;
    color: #1f2a44;
    font-size: 1rem;
    line-height: 1.5;
    word-break: break-word;
}

.customer-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4f7cf0;
    color: #ffffff !important;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(79, 124, 240, 0.18);
}

.customer-edit-btn:hover {
    background: #3d68dd;
}

/* tables */
.customer-table-wrap {
    overflow-x: auto;
}

.customer-bookings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #e6edf8;
    border-radius: 18px;
}

.customer-bookings-table thead th {
    background: #f5f8fe;
    color: #1f2a44;
    font-weight: 700;
    text-align: left;
    padding: 15px 16px;
    border-bottom: 1px solid #e6edf8;
    white-space: nowrap;
}

.customer-bookings-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #eef3fb;
    color: #44506a;
    vertical-align: top;
    background: #ffffff;
}

.customer-bookings-table tbody tr:last-child td {
    border-bottom: none;
}

.customer-bookings-table tbody tr:hover td {
    background: #fafcff;
}

.customer-invoice-receipt {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #ffffff;
}

.customer-invoice-receipt__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e6edf8;
}

.customer-invoice-receipt__header h3 {
    margin: 0;
    color: #1f2a44;
    font-size: 1.55rem;
    line-height: 1.2;
}

.customer-invoice-receipt__header p {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.customer-invoice-receipt__reference {
    min-width: 180px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid #e4edf8;
    text-align: right;
}

.customer-invoice-receipt__reference span,
.customer-invoice-receipt__line small {
    color: #64748b;
}

.customer-invoice-receipt__reference span {
    display: block;
    margin-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.customer-invoice-receipt__reference strong {
    color: #1f2a44;
    font-size: 1rem;
}

.customer-invoice-receipt__lines {
    display: grid;
    gap: 0;
}

.customer-invoice-receipt__line {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.6fr) minmax(120px, auto);
    align-items: baseline;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.customer-invoice-receipt__line span {
    color: #1f2a44;
    font-weight: 800;
}

.customer-invoice-receipt__line small {
    font-size: 0.95rem;
    line-height: 1.45;
}

.customer-invoice-receipt__line strong {
    justify-self: end;
    color: #1f2a44;
    font-size: 1.05rem;
    white-space: nowrap;
}

.customer-invoice-receipt__line--subtotal {
    margin-top: 6px;
    border-top: 1px solid #cbd5e1;
}

.customer-invoice-receipt__line--total {
    margin-top: 8px;
    padding: 16px;
    border: 0;
    border-radius: 16px;
    background: #ecfdf5;
}

.customer-invoice-receipt__line--total span,
.customer-invoice-receipt__line--total strong {
    color: #047857;
}

.customer-invoice-receipt__line--total strong {
    font-size: 1.55rem;
}

@media (max-width: 768px) {
    .customer-invoice-receipt__header,
    .customer-invoice-receipt__line {
        display: grid;
        grid-template-columns: 1fr;
    }

    .customer-invoice-receipt__reference {
        width: 100%;
        text-align: left;
    }

    .customer-invoice-receipt__line strong {
        justify-self: start;
    }
}

/* statuses */
.customer-booking-status,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.status-chip--pending,
.status-pending,
.status-draft {
    background: #fff6e8;
    color: #b76a00;
}

.status-chip--accepted,
.status-accepted,
.status-completed {
    background: #e9f9ef;
    color: #167546;
}

.status-chip--rejected,
.status-rejected,
.status-cancelled {
    background: #fff0f0;
    color: #bf3131;
}

.status-chip--sent,
.status-sent,
.status-in-progress,
.status-assigned,
.status-pending-approval {
    background: #eef4ff;
    color: #3c67df;
}

.status-helper--pending {
    background: #fff6e8;
    color: #b76a00;
}

.status-helper--active {
    background: #eef4ff;
    color: #3c67df;
}

.status-helper--positive {
    background: #e9f9ef;
    color: #167546;
}

.status-helper--negative {
    background: #fff0f0;
    color: #bf3131;
}

.status-helper--muted {
    background: #f3f4f6;
    color: #4b5563;
}

.customer-booking-status {
    background: #eef4ff;
    color: #4f7cf0;
}

.customer-booking-ref {
    color: #6b7280;
    display: block;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: .35rem;
}

.customer-booking-note {
    color: #7c2d12;
    display: block;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: .45rem;
}

/* quote buttons */
.customer-quote-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.customer-quote-btn {
    text-decoration: none;
    border: none;
    cursor: pointer;
    padding: 9px 13px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.customer-quote-btn--view {
    background: #e9eef8;
    color: #1f2a44;
}

.customer-quote-btn--view:hover {
    background: #dbe5f6;
}

.customer-quote-btn--accept {
    background: #e9f9ef;
    color: #13733d;
}

.customer-quote-btn--accept:hover {
    background: #d8f1e3;
}

.customer-quote-btn--reject {
    background: #fff1ec;
    color: #b44d1d;
}

.customer-quote-btn--reject:hover {
    background: #ffe5da;
}

.customer-reject-details {
    width: 100%;
    margin-top: 10px;
}

.customer-reject-details summary {
    list-style: none;
}

.customer-reject-details summary::-webkit-details-marker {
    display: none;
}

.customer-reject-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-reject-form textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #dce6f5;
    border-radius: 14px;
    background: #f8fbff;
    padding: 12px 14px;
    color: #1f2a44;
    box-sizing: border-box;
    resize: vertical;
    font-family: Arial, Helvetica, sans-serif;
}

.customer-quote-reason-row td {
    background: #fcfdff !important;
    color: #5b6884;
    font-size: 0.92rem;
}

/* empty state */
.customer-empty-state {
    background: #f8fbff;
    border: 1px dashed #d7e2f3;
    border-radius: 22px;
    padding: 32px;
    text-align: center;
}

.customer-empty-state h4 {
    margin: 0 0 10px;
    color: #1f2a44;
}

.customer-empty-state p {
    margin: 0;
    color: #556680;
}

/* edit page */
.customer-profile-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.customer-form-field--full {
    grid-column: 1 / -1;
}

.customer-profile-form .input,
.customer-profile-form input,
.customer-profile-form textarea,
.customer-profile-form select {
    width: 100%;
    border: 1px solid #dce6f5;
    border-radius: 16px;
    background: #f8fbff;
    padding: 0.95rem 1rem;
    color: #1f2a44;
    box-sizing: border-box;
    font-size: 0.96rem;
}

.customer-profile-form label {
    display: block;
    margin-bottom: 0.42rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
}

.customer-profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

/* buttons */
.btn-soft,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-soft,
.btn-secondary {
    background: #e9eef8;
    color: #1f2a44;
}

.btn-soft:hover,
.btn-secondary:hover {
    background: #dde7f6;
}

/* responsive */
@media (max-width: 1180px) {
    .customer-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .customer-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .nav-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .customer-profile-grid {
        grid-template-columns: 1fr;
    }

    .customer-form-field--full {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .customer-dashboard-hero h2 {
        font-size: 2.15rem;
    }

    .customer-summary-cards {
        grid-template-columns: 1fr;
    }

    .customer-dashboard-card {
        padding: 22px;
    }

    .dashboard-search-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/*driver dashboard */
.driver-summary-cards {
    margin: 28px 0;
}

.driver-job-segments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.driver-job-segment {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 22px rgba(31, 42, 68, 0.05);
    border: 1px solid #edf2fb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.driver-job-segment__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.driver-job-segment__header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2a44;
}

.driver-job-segment__header p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #6b7a99;
}

.driver-job-segment--requested {
    border-top: 4px solid #f59e0b;
}
.driver-job-segment--assigned {
    border-top: 4px solid #10b981;
}
.driver-job-segment--upcoming {
    border-top: 4px solid #3b82f6;
}

.driver-job-segment--past-list {
    border-top: 4px solid #94a3b8;
}

.driver-job-segment__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-job-segment__item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
}

.driver-job-segment__item--urgent {
    border-color: #fecaca;
    background: #fef2f2;
}

.driver-job-segment__item--past {
    border-color: #d5dce7;
    background: #eef2f7;
}

.driver-job-segment__item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.driver-job-segment__item-head h4 {
    margin: 0;
    font-size: 0.96rem;
    color: #1f2a44;
}

.driver-job-segment__time {
    font-size: 0.78rem;
    color: #6b7a99;
    text-align: right;
}

.driver-job-segment__destination {
    margin: 6px 0;
    font-size: 0.86rem;
    color: #4b5563;
}

.driver-job-segment__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.driver-job-segment__empty {
    margin: 0;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.86rem;
}

.driver-dashboard-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.05);
    border: 1px solid #edf2fb;
}

input[type="date"],
input[type="month"],
input[type="week"],
.driver-calendar-date {
    appearance: none;
    background: #f8fbff;
    border: 1px solid #dce6fb;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.05);
    color: #1f2a44;
    font-weight: 700;
    min-height: 44px;
    padding: 0.68rem 0.9rem;
}

input[type="date"]:hover,
input[type="month"]:hover,
input[type="week"]:hover,
.driver-calendar-date:hover {
    background: #ffffff;
    border-color: #b9cdf8;
}

input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
.driver-calendar-date:focus {
    border-color: #4f7df0;
    box-shadow: 0 0 0 4px rgba(79, 125, 240, 0.14);
    outline: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    background-color: #eef4ff;
    border-radius: 999px;
    cursor: pointer;
    padding: 0.35rem;
}

.themed-date-control {
    display: block;
    position: relative;
    width: 100%;
}

.themed-date-input {
    appearance: none;
    border: 0 !important;
    box-shadow: none !important;
    height: 0 !important;
    left: -9999px;
    margin: 0 !important;
    min-height: 0 !important;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: auto;
    width: 0 !important;
}

.themed-date-button {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #dce6fb;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.05);
    color: #1f2a44;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: 0;
    min-height: 46px;
    padding: 0.72rem 0.95rem;
    text-align: left;
    text-transform: none;
    width: 100%;
}

.themed-date-button::after {
    background: #eef4ff;
    border-radius: 999px;
    color: #4f7df0;
    content: "⌄";
    display: inline-grid;
    font-size: 1rem;
    height: 28px;
    margin-left: 0.75rem;
    place-items: center;
    width: 28px;
}

.themed-date-button:hover,
.themed-date-button[aria-expanded="true"] {
    background: #ffffff;
    border-color: #b9cdf8;
    color: #1f2a44;
    box-shadow: 0 12px 24px rgba(31, 42, 68, 0.08);
}

.themed-date-button:focus-visible {
    border-color: #4f7df0;
    color: #1f2a44;
    box-shadow: 0 0 0 4px rgba(79, 125, 240, 0.14);
    outline: 0;
}

.themed-date-button.is-empty {
    color: #64748b;
}

.themed-date-popover {
    background: #ffffff;
    border: 1px solid #dce6fb;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(31, 42, 68, 0.18);
    box-sizing: border-box;
    left: 0;
    margin-top: 10px;
    padding: 14px;
    position: absolute;
    top: 100%;
    width: min(330px, 92vw);
    z-index: 1200;
}

.themed-date-header {
    align-items: center;
    background: #eef4ff;
    border: 1px solid #dbe6fb;
    border-radius: 16px;
    display: grid;
    gap: 8px;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    margin-bottom: 12px;
    padding: 8px;
}

.themed-date-header strong {
    color: #1f2a44;
    font-size: 0.98rem;
    text-align: center;
}

.themed-date-nav {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dce6fb;
    border-radius: 12px;
    color: #365fd7;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.35rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 38px;
}

.themed-date-weekdays,
.themed-date-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.themed-date-weekdays {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    text-align: center;
    text-transform: uppercase;
}

.themed-date-day {
    align-items: center;
    aspect-ratio: 1;
    background: #f8fbff;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #1f2a44;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.themed-date-day:hover:not(:disabled),
.themed-date-day:focus-visible:not(:disabled) {
    background: #eef4ff;
    border-color: #b9cdf8;
    outline: 0;
}

.themed-date-day.is-muted {
    color: #8a98ad;
}

.themed-date-day.is-today {
    border-color: #4f7df0;
}

.themed-date-day.is-selected {
    background: #4f7df0;
    border-color: #4f7df0;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(79, 125, 240, 0.26);
}

.themed-date-day:disabled {
    background: #f1f5fb;
    border-color: #edf2f8;
    color: #7b8aa3;
    cursor: not-allowed;
    opacity: 1;
}

.themed-date-nav:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.driver-calendar-panel {
    margin-top: 26px;
    scroll-margin-top: 20px;
}

.driver-calendar-card {
    scroll-margin-top: 20px;
}

.driver-calendar-panel--full {
    width: 100%;
}

.driver-calendar-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    background: #f8fbff;
    border: 1px solid #e4ecfa;
    border-radius: 20px;
    padding: 16px;
}

.driver-calendar-panel__subtitle {
    margin: 10px 0 0;
    color: #6c7a96;
    font-size: 1rem;
}

.driver-calendar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.driver-calendar-jump {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.driver-calendar-date {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #dce6fb;
    background: #ffffff;
    color: #1f2a44;
    font: inherit;
}

.driver-calendar-btn,
.driver-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

.driver-calendar-btn {
    min-height: 42px;
    min-width: 42px;
    padding: 10px 16px;
    border-color: #dce6fb;
    background: #eef4ff;
    color: #355ecc;
}

.driver-calendar-btn:hover {
    background: #e3edff;
}

.driver-calendar-btn--picker {
    padding: 10px 12px;
}

.driver-calendar-btn--active {
    background: #4f7df0;
    color: #ffffff;
    border-color: #4f7df0;
}

.driver-action-btn--review {
    background: #e8effb;
    color: #1f2a44;
}

.driver-action-btn--review:hover {
    background: #dfe8f8;
}

.driver-action-btn--accept {
    background: #dcfce7;
    color: #166534;
}

.driver-action-btn--accept:hover {
    background: #c8f3d7;
}

.driver-action-btn--reject {
    background: #fee2e2;
    color: #991b1b;
}

.driver-action-btn--reject:hover {
    background: #f8cfcf;
}

.driver-action-btn--disabled,
.driver-action-btn:disabled,
.customer-quote-btn--disabled,
.customer-quote-btn:disabled {
    background: #e6ebf3 !important;
    border-color: #d8e1ef !important;
    color: #73819a !important;
    cursor: not-allowed !important;
    opacity: 1;
    pointer-events: none;
}

.completion-action-note {
    align-items: center;
    color: #6b7890;
    display: inline-flex;
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.35;
    min-height: 40px;
}

.driver-calendar-grid {
    display: grid;
    gap: 14px;
}

.driver-calendar-grid-week {
    grid-template-columns: repeat(7, minmax(145px, 1fr));
}

.driver-calendar-grid-day {
    grid-template-columns: 1fr;
}

.driver-day-column {
    background: #ffffff;
    border: 1px solid #e5edf7;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.05);
    min-height: 280px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.driver-day-column:hover {
    border-color: #c7d8fb;
    box-shadow: 0 14px 30px rgba(31, 42, 68, 0.08);
    transform: translateY(-1px);
}

.driver-day-header {
    padding: 16px 18px;
    background: #eef4ff;
    border-bottom: 1px solid #dbe6fb;
}

.driver-day-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #4f7df0;
    text-transform: uppercase;
}

.driver-day-date {
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2a44;
}

.driver-day-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.driver-empty-slot {
    color: #64748b;
    font-size: 0.92rem;
    background: #ffffff;
    border: 1px dashed #d6dfed;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
}

.driver-job-card {
    border-radius: 16px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 42, 68, 0.06);
    min-width: 0;
}

.driver-job-card--confirmed {
    border: 2px solid #d7e7ff;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.driver-job-card--pending {
    border: 2px dashed #f5b942;
    background: #fffaf0;
}

.driver-job-card--rejected {
    border: 2px solid #fecaca;
    background: #fff7f7;
}

.driver-job-card--past {
    border: 2px solid #d5dce7;
    background: linear-gradient(180deg, #f2f5f9 0%, #e8edf4 100%);
}

.driver-job-card__top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.driver-job-card__title-group {
    width: 100%;
    min-width: 0;
}

.driver-job-card__top h4 {
    margin: 0;
    color: #1f2a44;
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
}

.driver-job-time {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #355ecc;
    font-weight: 700;
    font-size: 0.75rem;
}

.driver-job-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    max-width: 100%;
    background: #eef4ff;
    color: #355ecc;
}

.driver-job-card--pending .driver-job-status {
    background: #fef3c7;
    color: #b45309;
}

.driver-job-card--rejected .driver-job-status {
    background: #fee2e2;
    color: #b91c1c;
}

.driver-job-destination {
    margin: 0 0 12px;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.driver-job-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.driver-job-card__actions form {
    margin: 0;
}

.driver-job-card__actions .driver-action-btn {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 0.82rem;
    width: auto;
}

.driver-edit-actions {
    margin-bottom: 26px;
}

.driver-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    background: #eef4ff;
    color: #355ecc;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid #dce6fb;
    transition: all 0.18s ease;
}

.driver-secondary-btn:hover {
    background: #e3edff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(53, 94, 204, 0.10);
}

.driver-edit-save-btn {
    min-width: 170px;
    background: #4f7df0;
    color: #ffffff;
    border-color: #4f7df0;
}

.driver-edit-save-btn:hover {
    background: #3f6ddd;
}

@media (max-width: 1200px) {
    .driver-calendar-grid-week {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .driver-calendar-grid-week {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .driver-dashboard-card {
        padding: 22px;
        border-radius: 24px;
    }

    .driver-calendar-panel__header {
        flex-direction: column;
        align-items: stretch;
    }

    .driver-calendar-actions {
        width: 100%;
    }
}

@media (max-width: 414px) {
    .driver-calendar-grid-week {
        grid-template-columns: 1fr;
    }
}

/* Accessibility and flash utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: #102a4c;
    color: #ffffff;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 2000;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
    outline: 3px solid #ffd54f;
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}

.message {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-body {
    flex: 1 1 auto;
    min-width: 0;
}

.message-close {
    flex: 0 0 32px;
    align-self: flex-start;
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.message-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

.message-close:hover {
    background-color: rgba(0, 0, 0, 0.06);
    opacity: 0.85;
}

.message-close:active {
    transform: scale(0.95);
}

.char-counter {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: #4a5672;
}

.char-counter--over {
    color: #a1271f;
    font-weight: 600;
}

/*
 * Server-side validation error indicators. CakePHP's default Form helper
 * wraps a failing field's container in `.input.error` and adds the
 * `form-error` class to the control itself. These rules give the field a
 * red border, pale red background, and an icon-prefixed error message so
 * the failure state is obvious without relying on colour alone.
 */
.input.error input,
.input.error select,
.input.error textarea,
input.form-error,
select.form-error,
textarea.form-error,
.is-invalid {
    border: 1px solid #a1271f !important;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(161, 39, 31, 0.12);
}

.input.error input:focus,
.input.error select:focus,
.input.error textarea:focus,
input.form-error:focus,
select.form-error:focus,
textarea.form-error:focus,
.is-invalid:focus {
    outline-color: #a1271f;
}

.input.error > label {
    color: #a1271f;
    font-weight: 700;
}

.error-message {
    display: block;
    margin-top: 6px;
    padding: 6px 10px;
    background-color: #fef2f2;
    border-left: 3px solid #a1271f;
    color: #a1271f;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
}

.error-message::before {
    content: '\26A0';
    margin-right: 6px;
    font-weight: 700;
}

/* Layout utility helpers replacing ad-hoc inline styles across templates. */
.stack-12 { margin-bottom: 12px; }
.stack-18 { margin-bottom: 18px; }
.stack-24 { margin-bottom: 24px; }
.push-16  { margin-top: 16px; }
.push-20  { margin-top: 20px; }
.auth-link-gap { margin: 8px 0 16px; }
.narrow-shell  { max-width: 980px; margin: 0 auto; }
.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.actions-row--centered {
    justify-content: center;
    align-items: center;
}

/*
 * Required-field indicator. The :has() form targets labels whose wrapper
 * contains a required input; .required / [data-required] are fallbacks for
 * templates that render their own label markup.
 */
.form-required-hint {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: #4a5672;
}

.form-required-hint::before {
    content: '*';
    color: #a1271f;
    font-weight: 700;
    margin-right: 4px;
}

.enhanced-field:has(input:required) > label::after,
.enhanced-field:has(select:required) > label::after,
.enhanced-field:has(textarea:required) > label::after,
.form-group:has(input:required) > label::after,
.form-group:has(select:required) > label::after,
.form-group:has(textarea:required) > label::after,
.input.required > label::after,
label.required::after,
label[data-required="true"]::after {
    content: ' *';
    color: #a1271f;
    font-weight: 700;
    margin-left: 2px;
}

/* Submit loading state */
button[data-loading="true"],
input[type="submit"][data-loading="true"] {
    opacity: 0.7;
    cursor: progress;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}


/*
 * Mobile overrides — placed at the end of the file so they win the cascade
 * against every base rule above. Target viewports ≤ 600 px.
 */
@media (max-width: 600px) {
    .container {
        width: 100%;
        padding-left: 14px;
        padding-right: 14px;
        box-sizing: border-box;
    }

    /*
     * Belt-and-braces: if any single element tries to be wider than the
     * viewport on mobile (long email address, unbroken URL, fixed-width
     * form control), clip it rather than causing horizontal page scroll.
     */
    .site-main {
        overflow-x: hidden;
    }

    .auth-header h2,
    .auth-header--login h2 {
        font-size: 1.6rem;
    }

    .auth-header p {
        font-size: 0.95rem;
    }

    .showcase__copy h1,
    .showcase__copy .showcase__lede {
        font-size: 1.85rem;
        letter-spacing: -0.01em;
    }

    .brand-text .brand-title {
        font-size: 1.35rem;
    }

    .brand-text p {
        font-size: 0.85rem;
    }
}

/* Final mobile safety rails */
@media (max-width: 600px) {
    .auth-card,
    .auth-card--login,
    .auth-card--wide,
    .login-page-shell,
    .enhanced-form-shell,
    .content-card,
    .detail-card,
    .form-card {
        max-width: 100%;
        box-sizing: border-box;
    }

    .form-group,
    .enhanced-field,
    .form-control,
    .auth-form input,
    .auth-form select,
    .auth-form textarea,
    .enhanced-input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

    .auth-card--login {
        padding: 1.25rem 1rem;
    }

    .auth-header p,
    .showcase__copy p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}
/*customer back button from edit*/
.customer-edit-back-wrap {
    margin-bottom: 1rem;
}

.customer-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #e9eef8;
    color: #1f2a44;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid #d9e3f3;
    transition: background 0.2s ease, transform 0.2s ease;
}

.customer-back-btn:hover {
    background: #dbe7fb;
    color: #1f2a44;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive dashboard/table fix - Adjustable to different screens */

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

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img,
iframe,
table,
input,
select,
textarea,
button {
    max-width: 100%;
}

.container,
.customer-dashboard-shell,
.driver-dashboard-shell,
.account-shell,
.page-shell {
    max-width: 100%;
}

.site-main,
.dashboard-section,
.customer-dashboard-page,
.driver-dashboard-page {
    max-width: 100%;
    overflow-x: hidden;
}

.content-card,
.detail-card,
.form-card,
.jobs-card,
.dashboard-card,
.customer-dashboard-card,
.customer-page-card,
.driver-dashboard-hero,
.driver-job-segment,
.auth-card,
.account-form-card,
.account-side-card {
    max-width: 100%;
    min-width: 0;
}

.detail-grid,
.form-grid,
.customer-profile-grid,
.customer-account-mini,
.customer-account-mini--two-col,
.enhanced-form-grid.two-col,
.ops-summary-grid,
.customer-summary-cards,
.driver-summary-cards,
.account-grid,
.driver-job-segments {
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.full-width,
.customer-account-box--full,
.customer-form-field--full,
.enhanced-field.full-width {
    grid-column: 1 / -1;
}

.table-wrap,
.customer-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table,
.jobs-table,
.customer-bookings-table {
    width: 100%;
    min-width: 640px;
}

td,
th,
.detail-box .value,
.customer-account-box strong,
.message-text {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.nav-wrapper,
.main-nav,
.page-header,
.detail-header,
.header-actions,
.customer-dashboard-card__header,
.driver-job-segment__header,
.customer-quote-actions,
.btn-row,
.actions-row,
.form-actions,
.auth-actions {
    max-width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .container {
        width: 94%;
    }

    .content-card,
    .detail-card,
    .form-card,
    .jobs-card,
    .dashboard-card,
    .customer-dashboard-card,
    .customer-page-card,
    .auth-card {
        padding: 20px;
        border-radius: 20px;
    }

    .customer-dashboard-card__header,
    .detail-header,
    .page-header,
    .driver-dashboard-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions a,
    .header-actions button,
    .customer-dashboard-quick-link,
    .driver-action-btn,
    .customer-quote-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .container {
        width: 96%;
    }

    .nav-wrapper {
        padding: 14px;
        border-radius: 18px;
    }

    .main-nav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .main-nav a {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 10px 12px;
        border-radius: 999px;
        background: #eef4ff;
    }

    .main-nav .btn-primary {
        grid-column: 1 / -1;
    }

    .customer-summary-cards,
    .ops-summary-grid,
    .driver-summary-cards,
    .detail-grid,
    .form-grid,
    .customer-profile-grid,
    .customer-account-mini,
    .enhanced-form-grid.two-col {
        grid-template-columns: 1fr;
    }
}
/* form layouts*/
.enhanced-form-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.enhanced-field.full-width {
    grid-column: 1 / -1;
}

.enhanced-field input,
.enhanced-field select,
.enhanced-field textarea {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .enhanced-form-grid.two-col {
        grid-template-columns: 1fr;
    }

    .enhanced-field.full-width {
        grid-column: auto;
    }
}

/* form fixes */

/* ---------- Global Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ---------- Containers ---------- */
.container,
.page-shell,
.account-shell,
.customer-dashboard-shell,
.driver-dashboard-shell,
.site-main,
.dashboard-section {
    width: 100%;
    max-width: 100%;
}

/* ---------- Cards ---------- */
.auth-card,
.enhanced-form-shell,
.form-card,
.content-card,
.detail-card,
.jobs-card,
.dashboard-card,
.customer-dashboard-card,
.customer-page-card,
.account-form-card,
.account-side-card {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
    box-sizing: border-box;
}

/* ---------- FORM GRID FIX ---------- */
/* kills ugly 3 columns everywhere */
.enhanced-form-grid,
.enhanced-form-grid.two-col,
.form-grid,
.customer-profile-grid,
.driver-profile-grid,
.account-grid,
.detail-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 22px !important;
    align-items: start;
    width: 100%;
}

.enhanced-form-grid > *,
.form-grid > *,
.customer-profile-grid > *,
.driver-profile-grid > *,
.account-grid > *,
.detail-grid > * {
    min-width: 0;
}

/* ---------- FULL WIDTH FIELDS ---------- */
.full-width,
.enhanced-field.full-width,
.customer-form-field--full,
.customer-account-box--full {
    grid-column: 1 / -1 !important;
}

/* ---------- Inputs ---------- */
input,
select,
textarea,
button,
.enhanced-input {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    box-sizing: border-box;
}

input,
select,
textarea {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

/* ---------- Focus ---------- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f7df0;
    box-shadow: 0 0 0 3px rgba(79,125,240,.12);
}

/* ---------- Labels ---------- */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1f2a44;
}

/* ---------- Buttons ---------- */
.auth-actions,
.form-actions,
.customer-form-actions,
.enhanced-form-actions,
.btn-row,
.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.auth-actions,
.form-actions,
.customer-form-actions {
    margin-top: 24px;
}

.btn-primary,
.save-btn,
.btn-add,
.btn-edit {
    background: #4f7df0;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
}

.btn-back,
.btn-view,
.btn-clear {
    background: #e9eef8;
    color: #1f2a44;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Feedback ---------- */
.live-feedback {
    min-height: 20px;
    margin-top: 6px;
    font-size: .84rem;
    line-height: 1.35;
}

.live-feedback.error {
    color: #c62828;
}

.live-feedback.success {
    color: #15803d;
}

/* ---------- Tables ---------- */
.table-wrap,
.customer-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table,
.jobs-table,
.customer-bookings-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td,
.jobs-table th,
.jobs-table td {
    padding: 14px;
    vertical-align: top;
    border-bottom: 1px solid #edf1f7;
}

th,
td,
.detail-box .value,
.message-text,
.customer-account-box strong {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ---------- Detail / Header Rows ---------- */
.page-header,
.detail-header,
.header-actions,
.customer-dashboard-card__header,
.driver-job-segment__header {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* ---------- Dashboard Summary Cards ---------- */
.ops-summary-grid,
.customer-summary-cards,
.driver-summary-cards,
.dashboard-stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ops-summary-card,
.dashboard-stat-card {
    background: #fff;
    border: 1px solid #e4ecfb;
    border-radius: 18px;
    padding: 18px;
}

/* ---------- Customer Mini Boxes ---------- */
.customer-account-mini,
.customer-account-mini--two-col {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0,1fr));
}

.customer-account-box {
    background: #f8faff;
    border: 1px solid #edf1f7;
    border-radius: 16px;
    padding: 16px;
}

/* ---------- Responsive Tablet ---------- */
@media (max-width: 900px) {

    .auth-card,
    .form-card,
    .content-card,
    .detail-card,
    .jobs-card,
    .customer-dashboard-card {
        padding: 20px;
        border-radius: 20px;
    }

    .page-header,
    .detail-header,
    .customer-dashboard-card__header {
        flex-direction: column;
        align-items: stretch;
    }

    .enhanced-form-grid,
    .enhanced-form-grid.two-col,
    .form-grid,
    .customer-profile-grid,
    .driver-profile-grid,
    .account-grid,
    .detail-grid,
    .customer-account-mini,
    .customer-account-mini--two-col {
        grid-template-columns: 1fr !important;
    }

    .auth-actions,
    .form-actions,
    .customer-form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-back,
    .save-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Responsive Mobile ---------- */
@media (max-width: 600px) {

    .container {
        width: 96%;
    }

    .main-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .main-nav a {
        width: 100%;
        text-align: center;
        padding: 10px 12px;
        border-radius: 999px;
        background: #eef4ff;
    }

    .main-nav .btn-primary {
        grid-column: 1 / -1;
    }

    .admin-table,
    .jobs-table,
    .customer-bookings-table {
        min-width: 640px;
    }

    .btn-row,
    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---------- Final Safety Override ---------- */
/* if old css forces 3 columns, this wins */
.enhanced-form-grid,
.form-grid,
.customer-profile-grid,
.driver-profile-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
}

@media (max-width: 900px) {
    .enhanced-form-grid,
    .form-grid,
    .customer-profile-grid,
    .driver-profile-grid {
        grid-template-columns: 1fr !important;
    }
}

/* responsive container fix - layout bug */

.container {
    width: min(92vw, 1240px);
    max-width: 1240px;
}

@media (min-width: 1200px) {
    .container {
        width: min(94vw, 1500px);
        max-width: 1500px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 92vw;
    }

    .nav-wrapper {
        border-radius: 20px;
    }
}


/* customer dashboard */

.customer-dashboard-page {
    padding: 2rem 0 4rem;
}

.customer-dashboard-shell {
    width: min(88vw, 1180px);
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.customer-dashboard-hero,
.customer-dashboard-card,
.customer-dashboard-card--quotes,
.customer-page-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.customer-dashboard-hero {
    padding: 2rem 2.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customer-dashboard-hero h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
}

.customer-summary-grid {
    width: min(94vw, 1400px);
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}

.customer-summary-grid .ops-summary-card,
.customer-summary-grid > * {
    min-height: 105px;
    box-sizing: border-box;
}

.customer-dashboard-search-card,
.customer-search-card,
.page-search-card {
    width: min(88vw, 1180px);
    max-width: 1180px;
    margin: 0 auto;
    box-sizing: border-box;
}

.customer-dashboard-card--quotes {
    width: min(88vw, 1180px);
    max-width: 1180px;
    margin: 0 auto;
}

/* Large screens: do not stretch too much */
@media (min-width: 1400px) {
    .customer-dashboard-shell,
    .customer-dashboard-search-card,
    .customer-search-card,
    .page-search-card,
    .customer-dashboard-card--quotes {
        width: 1180px;
    }

    .customer-summary-grid {
        width: 1400px;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .customer-dashboard-shell,
    .customer-dashboard-search-card,
    .customer-search-card,
    .page-search-card,
    .customer-dashboard-card--quotes {
        width: 92vw;
    }

    .customer-dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }

    .customer-summary-grid {
        width: 92vw;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 600px) {
    .customer-summary-grid {
        grid-template-columns: 1fr;
    }

    .customer-dashboard-hero,
    .customer-dashboard-card,
    .customer-dashboard-card--quotes,
    .customer-page-card {
        padding: 1.25rem;
        border-radius: 22px;
    }

    .customer-dashboard-hero h2 {
        font-size: 1.85rem;
    }

    .customer-dashboard-hero__actions {
        width: 100%;
    }

    .customer-dashboard-quick-link {
        width: 100%;
    }
}


/* Maps address suggestion*/
.address-autocomplete-wrap {
    position: relative;
    width: 100%;
}

.address-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(31, 42, 68, 0.16);
    overflow: hidden;
    max-height: 260px;
    overflow-y: auto;
}

.address-suggestions[hidden] {
    display: none;
}

.address-suggestion-item {
    display: block;
    width: 100%;
    border: 0;
    background: #ffffff;
    padding: 12px 14px;
    text-align: left;
    color: #1f2a44;
    font-size: 0.95rem;
    line-height: 1.35;
    cursor: pointer;
}

.address-suggestion-item:hover,
.address-suggestion-item:focus {
    background: #eef4ff;
    outline: none;
}


/* fixing the layout of address suggestions*/
.address-autocomplete-wrap {
    position: relative;
    width: 100%;
}

.address-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 99999;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(31, 42, 68, 0.18);
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

.address-suggestions[hidden] {
    display: none;
}

.address-suggestion-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.address-suggestion-item:last-child {
    border-bottom: 0;
}

.address-suggestion-item:hover,
.address-suggestion-item:focus {
    background: #eef4ff;
    outline: none;
}

.address-suggestion-main {
    color: #1f2a44;
    font-weight: 700;
    font-size: 0.95rem;
}

.address-suggestion-sub {
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.35;
}

.address-autocomplete-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.address-autocomplete-row .enhanced-input,
.enhanced-field .address-autocomplete-row input,
.enhanced-field .address-autocomplete-row textarea {
    min-width: 0;
}

.address-autocomplete-row input,
.address-autocomplete-row textarea {
    background-image: none !important;
    background-repeat: no-repeat !important;
}

.address-autocomplete-row input.is-invalid,
.address-autocomplete-row textarea.is-invalid {
    background: #fff7f7 !important;
}

.pac-container .gm-err-autocomplete,
.pac-container .gm-err-container,
.pac-container .gm-err-content,
.pac-container .dismissButton,
.gm-err-autocomplete,
.gm-err-container,
.gm-err-content {
    display: none !important;
}

.pac-container:has(.gm-err-autocomplete),
.pac-container:has(.gm-err-container),
.pac-container:has(.gm-err-content) {
    display: none !important;
}

.address-current-location-btn {
    appearance: none;
    border: 2px solid #dbe4f0;
    border-radius: 16px;
    background: #f8fbff;
    color: #1f2a44;
    min-height: 56px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.address-current-location-btn:hover,
.address-current-location-btn:focus {
    border-color: #4f7cf0;
    background: #eef4ff;
    color: #2f5fd7;
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 124, 240, 0.12);
}

.address-current-location-btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

.address-current-location-btn__icon {
    border: 1px solid #bdd0f1;
    border-radius: 999px;
    color: #2f5fd7;
    font-size: 0.7rem;
    line-height: 1.4;
    padding: 1px 6px;
}

.checkbox-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #1f2a44;
    cursor: pointer;
}

.checkbox-control input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: checkbox;
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    flex: 0 0 auto;
}

.stairs-field {
    gap: 10px;
}

.stairs-field .checkbox-control {
    margin-bottom: 0;
    min-height: 28px;
}

.stairs-field .checkbox-control span {
    line-height: 1.2;
}

.stairs-field .enhanced-input[type="number"],
.stairs-field input[type="number"] {
    margin-top: 2px;
}

.stairs-field .enhanced-input[type="number"]:disabled,
.stairs-field input[type="number"]:disabled {
    background: #f8fbff;
    color: #7b879d;
    cursor: not-allowed;
    opacity: 0.9;
}

.address-vic-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    color: #536789;
    font-weight: 600;
}

.address-vic-notice::before {
    content: 'VIC';
    border: 1px solid #bdd0f1;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f5fd7;
    padding: 1px 7px;
    font-size: 0.72rem;
    line-height: 1.5;
    letter-spacing: 0;
}

@media (max-width: 700px) {
    .address-autocomplete-row {
        grid-template-columns: 1fr;
    }

    .address-current-location-btn {
        width: 100%;
    }
}

/* === Sprint additions: customer dashboard redesign + Stripe invoice flow === */

.customer-settings {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.customer-settings__toggle {
    appearance: none;
    border: 1px solid #d6deeb;
    background: #ffffff;
    color: #4d5a73;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    font-size: 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.customer-settings__toggle:hover,
.customer-settings__toggle[aria-expanded="true"] {
    background: #eef4ff;
    border-color: #b9caee;
    color: #2f5fd7;
}

.customer-settings__toggle:focus-visible {
    outline: 2px solid #4f7cf0;
    outline-offset: 2px;
}

.customer-settings__icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.customer-settings__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    padding: 8px;
    z-index: 40;
}

.customer-settings__menu[hidden] {
    display: none;
}

.customer-settings__menu-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #2c3957;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.customer-settings__menu-item:hover,
.customer-settings__menu-item:focus-visible {
    background: #eef4ff;
    color: #2f5fd7;
    outline: none;
}

@media (max-width: 640px) {
    .customer-settings__menu {
        right: -8px;
    }
}

/* Tighter nav at mid widths so all items stay on a single row down to
   ~880px; prevents the navbar from ballooning to two rows around 1000px. */
@media (max-width: 1024px) {
    .main-nav {
        gap: 10px;
    }
    .main-nav .nav-link {
        padding: 10px 12px;
    }
}

/* Anchor the admin settings dropdown to the viewport at any width where
   the nav might wrap (i.e. as soon as the layout gets unpredictable).
   Targeted by ID so it can't bleed into the customer-side cog and so we
   don't depend on the :has() pseudo-class. */
@media (max-width: 1024px) {
    #admin-settings-menu {
        position: fixed;
        top: 76px;
        right: 12px;
        left: auto;
        min-width: 200px;
        max-width: calc(100vw - 24px);
    }
}

.enquiry-timeline {
    margin-top: 8px;
}

.enquiry-timeline__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.enquiry-timeline__item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding-bottom: 22px;
    position: relative;
}

.enquiry-timeline__item:last-child {
    padding-bottom: 0;
}

.enquiry-timeline__marker {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40px;
    align-self: stretch;
}

.enquiry-timeline__circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #cbd2da;
    color: #ffffff;
    flex-shrink: 0;
    z-index: 1;
    filter: drop-shadow(0px -4px 24px rgba(168, 168, 168, 0.4));
}

.enquiry-timeline__circle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.enquiry-timeline__connector {
    position: absolute;
    top: 36px;
    left: 20px;
    transform: translateX(-50%);
    width: 3px;
    bottom: 0;
    background: #e2e8f0;
}

.enquiry-timeline__content {
    padding-top: 2px;
}

.enquiry-timeline__label {
    margin: 0 0 4px;
    font-weight: 700;
    color: #4d5a73;
    font-size: 0.98rem;
}

.enquiry-timeline__description {
    margin: 0;
    color: #60708f;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Done */
.enquiry-timeline__item--done .enquiry-timeline__circle {
    background: #167546;
    border-color: #167546;
}

.enquiry-timeline__item--done .enquiry-timeline__connector {
    background: #167546;
}

/* Progress connector behaviour:
   - Done → Done: rule above wins (fully green).
   - Done → anything-not-done: top half green, bottom half neutral grey,
     so the line communicates "we've left this step, but haven't crossed
     into the next one yet". Uses :has() (supported in all current
     evergreen browsers — older browsers fall back to fully green, which
     is still readable). */
.enquiry-timeline__item--done:has(+ .enquiry-timeline__item:not(.enquiry-timeline__item--done)) .enquiry-timeline__connector {
    background: linear-gradient(to bottom, #167546 0%, #167546 50%, #e2e8f0 50%, #e2e8f0 100%);
}

/* Done → Failed: top half green, bottom half faded red, matching the
   existing failed-connector colour so a transition into failure reads
   distinct from a transition into "not yet done". */
.enquiry-timeline__item--done:has(+ .enquiry-timeline__item--failed) .enquiry-timeline__connector {
    background: linear-gradient(to bottom, #167546 0%, #167546 50%, #f1c2c2 50%, #f1c2c2 100%);
}

.enquiry-timeline__item--done .enquiry-timeline__label {
    color: #167546;
}

/* Current */
.enquiry-timeline__item--current .enquiry-timeline__circle {
    border-color: #4f7cf0;
    background: #ffffff;
    color: #4f7cf0;
    position: relative;
}

.enquiry-timeline__pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4f7cf0;
    box-shadow: 0 0 0 0 rgba(79, 124, 240, 0.45);
    animation: enquiry-timeline-pulse 1.6s ease-out infinite;
}

@keyframes enquiry-timeline-pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 124, 240, 0.45); }
    70% { box-shadow: 0 0 0 10px rgba(79, 124, 240, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 124, 240, 0); }
}

.enquiry-timeline__item--current .enquiry-timeline__label {
    color: #2f5fd7;
}

/* Failed */
.enquiry-timeline__item--failed .enquiry-timeline__circle {
    background: #bf3131;
    border-color: #bf3131;
}

.enquiry-timeline__item--failed .enquiry-timeline__connector {
    background: #f1c2c2;
}

.enquiry-timeline__item--failed .enquiry-timeline__label {
    color: #bf3131;
}

/* Blocked */
.enquiry-timeline__item--blocked .enquiry-timeline__circle {
    border-color: #e2e8f0;
    background: #f6f8fb;
}

.enquiry-timeline__item--blocked .enquiry-timeline__label,
.enquiry-timeline__item--blocked .enquiry-timeline__description {
    color: #adb6c8;
}

/* Pending (default styling already grey) */
.enquiry-timeline__item--pending .enquiry-timeline__circle {
    background: #ffffff;
}

/* Inline action area beneath each step */
.enquiry-timeline__extras {
    margin-top: 10px;
}

.enquiry-timeline__action {
    appearance: none;
    border: 1px solid #d6deeb;
    background: #ffffff;
    color: #2f5fd7;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.enquiry-timeline__action:hover {
    background: #eef4ff;
    border-color: #b9caee;
}

/* Quote card under the combined Quote step */
.quote-card {
    border: 1px solid #d6deeb;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f8fafd;
    max-width: 380px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.quote-card--accepted {
    border-color: #b3dec4;
    background: #f1faf4;
}

.quote-card--rejected,
.quote-card--expired {
    border-color: #f1c2c2;
    background: #fdf3f3;
}

.quote-card__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.quote-card__row--meta {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #60708f;
}

.quote-card__label {
    font-size: 0.85rem;
    color: #60708f;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.quote-card__amount {
    font-size: 1.4rem;
    color: #1f2a44;
    font-weight: 700;
}

.quote-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.quote-card__btn {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.18s ease;
}

.quote-card__btn:hover {
    filter: brightness(0.95);
}

.quote-card__btn--accept {
    background: #167546;
    color: #ffffff;
}

.quote-card__btn--reject {
    background: #bf3131;
    color: #ffffff;
}

.quote-card__btn--cancel {
    background: #eef1f6;
    color: #4d5a73;
}

.quote-card__note {
    margin: 12px 0 0;
    font-size: 0.92rem;
    color: #4d5a73;
}

.quote-card__note--accepted {
    color: #167546;
    font-weight: 600;
}

.quote-card__note--rejected {
    color: #bf3131;
    font-weight: 600;
}

.quote-card__reason {
    display: block;
    margin-top: 4px;
    font-weight: 500;
    color: #6b3232;
}

/* Generic modal overlay + panel */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-panel {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    max-width: 460px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 20px 22px 22px;
}

.modal-panel--wide {
    max-width: 720px;
}

.modal-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-panel__header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #1f2a44;
}

.modal-panel__close {
    appearance: none;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #60708f;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

.modal-panel__close:hover {
    background: #eef1f6;
    color: #1f2a44;
}

.modal-panel__form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-panel__label {
    font-weight: 600;
    color: #2c3957;
    font-size: 0.92rem;
}

.modal-panel__textarea {
    border: 1px solid #d6deeb;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 90px;
}

.modal-panel__textarea:focus {
    outline: 2px solid #4f7cf0;
    outline-offset: 1px;
    border-color: #4f7cf0;
}

.modal-panel__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* === Ali sub-branch ali/error-pages · branded error body typography === */
.error-body {
    /* Sits inside .error-page-card. The .error-page-card already brings
       the brand row, padding, and shadow; this block just rules the
       heading hierarchy and any debug disclosure. */
}
.error-page-eyebrow {
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 0.35rem;
}
.error-body h1 {
    margin: 0 0 0.6rem;
    color: #1f2a44;
    font-size: 1.9rem;
    line-height: 1.2;
}
.error-page-lede {
    color: #374151;
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0 0 0.6rem;
}
.error-page-help {
    color: #4a5672;
    line-height: 1.55;
    margin: 0;
}
.error-page-debug-details {
    margin-top: 1.2rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.88rem;
}
.error-page-debug-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #1f2a44;
}
.error-page-debug-details p {
    margin: 0.4rem 0 0;
    color: #4a5672;
    word-break: break-all;
}
.btn-secondary.error-page-secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid #d7e0ef;
    color: #35507f;
    text-decoration: none;
    font-weight: 600;
    background: #ffffff;
    transition: background-color 120ms ease, border-color 120ms ease;
}
.btn-secondary.error-page-secondary-cta:hover {
    background: #f1f5fb;
    border-color: #c7d2fe;
}

/* === Ali sub-branch ali/cms-faqs · public /faq accordion === */
.faq-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 0 72px;
}
.faq-page__header {
    margin: 0 0 32px;
    padding: 38px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    gap: 28px;
    align-items: center;
    background: #eaf1fb;
    border-radius: 28px;
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.05);
}
.faq-page__header h1 {
    margin: 0;
    color: #1f2a44;
    font-size: 3rem;
    line-height: 1.08;
    max-width: 760px;
}
.faq-page__intro {
    color: #6c7a96;
    font-size: 1.12rem;
    line-height: 1.7;
    margin: 18px 0 0;
    max-width: 760px;
}
.faq-page__intro a {
    color: #2f5fd7;
    font-weight: 700;
    text-decoration: none;
}
.faq-page__intro a:hover {
    text-decoration: underline;
}
.faq-page__support {
    display: grid;
    gap: 16px;
    align-content: center;
}
.faq-page__cta {
    width: 100%;
}
.faq-page__empty {
    color: #6c7a96;
    font-style: italic;
    padding: 28px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.05);
}
.faq-search {
    max-width: 100%;
}
.faq-search__input {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border: 1px solid #d7e0ef;
    border-radius: 999px;
    font-size: 1rem;
    background: #ffffff;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.faq-search__input:focus {
    outline: none;
    border-color: #4f7cf0;
    box-shadow: 0 0 0 4px rgba(79, 124, 240, 0.14);
}
.faq-search__hint {
    margin: 8px 12px 0;
    color: #60708f;
    font-size: 0.9rem;
    min-height: 1.2em;
}
.faq-list {
    display: grid;
    gap: 24px;
}
.faq-group__title {
    font-size: 1.15rem;
    color: #1f2a44;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dfe8f5;
}
.faq-item {
    background: #ffffff;
    border: 1px solid #dfe8f5;
    border-radius: 18px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.045);
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.faq-item[open] {
    border-color: #b9cafd;
    box-shadow: 0 12px 30px rgba(31, 42, 68, 0.08);
}
.faq-item__question {
    cursor: pointer;
    list-style: none;
    padding: 18px 22px;
    font-weight: 700;
    color: #1f2a44;
    position: relative;
    padding-right: 56px;
    line-height: 1.4;
}
.faq-item__question::-webkit-details-marker {
    display: none;
}
.faq-item__question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef4ff;
    font-size: 1.25rem;
    color: #2f5fd7;
    line-height: 1;
    transition: transform 150ms ease;
}
.faq-item[open] .faq-item__question::after {
    content: '−';
}
.faq-item__answer {
    padding: 0 22px 22px;
    color: #6c7a96;
    line-height: 1.7;
}
@media (max-width: 900px) {
    .faq-page__header {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .faq-page {
        padding: 18px 0 48px;
    }
    .faq-page__header {
        padding: 22px;
        border-radius: 22px;
    }
    .faq-page__header h1 {
        font-size: 2rem;
    }
    .faq-group__title {
        font-size: 1.05rem;
    }
    .faq-item__question {
        padding: 14px 48px 14px 16px;
        font-size: 0.98rem;
    }
    .faq-item__answer {
        padding: 0 16px 18px;
    }
}

/* === Ali sub-branch ali/login-flash · verify-email notice === */
.login-verify-notice {
    margin: 14px 0 18px;
    padding: 12px 14px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #94a3b8;
    border-radius: 8px;
    color: #4b5563;
    font-size: 0.92rem;
    line-height: 1.5;
}
.login-verify-notice strong {
    display: block;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 4px;
}
.login-verify-notice a {
    color: #1d4ed8;
    text-decoration: underline;
}

/* === Ali sub-branch ali/register-fixes · roomier notes textarea === */
.register-notes-textarea {
    min-height: 9rem;
    resize: vertical;
    line-height: 1.5;
}

/* === Ali sub-branch ali/profile-polish · overflow-safe inputs === */
/* Drop this class onto any textarea or freeform search field that
   needs to stay inside its container on narrow viewports — protects
   against the horizontal-scrollbar bug UAT flagged on resize. */
.form-fluid-input,
.form-fluid-textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}
.form-fluid-textarea {
    resize: vertical;
}

/* === Ali sub-branch ali/profile-polish · View button + responsive polish === */
/* Canonical override for the customer-side View / Accept / Reject pills.
   There are three competing .customer-quote-btn declarations earlier in
   this file (from different sprints layering on top of each other). This
   block sits at the end of the cascade so we have one locked appearance:
   uniform height, uniform padding, uniform hit area regardless of which
   customer page renders the button. */
.customer-quote-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.1;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}
.customer-quote-btn:focus-visible {
    outline: 2px solid #1f2a44;
    outline-offset: 2px;
}
.customer-quote-btn--view {
    background: #e9eef8;
    color: #1f2a44;
}
.customer-quote-btn--view:hover {
    background: #dbe5f6;
}
.customer-quote-btn--accept {
    background: #e9f9ef;
    color: #13733d;
}
.customer-quote-btn--accept:hover {
    background: #d8f1e3;
}
.customer-quote-btn--reject {
    background: #fff1ec;
    color: #b44d1d;
}
.customer-quote-btn--reject:hover {
    background: #fcdfd3;
}

/* Customer dashboard at narrow widths: stack the action columns so the
   View / Accept / Reject pills aren't squeezed off the right edge, and
   let the timeline modal hug the viewport for thumb-friendly reading. */
@media (max-width: 600px) {
    .customer-bookings-table th:last-child,
    .customer-bookings-table td:last-child {
        white-space: normal;
    }
    .customer-bookings-table .customer-quote-btn {
        width: 100%;
        margin-top: 4px;
    }
    .modal-overlay .modal-panel {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 12px 12px 0 0;
    }
    .customer-dashboard-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* === Shu sub-branch ali/shu/it2-driver-phone · ongoing job mobile view === */
.driver-ongoing-page {
    padding: 1rem 0 3rem;
}

.driver-ongoing-shell {
    width: min(100%, 760px);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.driver-ongoing-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.driver-ongoing-hero h2 {
    margin: 0;
    color: #1f2a44;
    font-size: 1.9rem;
}

.driver-ongoing-hero p:last-child {
    margin: 0.5rem 0 0;
    color: #64748b;
}

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

.driver-ongoing-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    display: grid;
    gap: 10px;
}

.driver-ongoing-card--full {
    grid-column: 1 / -1;
}

.driver-ongoing-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.driver-ongoing-card h3 {
    margin: 0;
    color: #1f2a44;
    font-size: 1.35rem;
}

.driver-ongoing-contact-actions,
.driver-ongoing-actions,
.driver-ongoing-copy-row,
.driver-ongoing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 720px) {
    .driver-ongoing-grid {
        grid-template-columns: 1fr;
    }

    .driver-ongoing-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .driver-ongoing-card,
    .driver-ongoing-hero {
        border-radius: 20px;
        padding: 16px;
    }

    .driver-ongoing-hero h2 {
        font-size: 1.6rem;
    }

    .driver-ongoing-contact-actions .driver-action-btn,
    .driver-ongoing-actions .driver-action-btn,
    .driver-ongoing-copy-row .driver-action-btn,
    .driver-ongoing-hero__actions .driver-action-btn {
        width: 100%;
    }
}

/* === Ali post-deploy · customer button + table responsive hardening ===
   Defends customer-facing buttons (quote-card actions, customer dashboard
   View pills, enquiry-timeline action chips, customer back button) so
   their colours, padding, and hit area stay correct from 1440px down to
   320px. Also converts .customer-bookings-table to a stacked card layout
   below 600px so the View button no longer hides behind horizontal scroll. */

.quote-card,
.quote-card__actions,
.enquiry-timeline__extras,
.customer-dashboard-card__header {
    box-sizing: border-box;
    max-width: 100%;
}

/* The timeline is a 36px + 1fr grid. The default `1fr` resolves with a
   `min-content` floor — so when the content column holds a `.quote-card`
   with internal text or a long button label, the 1fr track can grow wider
   than the viewport and the card visually clips against the page edge.
   `minmax(0, 1fr)` explicitly lets the column shrink to zero; combined
   with min-width: 0 on the content cell it kills the auto-min-content
   behaviour for good. */
.enquiry-timeline__list {
    min-width: 0;
}
.enquiry-timeline__item {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    min-width: 0;
}
.enquiry-timeline__content {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.enquiry-timeline__extras {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.enquiry-timeline__content > *,
.enquiry-timeline__extras > * {
    max-width: 100%;
    box-sizing: border-box;
}
.quote-card {
    max-width: 100%;
    box-sizing: border-box;
}
.quote-card__actions {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.quote-card__actions {
    flex-wrap: wrap;
}

.quote-card__btn,
.customer-quote-btn,
.enquiry-timeline__action,
.customer-back-btn {
    box-sizing: border-box;
    min-height: 40px;
    min-width: 0;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 900px) {
    /* Quote-card Accept/Reject/Cancel: stack and force colours so nothing
       further down the cascade can wash them out. */
    .quote-card {
        max-width: 100%;
    }
    .quote-card__row {
        flex-wrap: wrap;
    }
    .quote-card__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .quote-card__btn {
        width: 100%;
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    .quote-card__btn--accept { background: #167546; color: #ffffff; }
    .quote-card__btn--reject { background: #bf3131; color: #ffffff; }
    .quote-card__btn--cancel { background: #eef1f6; color: #4d5a73; }

    /* Customer-side View / Accept / Reject pills: same colour lock. */
    .customer-quote-btn--view { background: #e9eef8; color: #1f2a44; }
    .customer-quote-btn--accept { background: #e9f9ef; color: #13733d; }
    .customer-quote-btn--reject { background: #fff1ec; color: #b44d1d; }

    /* "Back to Dashboard" and other header pills go full-width and keep
       their pale-blue fill instead of being squashed against the edge. */
    .customer-dashboard-card__header .customer-quote-btn,
    .customer-dashboard-card__header .customer-back-btn {
        width: 100%;
        justify-content: center;
    }

    /* Convert the enquiries table into stacked cards so the right-hand
       columns aren't hidden behind a horizontal scroll. The base table
       enforces min-width: 720px which causes horizontal overflow in
       containers narrower than that — overriding here makes the whole
       table flow as block-level cards. */
    .customer-bookings-table,
    .customer-bookings-table tbody,
    .customer-bookings-table tr,
    .customer-bookings-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .customer-bookings-table {
        min-width: 0 !important;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }
    .customer-table-wrap {
        overflow-x: visible !important;
        max-width: 100%;
    }
    /* Hide the original table header on narrow viewports — its column
       labels are surfaced per-cell via td[data-label]::before instead.
       Each property uses !important because the broader block rule above
       and earlier thead styles in the file both apply width/padding/
       background that would otherwise punch a thin strip above the row
       cards. */
    .customer-bookings-table thead,
    .customer-bookings-table thead tr,
    .customer-bookings-table thead th {
        display: block !important;
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        border: 0 !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        background: transparent !important;
    }
    .customer-bookings-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    }
    .customer-bookings-table tbody td,
    .customer-bookings-table tbody tr:last-child td {
        padding: 6px 0;
        border: none;
        background: transparent;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .customer-bookings-table td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 700;
        color: #4d5a73;
        margin-right: 6px;
    }
    .customer-bookings-table td:last-child {
        padding-top: 10px;
    }
    .customer-bookings-table .customer-quote-btn {
        width: 100%;
        margin-top: 0;
    }

    /* Modal hugs the viewport so its action row never overflows. */
    .modal-overlay .modal-panel {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 14px 14px 0 0;
        padding: 18px 16px;
    }
    .modal-panel__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .modal-panel__actions .quote-card__btn {
        width: 100%;
    }

    /* Customer page card content (Notes, free-form text): let long
       unbroken strings (addresses, emails) wrap instead of widening
       the card past the viewport. */
    .customer-dashboard-card p,
    .customer-page-card p {
        overflow-wrap: anywhere;
    }
}

/* Very narrow phones (≤380px): trim padding so two short words still fit
   on a single line in a button instead of wrapping awkwardly. */
@media (max-width: 380px) {
    .quote-card__btn,
    .customer-quote-btn,
    .enquiry-timeline__action,
    .customer-back-btn {
        padding-left: 12px;
        padding-right: 12px;
        font-size: 0.88rem;
    }
    .customer-dashboard-card,
    .customer-page-card {
        padding: 16px !important;
    }
}

/* Touch devices: enforce a 44px tap target regardless of viewport. */
@media (hover: none) and (pointer: coarse) {
    .quote-card__btn,
    .customer-quote-btn,
    .enquiry-timeline__action,
    .customer-back-btn,
    .modal-panel__close {
        min-height: 44px;
    }
}

/* Earlier @media (max-width: 900px) and (max-width: 600px) blocks blanket-set
   `.main-nav a { background: #eef4ff }`. That nukes the dark-blue fill on
   `.btn-primary` (e.g. Sign Out) while the white text stays put — result is
   invisible white-on-pale-blue. Re-assert primary buttons inside those
   breakpoints so the colour survives. */
@media (max-width: 900px) {
    .main-nav .btn-primary,
    .main-nav a.btn-primary {
        background: #4f7cf0;
        color: #ffffff !important;
        box-shadow: 0 8px 20px rgba(79, 124, 240, 0.22);
    }
    .main-nav .btn-primary:hover,
    .main-nav a.btn-primary:hover {
        background: #3f6de4;
    }
}

/* === CMS dashboard (Customise homepage) — two-column layout === */
.cms-shell {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: min(96vw, 1240px);
    margin: 24px auto 64px;
    padding: 0 14px;
    box-sizing: border-box;
}
.cms-sidebar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.05);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.cms-sidebar__header {
    border-bottom: 1px solid #eef2f8;
    padding-bottom: 14px;
    margin-bottom: 14px;
}
.cms-sidebar__eyebrow {
    margin: 0 0 4px;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f7cf0;
}
.cms-sidebar__title {
    margin: 0 0 6px;
    font-size: 1.15em;
    color: #1f2a44;
}
.cms-sidebar__hint {
    margin: 0;
    font-size: 0.85em;
    color: #6b7280;
    line-height: 1.5;
}
.cms-sidebar__group {
    margin-top: 14px;
}
.cms-sidebar__group-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.cms-sidebar__group-title {
    margin: 0;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4b5563;
}
.cms-sidebar__add {
    background: #eef4ff;
    color: #2f5fd7;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82em;
    font-weight: 700;
    text-decoration: none;
}
.cms-sidebar__add:hover,
.cms-sidebar__add--active {
    background: #d8e3fb;
}
.cms-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}
.cms-sidebar__link {
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #1f2a44;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.35;
    transition: background 0.12s ease;
}
.cms-sidebar__link small {
    display: block;
    font-weight: 500;
    font-size: 0.78em;
    color: #6b7280;
    margin-top: 3px;
}
.cms-sidebar__link:hover {
    background: #f3f6fc;
}
.cms-sidebar__link--active {
    background: #eef4ff;
    color: #1d4ed8;
    box-shadow: inset 3px 0 0 #4f7cf0;
}
.cms-sidebar__link--active small {
    color: #4f7cf0;
}
.cms-sidebar__empty {
    color: #6b7280;
    font-size: 0.88rem;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 10px;
}

.cms-main {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.05);
    min-width: 0;
}
.cms-main__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.cms-main__header h3 {
    margin: 0 0 6px;
    color: #1f2a44;
    font-size: 1.4rem;
}
.cms-main__eyebrow {
    margin: 0 0 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f7cf0;
}
.cms-main__hint {
    display: inline-block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
}
.cms-main__view-live {
    padding: 10px 16px;
    font-size: 0.92rem;
}

/* Category field: a real <select> with the existing categories, plus
   an inline "+ Add new category" option that swaps the select for a
   short text input. Only one of the two is enabled at a time so the
   form submits a single value. */
.cms-category-field [hidden] { display: none !important; }
#cms-faq-category-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d6deeb;
    border-radius: 10px;
    background: #ffffff;
    font-size: 1em;
    color: #1f2a44;
    cursor: pointer;
}
.cms-category-field__new {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.cms-category-field__new input {
    flex: 1 1 220px;
    padding: 10px 14px;
    border: 1px solid #d6deeb;
    border-radius: 10px;
    background: #ffffff;
    font-size: 1em;
    color: #1f2a44;
}
.cms-category-field__back {
    appearance: none;
    border: 1px solid #d6deeb;
    background: #ffffff;
    color: #2f5fd7;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
}
.cms-category-field__back:hover {
    background: #eef4ff;
    border-color: #b9caee;
}

/* Tappable category chips that sit below the category input. Click any
   chip to fill the input with that value; users can still type a new
   value freely. */
.cms-category-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.cms-category-suggestions__chip {
    appearance: none;
    border: 1px solid #d6deeb;
    background: #ffffff;
    color: #2f5fd7;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.cms-category-suggestions__chip:hover {
    background: #eef4ff;
    border-color: #b9caee;
}
.cms-form__hint {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}
.cms-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #ffffff;
    min-height: 160px;
}
.cms-logo-preview img {
    max-width: 100%;
    max-height: 160px;
    height: auto;
    display: block;
}
.cms-empty {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    padding: 28px;
    color: #4b5563;
    text-align: center;
}
.cms-empty h3 {
    margin: 0 0 8px;
    color: #1f2a44;
}
.cms-empty p {
    margin: 0 auto 6px;
    max-width: 44ch;
    line-height: 1.5;
}
.cms-empty__hint {
    color: #6b7280;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .cms-shell {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .cms-sidebar {
        position: static;
        max-height: none;
    }
    .cms-main {
        padding: 20px;
    }
}

/* === Admin preview banner shown on top of public pages when an admin
       is logged in. Communicates that the page is being previewed (not
       used as a customer) and offers a quick link back to the CMS. === */
.admin-preview-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    margin: 16px auto;
    width: min(96vw, 1240px);
    box-sizing: border-box;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #78491c;
    font-size: 0.95rem;
}
.admin-preview-banner strong {
    background: #f59e0b;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.admin-preview-banner__back {
    margin-left: auto;
    background: #1f2a44;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}
.admin-preview-banner__back:hover {
    background: #2f3b5c;
}
@media (max-width: 600px) {
    .admin-preview-banner__back {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* === Admin-only floating button on the public homepage === */
.cms-edit-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    background: #1f2a44;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.25);
    transition: background 0.15s ease, transform 0.15s ease;
}
.cms-edit-fab:hover {
    background: #2f3b5c;
    transform: translateY(-1px);
}
.cms-edit-fab__icon {
    font-size: 1.05rem;
    line-height: 1;
}

/* --- CMS edit pane: form + live preview side-by-side --- */
.cms-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
    gap: 24px;
    align-items: start;
}
.cms-form {
    min-width: 0;
}
.cms-form fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px 14px;
    margin: 0 0 18px;
    min-width: 0;
}
.cms-form legend {
    padding: 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4b5563;
}
.cms-form .form-group {
    margin-bottom: 14px;
}
.cms-form .form-group:last-child {
    margin-bottom: 0;
}
.cms-form__textarea-group {
    display: flex;
    flex-direction: column;
}
/* Force the counter visually below the textarea, never beside or inside it.
   It lives outside the Cake-rendered `.input.textarea` wrapper so it can
   sit cleanly as a sibling block element. */
.cms-form__counter {
    display: block;
    text-align: right;
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}
.cms-form__actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0 4px;
    margin-top: 4px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.0) 0%, #ffffff 25%);
}

/* --- Live preview pane --- */
.cms-preview {
    position: sticky;
    top: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 18px;
    min-width: 0;
}
.cms-preview__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.cms-preview__eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f7cf0;
}
.cms-preview__kind {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: #1f2a44;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 999px;
}
.cms-preview__frame {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    min-height: 120px;
    max-height: 360px;
    overflow: auto;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1f2a44;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.cms-preview__frame--html {
    width: 100%;
    border: 1px solid #e5e7eb;
    padding: 0;
}
.cms-preview__frame[hidden] {
    display: none;
}

/* Per-block preview styling — mimic the actual public-site typography
   so admins see what the saved value will look like on the homepage
   without having to navigate there. */
.cms-preview__frame--hero-headline {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2a44;
    line-height: 1.25;
}
.cms-preview__frame--hero-tagline {
    font-size: 1.05rem;
    color: #6c7a96;
    line-height: 1.55;
}
.cms-preview__frame--button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #4f7cf0;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 999px;
    padding: 14px 24px;
    min-height: 60px;
}
.cms-preview__frame--section-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2a44;
    line-height: 1.3;
}
.cms-preview__frame--card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2a44;
}
.cms-preview__frame--card-body {
    font-size: 1rem;
    color: #4d5a73;
    line-height: 1.55;
}
.cms-preview__frame--contact-line {
    font-size: 1rem;
    color: #1f2a44;
    font-weight: 600;
}
.cms-preview__placeholder {
    color: #94a3b8;
    font-style: italic;
}
.cms-preview__note {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.45;
}

/* FAQ accordion preview */
.cms-preview__faq {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
}
.cms-preview__faq summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
    color: #1f2a44;
    list-style: none;
}
.cms-preview__faq summary::-webkit-details-marker {
    display: none;
}
.cms-preview__faq summary::after {
    content: '+';
    float: right;
    color: #6b7280;
    font-weight: 400;
}
.cms-preview__faq[open] summary::after {
    content: '−';
}
.cms-preview__answer {
    padding: 0 16px 14px;
    color: #374151;
    line-height: 1.55;
    white-space: pre-wrap;
}

@media (max-width: 1100px) {
    .cms-edit-grid {
        grid-template-columns: 1fr;
    }
    .cms-preview {
        position: static;
    }
}

/* === Ana iteration 2 sitewide UI consistency pass === */
:root {
    --ui-bg: #f3f6fb;
    --ui-surface: #ffffff;
    --ui-surface-soft: #f8fbff;
    --ui-border: #dfe8f5;
    --ui-border-soft: #e9eef8;
    --ui-text: #1f2a44;
    --ui-muted: #64748b;
    --ui-primary: #4f7cf0;
    --ui-primary-dark: #355ecc;
    --ui-success-bg: #e9f9ef;
    --ui-success: #13733d;
    --ui-danger-bg: #fff1ec;
    --ui-danger: #b44d1d;
    --ui-neutral-bg: #e9eef8;
    --ui-shadow: 0 18px 42px rgba(31, 42, 68, 0.08);
}

body.site-body {
    background: var(--ui-bg);
    color: var(--ui-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.site-main {
    padding-top: 28px;
}

.page-header,
.detail-header,
.customer-dashboard-card__header,
.jobs-header,
.driver-dashboard-card__header,
.driver-calendar-panel__header,
.auth-header {
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.page-header h2,
.detail-header h2,
.customer-dashboard-card__header h3,
.jobs-header h3,
.driver-dashboard-card__header h3,
.driver-calendar-panel__header h3,
.auth-header h2,
.driver-ongoing-page__heading h1,
.driver-ongoing-page__heading h2 {
    color: var(--ui-text);
    font-size: clamp(1.75rem, 2vw, 2.25rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.content-card h3,
.jobs-card h3,
.driver-ongoing-card h3 {
    color: var(--ui-text);
    font-size: clamp(1.25rem, 1.5vw, 1.55rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 14px;
}

.page-header p,
.detail-header p,
.customer-dashboard-card__subtitle,
.driver-dashboard-card__header p,
.driver-calendar-panel__subtitle,
.driver-ongoing-page__heading p,
.auth-header p {
    color: var(--ui-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin: .35rem 0 0;
}

.section-eyebrow,
.customer-dashboard-card__eyebrow,
.driver-dashboard-card__eyebrow {
    color: var(--ui-primary);
    display: block;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.2;
    margin: 0 0 .55rem;
    text-transform: uppercase;
}

.content-card,
.detail-card,
.jobs-card,
.driver-job-detail-card,
.customer-dashboard-card,
.customer-page-card,
.driver-dashboard-card,
.driver-ongoing-hero,
.driver-ongoing-card,
.auth-card,
.account-form-card,
.account-side-card,
.form-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    box-shadow: var(--ui-shadow);
}

.content-card,
.detail-card,
.jobs-card,
.driver-job-detail-card,
.customer-dashboard-card,
.customer-page-card,
.driver-dashboard-card {
    padding: clamp(22px, 2.2vw, 32px);
}

.detail-box,
.customer-account-box,
.ops-summary-card,
.driver-job-card,
.driver-job-segment,
.quote-card {
    background: var(--ui-surface-soft);
    border: 1px solid var(--ui-border-soft);
    border-radius: 14px;
}

.detail-box .label,
.customer-account-box span,
.driver-ongoing-card .label,
.ops-summary-label,
.admin-table th {
    color: #657493;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.detail-box .value,
.customer-account-box strong,
.driver-ongoing-card .value,
.admin-table td,
.jobs-table td {
    color: var(--ui-text);
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.45;
}

.admin-table th,
.admin-table td,
.jobs-table th,
.jobs-table td {
    padding: 16px 18px;
}

.admin-table th,
.jobs-table th {
    background: #f2f5fb;
    color: var(--ui-text);
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.status-pill,
.status-chip,
.availability-pill,
.meta-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: .84rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1.1;
    min-height: 34px;
    padding: 8px 14px;
    white-space: nowrap;
}

.btn-primary,
.btn-add,
.btn-edit,
.btn-view,
.btn-back,
.btn-accept,
.btn-reject,
.btn-filter,
.btn-clear,
.btn-secondary,
.btn-urgent-toggle,
.save-btn,
.driver-secondary-btn,
.driver-action-btn,
.customer-edit-btn,
.customer-quote-btn,
.customer-back-btn,
.enquiry-timeline__action,
.quote-card__btn,
.quote-btn,
.password-toggle-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: none;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    font-size: .95rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1.15;
    min-height: 44px;
    padding: 11px 18px;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    width: auto;
}

.btn-primary,
.btn-add,
.btn-edit,
.btn-filter,
.save-btn,
.quote-btn-primary {
    background: var(--ui-primary);
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-add:hover,
.btn-edit:hover,
.btn-filter:hover,
.save-btn:hover,
.quote-btn-primary:hover {
    background: var(--ui-primary-dark);
    color: #ffffff !important;
}

.btn-view,
.btn-back,
.btn-clear,
.btn-secondary,
.driver-secondary-btn,
.driver-action-btn--review,
.customer-quote-btn--view,
.customer-quote-btn--cancel,
.customer-back-btn,
.quote-card__btn--cancel,
.quote-btn-back,
.password-toggle-btn {
    background: var(--ui-neutral-bg);
    border-color: #d9e3f3;
    color: var(--ui-text) !important;
}

.enhanced-input.is-valid,
.enhanced-field input.is-valid,
.enhanced-field select.is-valid,
.enhanced-field textarea.is-valid,
input.is-valid,
select.is-valid,
textarea.is-valid {
    background-color: #f4fbf7;
    border-color: #18a558;
    box-shadow: 0 0 0 3px rgba(24, 165, 88, 0.1);
}

.live-feedback {
    color: var(--ui-muted);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 7px;
    min-height: 20px;
}

.live-feedback.error {
    color: var(--ui-danger);
}

.live-feedback.success {
    color: var(--ui-success);
}

.btn-accept,
.driver-action-btn--accept,
.customer-quote-btn--accept,
.quote-card__btn--accept {
    background: var(--ui-success-bg);
    color: var(--ui-success) !important;
}

.btn-reject,
.btn-urgent-toggle,
.btn-urgent-toggle.is-urgent,
.driver-action-btn--reject,
.customer-quote-btn--reject,
.quote-card__btn--reject,
.quote-btn-danger {
    background: var(--ui-danger-bg);
    color: var(--ui-danger) !important;
}

.btn-row,
.actions-row,
.header-actions,
.driver-ongoing-contact-actions,
.driver-ongoing-actions,
.driver-ongoing-copy-row {
    align-items: center;
    gap: 10px;
}

.actions-row,
.form-actions,
.auth-actions,
.quote-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.actions-row a,
.actions-row button,
.form-actions a,
.form-actions button,
.auth-actions a,
.auth-actions button,
.quote-form-actions a,
.quote-form-actions button {
    flex: 0 0 auto;
    width: auto !important;
}

.quote-form-actions {
    align-items: center;
    justify-content: flex-end;
    margin-top: 24px;
}

.quote-form-actions .btn-primary,
.quote-form-actions .btn-back {
    min-width: 150px;
}

.driver-ongoing-page {
    padding: 1.2rem 0 3rem;
}

.driver-ongoing-shell {
    width: min(100%, 920px);
    gap: 18px;
}

.driver-ongoing-page__heading {
    margin: 0 0 6px;
    padding: 0 4px;
}

.driver-ongoing-hero {
    padding: clamp(22px, 2.4vw, 32px);
}

.driver-ongoing-hero h2 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
}

.driver-ongoing-card {
    align-content: start;
    gap: 12px;
    padding: clamp(20px, 2vw, 26px);
}

.driver-ongoing-card__header {
    align-items: flex-start;
}

.driver-ongoing-card .value,
.driver-ongoing-card > p,
.driver-ongoing-card > div:not(.driver-ongoing-card__header):not(.driver-ongoing-contact-actions):not(.driver-ongoing-copy-row):not(.driver-ongoing-actions) {
    font-size: 1.02rem;
}

.driver-ongoing-copy-row .driver-action-btn {
    width: 100%;
}

input,
select,
textarea,
.enhanced-input,
.form-control {
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    color: var(--ui-text);
    font-size: 1rem;
    font-weight: 500;
    min-height: 46px;
}

label {
    color: var(--ui-text);
    font-size: .92rem;
    font-weight: 800;
}

@media (max-width: 900px) {
    .page-header,
    .detail-header,
    .customer-dashboard-card__header,
    .jobs-header,
    .driver-dashboard-card__header,
    .driver-calendar-panel__header,
    .driver-ongoing-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions a,
    .header-actions button,
    .btn-row a,
    .btn-row button,
    .actions-row a,
    .actions-row button,
    .driver-action-btn,
    .customer-quote-btn {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .driver-ongoing-grid {
        grid-template-columns: 1fr;
    }

    .driver-ongoing-page__heading h2,
    .driver-ongoing-hero h2 {
        font-size: 1.8rem;
    }

    .actions-row a,
    .actions-row button,
    .form-actions a,
    .form-actions button,
    .auth-actions a,
    .auth-actions button,
    .quote-form-actions a,
    .quote-form-actions button {
        width: 100% !important;
    }

    .quote-form-actions {
        justify-content: stretch;
    }

    .content-card,
    .detail-card,
    .jobs-card,
    .driver-job-detail-card,
    .customer-dashboard-card,
    .customer-page-card,
    .driver-dashboard-card,
    .driver-ongoing-card,
    .driver-ongoing-hero {
        border-radius: 16px;
        padding: 18px;
    }
}

/* Final table action override after all responsive form rules. */
.admin-table .btn-row,
.jobs-table .btn-row,
.table-wrap .btn-row {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    white-space: nowrap;
}

.admin-table .btn-row a,
.admin-table .btn-row button,
.jobs-table .btn-row a,
.jobs-table .btn-row button,
.table-wrap .btn-row a,
.table-wrap .btn-row button {
    flex: 0 0 auto;
    font-size: .86rem;
    min-height: 38px;
    min-width: 76px;
    padding: 9px 14px;
    width: auto !important;
}

.admin-table td:last-child,
.jobs-table td:last-child {
    min-width: 180px;
}

/* Final button layout normalization. Keep shared actions consistent after older page-specific rules. */
:where(
    .btn-primary,
    .btn-add,
    .btn-edit,
    .btn-view,
    .btn-back,
    .btn-accept,
    .btn-reject,
    .btn-delete,
    .btn-filter,
    .btn-clear,
    .btn-secondary,
    .btn-urgent-toggle,
    .save-btn,
    .driver-secondary-btn,
    .driver-action-btn,
    .customer-edit-btn,
    .customer-quote-btn,
    .customer-back-btn,
    .enquiry-timeline__action,
    .quote-card__btn,
    .quote-btn
) {
    align-items: center;
    border-radius: 999px;
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .94rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1.15;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    width: auto !important;
}

.btn-primary,
.btn-add,
.btn-edit,
.btn-filter,
.save-btn,
.quote-btn-primary {
    background: var(--ui-primary);
    color: #fff !important;
}

.btn-view,
.btn-back,
.btn-clear,
.btn-secondary,
.driver-secondary-btn,
.driver-action-btn--review,
.customer-quote-btn--view,
.customer-quote-btn--cancel,
.customer-back-btn,
.quote-card__btn--cancel,
.quote-btn-back {
    background: var(--ui-neutral-bg);
    color: var(--ui-text) !important;
}

.btn-accept,
.customer-quote-btn--accept,
.quote-card__btn--accept,
.quote-btn-accept {
    background: var(--ui-success-bg);
    color: var(--ui-success) !important;
}

.btn-reject,
.btn-delete,
.btn-urgent-toggle,
.customer-quote-btn--reject,
.quote-card__btn--reject,
.quote-btn-reject {
    background: var(--ui-danger-bg);
    color: var(--ui-danger) !important;
}

.btn-row,
.actions-row,
.header-actions,
.form-actions,
.auth-actions,
.quote-form-actions,
.driver-ongoing-contact-actions,
.driver-ongoing-actions,
.driver-ongoing-copy-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.header-actions > a,
.header-actions > button,
.actions-row > a,
.actions-row > button,
.form-actions > a,
.form-actions > button,
.auth-actions > a,
.auth-actions > button,
.quote-form-actions > a,
.quote-form-actions > button {
    flex: 0 0 auto;
    width: auto !important;
}

.admin-table .btn-row,
.jobs-table .btn-row,
.table-wrap .btn-row {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.admin-table .btn-row > a,
.admin-table .btn-row > button,
.jobs-table .btn-row > a,
.jobs-table .btn-row > button,
.table-wrap .btn-row > a,
.table-wrap .btn-row > button {
    font-size: .84rem;
    min-height: 38px;
    min-width: 74px;
    padding: 8px 12px;
    width: auto !important;
}

.quote-form-actions {
    justify-content: flex-end;
    margin-top: 24px;
}

.quote-form-actions .btn-primary,
.quote-form-actions .btn-back {
    min-width: 150px;
}

.driver-ongoing-copy-row .driver-action-btn {
    width: 100% !important;
}

@media (max-width: 640px) {
    .header-actions > a,
    .header-actions > button,
    .form-actions > a,
    .form-actions > button,
    .auth-actions > a,
    .auth-actions > button,
    .actions-row:not(.btn-row) > a,
    .actions-row:not(.btn-row) > button,
    .quote-form-actions > a,
    .quote-form-actions > button {
        width: 100% !important;
    }

    .admin-table .btn-row > a,
    .admin-table .btn-row > button,
    .jobs-table .btn-row > a,
    .jobs-table .btn-row > button,
    .table-wrap .btn-row > a,
    .table-wrap .btn-row > button {
        width: auto !important;
    }
}

/* Auth forms use single primary actions, so those buttons should read as
   form submits instead of compact table/action chips. */
.auth-form .auth-actions:not(.actions-row--centered),
.auth-section--login .auth-actions--login {
    align-items: stretch;
    display: flex;
    width: 100%;
}

.auth-form .auth-actions:not(.actions-row--centered) > .auth-btn,
.auth-section--login .auth-actions--login > .auth-btn {
    flex: 1 1 100%;
    width: 100% !important;
}

/* Keep flash dismiss controls out of the message text flow. */
.message.js-flash {
    align-items: center;
    padding-right: 64px;
    position: relative;
}

.message.js-flash .message-body {
    flex: 1 1 auto;
    min-width: 0;
}

.message.js-flash .message-close {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: 999px;
    box-shadow: none !important;
    color: currentColor;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 1.25rem;
    height: 34px;
    justify-content: center;
    line-height: 1;
    margin: 0;
    min-height: 34px;
    min-width: 34px;
    padding: 0;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px !important;
}

.message.js-flash .message-close:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    opacity: 1;
}

/* Final badge and table typography pass.
   Badges should read as metadata, not as oversized buttons, and table body
   copy should have normal hierarchy instead of every cell shouting equally. */
.admin-table td,
.jobs-table td,
.customer-bookings-table td,
.customer-quotes-table td,
.driver-jobs-table td {
    color: #24324f;
    font-size: .96rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
    vertical-align: middle;
}

.admin-table td strong,
.jobs-table td strong,
.customer-bookings-table td strong,
.customer-quotes-table td strong,
.driver-jobs-table td strong,
.admin-table td:first-child,
.jobs-table td:first-child {
    font-weight: 700;
}

.admin-table th,
.jobs-table th,
.customer-bookings-table th,
.customer-quotes-table th,
.driver-jobs-table th {
    color: #1f2a44;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
}

.status-pill,
.status-chip,
.customer-booking-status,
.availability-pill,
.meta-pill,
.schedule-job-status,
.driver-job-status,
[class*="status-"]:not(.status-helper--pending):not(.status-helper--active):not(.status-helper--positive):not(.status-helper--negative):not(.status-helper--muted) {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: none;
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .76rem;
    font-weight: 700;
    gap: 5px;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1.1;
    max-width: 100%;
    min-height: 0;
    padding: 6px 11px;
    text-align: center;
    text-transform: none;
    white-space: nowrap;
    width: auto !important;
}

.status-sent,
.status-chip--sent,
.status-assigned,
.status-in-progress,
.customer-booking-status.status-in-progress {
    background: #edf4ff;
    border-color: #dbe8ff;
    color: #2f5fd7;
}

.status-accepted,
.status-chip--accepted,
.status-completed,
.status-done,
.status-active,
.availability-available,
.availability-pill--available,
.customer-booking-status.status-confirmed {
    background: #eaf8f0;
    border-color: #d5f0df;
    color: #157347;
}

.status-rejected,
.status-chip--rejected,
.status-cancelled,
.status-urgent,
.status-overdue,
.status-inactive,
.availability-unavailable {
    background: #fff0f0;
    border-color: #ffdada;
    color: #b42318;
}

.status-pending,
.status-chip--pending,
.status-draft,
.status-pending-payment,
.status-pending-approval,
.status-pending-driver,
.status-past {
    background: #fff6e6;
    border-color: #ffe5b4;
    color: #a85d00;
}

.admin-table .status-pill,
.admin-table .status-chip,
.jobs-table .status-pill,
.jobs-table .status-chip,
.customer-bookings-table .status-chip,
.customer-quotes-table .status-chip {
    min-width: 0;
    vertical-align: middle;
}
