
.tm-customer-portal,
.tm-customer-portal * {
    box-sizing: border-box;
}

.tm-customer-portal {
    min-height: 78vh;
    padding: 44px 16px 70px;
    background: #f8fafc;
    color: #334155;
    font-family: Arial, Helvetica, sans-serif;
}

.tm-customer-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.tm-customer-login {
    width: min(520px, 100%);
    margin: 30px auto;
    padding: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.tm-customer-kicker {
    margin: 0 0 5px;
    color: #FF7A00;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.tm-customer-header {
    display: flex;
    gap: 22px;
    min-height: 190px;
    padding: 30px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 15%, rgba(255,255,255,.14), transparent 25%),
        linear-gradient(135deg, #081521, #1e293b);
    color: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .17);
    justify-content: space-between;
    align-items: center;
}

.tm-customer-header h1 {
    margin: 5px 0 8px;
    color: #fff;
    font-size: clamp(32px, 5vw, 48px);
}

.tm-customer-header p {
    margin: 0;
    color: #cbd5e1;
}

.tm-customer-header-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.tm-customer-header-actions a {
    padding: 10px 13px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.tm-customer-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.tm-customer-stats > div {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.tm-customer-stats strong,
.tm-customer-stats span {
    display: block;
}

.tm-customer-stats strong {
    color: #FF7A00;
    font-size: 27px;
}

.tm-customer-stats span {
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
}

.tm-customer-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 18px;
}

.tm-customer-nav {
    position: sticky;
    top: 24px;
    align-self: start;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.tm-customer-nav a {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    text-decoration: none;
    font-weight: 800;
}

.tm-customer-nav a.is-active {
    border-left: 4px solid #FF7A00;
    background: #fef2f2;
    color: #FF7A00;
}

.tm-customer-card {
    margin-bottom: 17px;
    padding: 23px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.tm-customer-section-head,
.tm-customer-booking-head {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    align-items: flex-start;
}

.tm-customer-section-head h2 {
    margin: 3px 0 0;
    color: #081521;
}

.tm-customer-section-head > span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #fef2f2;
    color: #FF7A00;
    font-size: 11px;
    font-weight: 800;
}

.tm-customer-overview-grid,
.tm-customer-booking-meta,
.tm-customer-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    margin-top: 16px;
}

.tm-customer-overview-grid > div,
.tm-customer-booking-meta > div {
    padding: 13px;
    border-radius: 10px;
    background: #f8fafc;
}

.tm-customer-overview-grid span,
.tm-customer-overview-grid strong,
.tm-customer-booking-meta span,
.tm-customer-booking-meta strong {
    display: block;
    overflow-wrap: anywhere;
}

.tm-customer-overview-grid span,
.tm-customer-booking-meta span {
    color: #64748b;
    font-size: 10px;
    text-transform: uppercase;
}

.tm-customer-overview-grid strong,
.tm-customer-booking-meta strong {
    margin-top: 5px;
    color: #081521;
}

.tm-customer-bookings {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.tm-customer-bookings article {
    padding: 17px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
}

.tm-customer-booking-head a {
    color: #081521;
    text-decoration: none;
    font-size: 17px;
    font-weight: 900;
}

.tm-customer-booking-head div > span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
}

.tm-customer-status {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255,122,0,0.12);
    color: #FF7A00;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.tm-status-completed {
    background: #ecfdf5;
    color: #166534;
}

.tm-status-cancelled {
    background: #fef2f2;
    color: #991b1b;
}

.tm-customer-timeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-top: 14px;
}

.tm-customer-timeline > div {
    position: relative;
    padding-top: 6px;
    text-align: center;
}

.tm-customer-timeline > div::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e2e8f0;
}

.tm-customer-timeline > div:first-child::before {
    left: 50%;
}

.tm-customer-timeline > div:last-child::before {
    right: 50%;
}

.tm-customer-timeline span {
    position: relative;
    z-index: 1;
    display: flex;
    width: 25px;
    height: 25px;
    margin: 0 auto;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
}

.tm-customer-timeline small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 9px;
}

.tm-customer-timeline > div.is-active::before,
.tm-customer-timeline > div.is-active span {
    background: #FF7A00;
    color: #fff;
}

