/**
 * TitleThrive Partner Portal Styles
 * Scoped under .tt-agent-portal
 * @since v0.34.0
 */

/* ── Portal Container ──────────────────────────────────────────── */
.tt-agent-portal {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Tab Bar ───────────────────────────────────────────────────── */
.tt-portal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tt-portal-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.tt-portal-tab:hover {
    color: #0073aa;
}

.tt-portal-tab--active,
.tt-portal-tab[aria-selected="true"] {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.tt-portal-tab:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

/* ── Tab Panels ────────────────────────────────────────────────── */
.tt-portal-panel {
    min-height: 200px;
}

.tt-portal-panel[hidden] {
    display: none !important;
}

/* ── Loading State ─────────────────────────────────────────────── */
.tt-portal-loading {
    color: #999;
    font-style: italic;
}

/* ── Tables ────────────────────────────────────────────────────── */
.tt-portal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.tt-portal-table th,
.tt-portal-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tt-portal-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tt-portal-table tr:hover td {
    background: #fafafa;
}

/* ── Status Badges ─────────────────────────────────────────────── */
.tt-status-active {
    color: #46b450;
    font-weight: 500;
}

.tt-status-suspended {
    color: #dba617;
    font-weight: 500;
}

.tt-status-expired {
    color: #999;
    font-weight: 500;
}

/* ── Form Fields ───────────────────────────────────────────────── */
.tt-portal-field {
    margin-bottom: 16px;
}

.tt-portal-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.tt-portal-field input[type="text"],
.tt-portal-field input[type="email"],
.tt-portal-field input[type="tel"],
.tt-portal-field input[type="password"],
.tt-portal-field textarea,
.tt-portal-field select {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.tt-portal-field input:focus,
.tt-portal-field textarea:focus,
.tt-portal-field select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.tt-portal-field input:disabled {
    background: #f5f5f5;
    color: #999;
}

.tt-portal-field__hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #999;
}

.tt-portal-field input[type="color"] {
    width: 60px;
    height: 36px;
    padding: 2px;
    cursor: pointer;
}

/* ── Upload Fields ─────────────────────────────────────────────── */
.tt-portal-upload {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.tt-portal-upload__preview {
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tt-portal-upload__preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.tt-portal-upload__preview--empty img { display: none; }
.tt-portal-upload__preview--empty::after {
    content: 'No image';
    font-size: 11px;
    color: #bbb;
}

.tt-portal-upload__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tt-portal-upload__choose {
    cursor: pointer;
}

.tt-portal-upload__status {
    font-size: 12px;
    margin-top: 4px;
}

.tt-portal-upload__status--error     { color: #d63638; }
.tt-portal-upload__status--success   { color: #46b450; }
.tt-portal-upload__status--uploading { color: #999; font-style: italic; }

@media (max-width: 768px) {
    .tt-portal-upload {
        flex-direction: column;
    }
}

/* ── Buttons ───────────────────────────────────────────────────── */

/* Normalization — strips theme interference (mirrors tt-calc.css scoping) */
.tt-agent-portal .tt-calc-btn,
.tt-agent-portal button.tt-calc-btn,
.tt-agent-portal a.tt-calc-btn {
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    text-transform: none;
    text-decoration: none;
    letter-spacing: normal;
    background-image: none;
    font-family: inherit;
}

/* Base button */
.tt-agent-portal .tt-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease,
                box-shadow 0.15s ease, border-color 0.15s ease;
    line-height: 1.2;
    border: 1px solid transparent;
    min-width: 150px;
    height: 44px;
    box-sizing: border-box;
}

.tt-agent-portal .tt-calc-btn-primary {
    background-color: var(--tt-primary, #005f8d);
    border-color: var(--tt-primary, #005f8d);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.tt-agent-portal .tt-calc-btn-primary:hover {
    background-color: var(--tt-primary-hover, #004c70);
    border-color: var(--tt-primary-hover, #004c70);
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.tt-agent-portal .tt-calc-btn-secondary {
    background-color: #fff;
    border-color: var(--tt-primary, #005f8d);
    color: var(--tt-primary, #005f8d);
}

.tt-agent-portal .tt-calc-btn-secondary:hover {
    background-color: #e9f3fb;
}

.tt-agent-portal .tt-calc-btn:focus-visible {
    outline: 2px solid var(--tt-primary-focus, #003f61);
    outline-offset: 2px;
}

.tt-agent-portal .tt-calc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Small button modifier */
.tt-portal-btn-sm {
    padding: 4px 10px !important;
    font-size: 12px !important;
    min-width: auto !important;
    height: auto !important;
}

/* ── Pagination ────────────────────────────────────────────────── */
.tt-portal-pagination {
    margin: 16px 0;
    display: flex;
    gap: 4px;
}

.tt-portal-page-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    border-radius: 3px;
}

.tt-portal-page-btn:hover {
    background: #f0f0f0;
}

.tt-portal-page-btn--active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ── Invite Form (acceptance page) ─────────────────────────────── */
.tt-agent-portal--invite {
    max-width: 480px;
}

.tt-agent-portal__invite-form h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #333;
}

.tt-agent-portal__invite-form p {
    color: #666;
    margin: 0 0 24px;
}

/* ── Login Prompt ──────────────────────────────────────────────── */
.tt-agent-portal--login {
    text-align: center;
    padding: 48px 24px;
}

.tt-agent-portal__login-prompt h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.tt-agent-portal__login-prompt p {
    color: #666;
    margin: 0 0 24px;
}

/* ── Registration Form (v0.43.0) ──────────────────────────────── */
.tt-portal-register-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 32px 24px;
}

.tt-portal-register-wrap .tt-portal-logo {
    text-align: center;
    margin-bottom: 16px;
}

.tt-portal-register-wrap .tt-portal-logo img {
    max-height: 48px;
    width: auto;
}

.tt-portal-register-wrap h2 {
    text-align: center;
    margin: 0 0 8px;
    font-size: 22px;
}

.tt-portal-register-wrap .tt-portal-register-tagline {
    text-align: center;
    color: #666;
    margin: 0 0 24px;
    font-size: 14px;
}

.tt-portal-register-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 20px;
    font-size: 13px;
    line-height: 1.4;
}

.tt-portal-register-consent input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.tt-portal-register-consent a {
    text-decoration: underline;
}

.tt-portal-register-links {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.tt-portal-register-links a {
    color: #2271b1;
    text-decoration: none;
}

.tt-portal-register-links a:hover {
    text-decoration: underline;
}

#tt-portal-register-error,
#tt-portal-verify-error {
    color: #d63638;
    margin-bottom: 12px;
    font-size: 14px;
}

#tt-portal-register-success,
#tt-portal-verify-success {
    text-align: center;
    padding: 32px 24px;
}

.tt-portal-register-success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

/* ── Disabled State ────────────────────────────────────────────── */
.tt-agent-portal--disabled {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
}

.tt-agent-portal--disabled p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tt-portal-tabs {
        gap: 0;
    }

    .tt-portal-tab {
        padding: 10px 14px;
        font-size: 13px;
        flex: 1 1 auto;
        text-align: center;
    }

    .tt-portal-table {
        font-size: 13px;
    }

    .tt-portal-table th,
    .tt-portal-table td {
        padding: 8px;
    }

    /* Card layout for shares on mobile */
    .tt-portal-shares .tt-portal-table thead {
        display: none;
    }

    .tt-portal-shares .tt-portal-table,
    .tt-portal-shares .tt-portal-table tbody,
    .tt-portal-shares .tt-portal-table tr,
    .tt-portal-shares .tt-portal-table td {
        display: block;
    }

    .tt-portal-shares .tt-portal-table tr {
        padding: 12px;
        margin-bottom: 8px;
        border: 1px solid #eee;
        border-radius: 6px;
    }

    .tt-portal-shares .tt-portal-table td {
        padding: 2px 0;
        border: none;
    }

    .tt-portal-shares .tt-portal-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        color: #999;
        display: block;
    }

    .tt-portal-field input[type="text"],
    .tt-portal-field input[type="email"],
    .tt-portal-field input[type="tel"],
    .tt-portal-field input[type="password"],
    .tt-portal-field textarea,
    .tt-portal-field select {
        max-width: 100%;
    }
}

/* ── v0.44.0: Share Card ──────────────────────────────────────── */
.tt-share-card {
    background: #f0f6fc;
    border: 1px solid #c3d9ed;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.tt-share-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #1a1a1a;
}
.tt-share-card__desc {
    margin: 0 0 12px;
    font-size: 13px;
    color: #555;
}
.tt-share-card__url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.tt-share-card__url-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    color: #333;
    min-width: 0;
}
.tt-share-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tt-share-card__actions a {
    text-decoration: none;
}

/* ── v0.45.0: Enhanced Share Buttons ───────────────────────────────── */
.tt-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.15s, transform 0.1s;
    cursor: pointer;
    border: none;
}
.tt-share-btn:hover { filter: brightness(0.9); transform: translateY(-1px); }
.tt-share-btn:active { transform: translateY(0); }
.tt-share-btn svg { flex-shrink: 0; }
.tt-share-btn--linkedin { background: #0A66C2; color: #fff; }
.tt-share-btn--qr { background: #1a1a1a; color: #fff; }

/* ── v0.45.0: Period Selector ────────────────────────────────────── */
.tt-period-selector {
    display: flex;
    gap: 4px;
    margin: 16px 0 4px;
}
.tt-period-btn {
    padding: 4px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    color: #555;
    font-family: inherit;
}
.tt-period-btn--active {
    background: var(--tt-primary, #005f8d);
    color: #fff;
    border-color: transparent;
}
.tt-period-btn:hover:not(.tt-period-btn--active) {
    background: #f5f5f5;
}

/* ── v0.45.0: Stats Cards ────────────────────────────────────────── */
.tt-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0;
}
.tt-stats-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.tt-stats-card__value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}
.tt-stats-card__label {
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.tt-stats-card__trend {
    font-size: 12px;
    margin-top: 6px;
}
.tt-stats-card__trend--up {
    color: #46b450;
}
.tt-stats-card__trend--down {
    color: #d63638;
}
.tt-stats-card__trend--neutral {
    color: #999;
}
.tt-stats-card__helper {
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
}

/* ── v0.45.0: Trend Chart ────────────────────────────────────────── */
.tt-trend-chart {
    margin: 20px 0;
}
.tt-trend-chart h3 {
    margin: 0 0 12px;
    font-size: 16px;
}
.tt-trend-chart__bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100px;
    border-bottom: 1px solid #e0e0e0;
}
.tt-trend-chart__bar {
    flex: 1;
    background: var(--tt-primary, #005f8d);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
    cursor: default;
}
.tt-trend-chart__bar:hover {
    opacity: 0.8;
}
.tt-trend-chart__axis {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* ── v0.45.0: Recent Sections (net sheets) ─────────────────────── */
/* v0.69.13: __empty removed with the Quote Activity section — that empty
   state was its only consumer. Recent Shares renders nothing when empty. */
.tt-portal-recent-section {
    margin: 24px 0;
}
.tt-portal-recent-section h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
}

/* ── v0.45.0: Agency Leaderboard ─────────────────────────────────── */
.tt-agency-leaderboard {
    margin: 24px 0;
}
.tt-agency-leaderboard h3 {
    margin: 0 0 12px;
    font-size: 16px;
}
.tt-leaderboard-table td:first-child {
    font-weight: 700;
    color: #0073aa;
    width: 40px;
    text-align: center;
}
.tt-leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
}
.tt-leaderboard-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    vertical-align: middle;
    margin-right: 8px;
}
.tt-role-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    background: #f0f0f0;
    color: #555;
    margin-left: 6px;
}

/* ── v0.45.0: Agency Totals ──────────────────────────────────────── */
.tt-agency-totals {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 16px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
.tt-agency-total__item {
    text-align: center;
}
.tt-agency-total__value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}
.tt-agency-total__label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── v0.45.0: Screen Reader Only ─────────────────────────────────── */
.tt-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;
}

/* ── v0.45.0: Inline error ───────────────────────────────────────── */
.tt-portal-inline-error {
    color: #d63638;
    font-size: 13px;
    font-style: italic;
    margin: 8px 0;
}

/* ── v0.45.0: Center net sheet form + welcome card in Create tab ── */
.tt-agent-portal .tt-net-sheet .tt-net-pre-step {
    display: flex;
    justify-content: center;
}
.tt-agent-portal .tt-net-sheet .tt-calc-form {
    margin: 0 auto;
}

/* ── v0.45.0: Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .tt-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .tt-stats-card__value {
        font-size: 22px;
    }
    .tt-trend-chart__bars {
        height: 60px;
    }
    .tt-agency-totals {
        gap: 12px;
    }
}
@media (max-width: 480px) {
    .tt-stats-cards {
        grid-template-columns: 1fr;
    }
}

/* ── Share Type Badges (v0.48.0) ─────────────────────── */

.tt-share-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.4;
    white-space: nowrap;
}

.tt-share-type-badge--net_sheet {
    background: #dcfce7;
    color: #166534;
}

.tt-share-type-badge--quote {
    background: #dbeafe;
    color: #1e40af;
}

.tt-share-type-badge--buyer_net {
    background: #fef3c7;
    color: #92400e;
}

/* ── Quote Share Modal (v0.48.0) ─────────────────────── */

.tt-calc-share-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99998;
}

.tt-calc-share-modal__content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.tt-calc-share-modal__content h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #333;
}