.tm-customer-booking-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.tm-customer-booking-actions a,
.tm-customer-provider-copy a,
.tm-customer-empty a {
    display: inline-flex;
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 8px;
    background: #FF7A00;
    color: #fff;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.tm-customer-saved-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.tm-customer-saved-grid article {
    position: relative;
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 13px;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
}

.tm-customer-provider-thumb {
    display: flex;
    width: 90px;
    height: 90px;
    overflow: hidden;
    border-radius: 11px;
    background: #081521;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 29px;
    font-weight: 900;
}

.tm-customer-provider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tm-customer-provider-copy h3 {
    margin: 0;
    color: #081521;
}

.tm-customer-provider-copy p {
    margin: 7px 0;
    color: #64748b;
}

.tm-customer-provider-copy > div {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.tm-customer-save-button {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-weight: 800;
}

.tm-customer-save-button.is-saved {
    border-color: #FF8F26;
    background: #fef2f2;
    color: #FF7A00;
}

.tm-customer-saved-grid .tm-customer-save-button {
    position: absolute;
    top: 10px;
    right: 10px;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0;
}

.tm-customer-saved-grid .tm-customer-save-button span {
    font-size: 17px;
}

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

.tm-customer-form-grid label {
    color: #081521;
    font-weight: 800;
}

.tm-customer-form-grid input {
    width: 100%;
    min-height: 43px;
    margin-top: 7px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.tm-customer-card form > button {
    min-height: 42px;
    margin-top: 14px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: #FF7A00;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.tm-customer-empty {
    margin-top: 16px;
    padding: 30px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}

.tm-customer-empty strong {
    display: block;
    color: #081521;
    font-size: 17px;
}

.tm-customer-empty p {
    color: #64748b;
}

.tm-customer-success,
.tm-customer-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-left: 4px solid #16a34a;
    border-radius: 8px;
    background: #ecfdf5;
    color: #166534;
    font-weight: 800;
}

.tm-customer-alert {
    border-left-color: #FF7A00;
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 950px) {
    .tm-customer-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .tm-customer-nav {
        position: static;
        display: flex;
        overflow-x: auto;
    }

    .tm-customer-nav a {
        flex: 0 0 auto;
        border-bottom: 0;
        border-right: 1px solid #f1f5f9;
    }
}

@media (max-width: 700px) {
    .tm-customer-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .tm-customer-stats,
    .tm-customer-overview-grid,
    .tm-customer-booking-meta,
    .tm-customer-form-grid,
    .tm-customer-saved-grid {
        grid-template-columns: 1fr;
    }

    .tm-customer-booking-head,
    .tm-customer-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .tm-customer-timeline > div {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 8px;
        text-align: left;
        align-items: center;
    }

    .tm-customer-timeline > div::before {
        top: 0;
        bottom: 0;
        left: 12px;
        right: auto;
        width: 3px;
        height: auto;
    }

    .tm-customer-timeline > div:first-child::before {
        top: 50%;
        left: 12px;
    }

    .tm-customer-timeline > div:last-child::before {
        right: auto;
        bottom: 50%;
    }

    .tm-customer-timeline span {
        margin: 0;
    }

    .tm-customer-timeline small {
        margin-top: 0;
    }

    .tm-customer-saved-grid article {
        grid-template-columns: 75px minmax(0, 1fr);
    }

    .tm-customer-provider-thumb {
        width: 75px;
        height: 75px;
    }
}


.tm-customer-save-inline {
    display: flex;
    margin: 0 0 16px;
}

.tm-customer-save-fallback {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
}

.tm-booking-account-option {
    display: flex !important;
    gap: 9px;
    margin: 15px 0 !important;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    align-items: flex-start;
    color: #334155 !important;
    font-weight: 700 !important;
    line-height: 1.45;
}

.tm-booking-account-option input {
    width: auto !important;
    min-height: 0 !important;
    margin-top: 3px;
}

.tm-customer-register-link {
    margin: 16px 0 0;
    text-align: center;
}

.tm-customer-register-link a {
    color: #FF7A00;
    font-weight: 800;
}

@media (max-width: 650px) {
    .tm-customer-save-fallback {
        right: 10px;
        bottom: 10px;
        left: 10px;
    }

    .tm-customer-save-fallback .tm-customer-save-button {
        width: 100%;
    }
}