.tt-calc-share-modal__content p {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
}

.tt-calc-share-modal__url-row {
    display: flex;
    gap: 8px;
}

.tt-calc-share-modal__url-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #f9fafb;
}

/* ── Quote Email Form (v0.48.0) ──────────────────────── */

.tt-calc-email-form {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.tt-calc-email-form__fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tt-calc-email-form__fields input,
.tt-calc-email-form__fields textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.tt-calc-email-form__actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* ── v0.64.1: Phase 2 — Add Agent modal, terms screen, My Agents tab ── */
.tt-agent-portal--terms { max-width: 720px; margin: 24px auto; padding: 24px; background: #fff; border: 1px solid #e2e5ea; border-radius: 8px; }
.tt-agent-portal__terms-body { max-height: 60vh; overflow-y: auto; padding: 16px; background: #fafbfc; border: 1px solid #eef0f3; border-radius: 6px; margin-bottom: 16px; }
.tt-agent-portal__terms-form { display: flex; flex-direction: column; gap: 12px; }
.tt-portal-terms-checkbox { display: flex; align-items: center; gap: 8px; }
.tt-portal-add-agent { margin-top: 24px; }
/* z-index must clear the host theme's STICKY HEADER. Measured on
   dev.titlewebsites.com (Avada): the header wrapper is z-index 99990, so the old
   9999 was two orders of magnitude below it and the header painted over the top
   of this modal whenever the page was scrolled to the top. 9999 was also below
   this plugin's OWN share modal (99998/99999 above) — two modals in one file
   disagreeing about which layer they live on.
   Matching the existing top tier rather than inventing a third: an open modal
   owns the screen, so the header is covered and dimmed by the backdrop instead
   of the modal being tucked beneath it, and the panel's 6vh top margin keeps it
   off the viewport edge. Headroom over Avada is thin (99999 vs 99990) but it is
   the tier this plugin already established; if a theme ever outbids it, raise
   BOTH modals together. */
.tt-portal-modal { position: fixed; inset: 0; z-index: 99999; }
.tt-portal-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.tt-portal-modal__panel { position: relative; max-width: 520px; margin: 6vh auto; padding: 24px; background: #fff; border-radius: 8px; box-shadow: 0 12px 36px rgba(0,0,0,0.18); max-height: 88vh; overflow-y: auto; }
.tt-portal-add-agent__paths { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0 16px; }
.tt-portal-add-agent-path { text-align: left; padding: 14px 16px; background: #fafbfc; border: 1px solid #e2e5ea; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.tt-portal-add-agent-path:hover { border-color: #0073aa; background: #fff; }
.tt-portal-add-agent-path strong { font-size: 15px; }
.tt-portal-add-agent-path span { font-size: 12px; color: #666; }
/* margin-bottom matches .tt-portal-add-agent__paths so the modal's Close button
   — a sibling AFTER this form, not inside it — is spaced the same in both views.
   Without it the submit button and Close were flush against each other. */
.tt-portal-add-agent__form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; margin-bottom: 16px; }
.tt-portal-help { font-size: 12px; color: #666; }
/* `.tt-net-error` is defined in tt-calc.css, which is not guaranteed to be
   enqueued on the portal page — so portal error text rendered as unstyled black
   body copy, reading as a caption rather than a failure. Restated here, scoped
   to the portal, so a message that says something went wrong looks like it. */
.tt-agent-portal .tt-net-error { color: #b32d2e; font-size: 13px; }
.tt-agent-portal .tt-net-error:empty { display: none; }
/* Success banner at the top of the My Partners panel. Deliberately persistent —
   it carries the "share their password, nothing was emailed" instruction, which
   is the one thing the operator has to act on, so it must not time out. */
.tt-agent-portal .tt-portal-notice { padding: 12px 14px; border-radius: 6px; margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
.tt-agent-portal .tt-portal-notice--success { background: #edf7ed; border: 1px solid #b7dfb9; color: #1e4620; }
/* A partner who has never signed in has not accepted the portal terms and has
   never used the tool. Amber, not red — it is a to-do, not a failure. */
.tt-agent-portal .tt-portal-never { color: #8a6100; font-weight: 600; }
.tt-portal-section-intro { color: #666; font-size: 13px; margin: 0 0 12px; }
@media (max-width: 600px) { .tt-portal-modal__panel { margin: 2vh 8px; max-height: 96vh; } }

/* ── v0.69.0: FEAT-017 Orders tab (order intake + history) ── */
.tt-order-section { margin-bottom: 20px; padding: 16px; background: #fafbfc; border: 1px solid #eef0f3; border-radius: 6px; }
.tt-order-section h4 { margin: 0 0 12px; }
.tt-order-field--group { border: 0; padding: 0; margin: 0 0 12px; }
.tt-order-field--group legend { font-weight: 600; margin-bottom: 6px; }
.tt-order-option { display: inline-flex; align-items: center; gap: 6px; margin: 0 16px 6px 0; }
.tt-order-rush { color: #c00; font-weight: 700; font-size: 12px; letter-spacing: 0.04em; }
.tt-order-meta { color: #667; margin-top: -8px; }
.tt-order-detail th { text-align: left; width: 220px; vertical-align: top; }
