/* Transport Portal — Main Stylesheet */

:root {
    --tp-primary: #2563eb;
    --tp-primary-dark: #1d4ed8;
    --tp-primary-light: #dbeafe;
    --tp-success: #16a34a;
    --tp-success-light: #dcfce7;
    --tp-warning: #d97706;
    --tp-warning-light: #fef3c7;
    --tp-danger: #dc2626;
    --tp-danger-light: #fee2e2;
    --tp-info: #0891b2;
    --tp-info-light: #cffafe;
    --tp-gray-50: #f9fafb;
    --tp-gray-100: #f3f4f6;
    --tp-gray-200: #e5e7eb;
    --tp-gray-300: #d1d5db;
    --tp-gray-400: #9ca3af;
    --tp-gray-500: #6b7280;
    --tp-gray-600: #4b5563;
    --tp-gray-700: #374151;
    --tp-gray-800: #1f2937;
    --tp-gray-900: #111827;
    --tp-radius: 8px;
    --tp-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --tp-shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
    --tp-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset & Base ── */
.tp-portal { font-family: var(--tp-font); color: var(--tp-gray-800); background: var(--tp-gray-50); }
.tp-portal *, .tp-portal *::before, .tp-portal *::after { box-sizing: border-box; }

.tp-layout { min-height: 100vh; display: flex; flex-direction: column; }
.tp-main { flex: 1; padding: 2rem 0; }
.tp-container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.tp-page-title { font-size: 1.75rem; font-weight: 700; margin: 0 0 1.5rem; color: var(--tp-gray-900); }

/* ── Header ── */
.tp-header { background: #fff; border-bottom: 1px solid var(--tp-gray-200); position: sticky; top: 0; z-index: 100; }
.tp-header__container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; height: 64px; }
.tp-header__logo { font-size: 1.25rem; font-weight: 700; color: var(--tp-primary); text-decoration: none; margin-right: 2rem; }
.tp-header__nav { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.tp-header__link { color: var(--tp-gray-600); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: var(--tp-radius); font-size: 0.9rem; font-weight: 500; transition: all 0.15s; }
.tp-header__link:hover { color: var(--tp-primary); background: var(--tp-primary-light); }
.tp-header__link--primary { background: var(--tp-primary); color: #fff !important; }
.tp-header__link--primary:hover { background: var(--tp-primary-dark); }

.tp-header__notif { position: relative; }
.tp-header__badge { position: absolute; top: 0; right: 0; background: var(--tp-danger); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center; }

.tp-header__dropdown { position: relative; }
.tp-header__user-btn { background: none; border: 1px solid var(--tp-gray-200); padding: 0.5rem 0.75rem; border-radius: var(--tp-radius); cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--tp-gray-700); }
.tp-header__dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--tp-gray-200); border-radius: var(--tp-radius); box-shadow: var(--tp-shadow-lg); min-width: 180px; padding: 0.5rem 0; z-index: 200; }
.tp-header__dropdown:hover .tp-header__dropdown-menu { display: block; }
.tp-header__dropdown-menu a { display: block; padding: 0.5rem 1rem; color: var(--tp-gray-700); text-decoration: none; font-size: 0.875rem; }
.tp-header__dropdown-menu a:hover { background: var(--tp-gray-50); }
.tp-header__dropdown-menu hr { border: 0; border-top: 1px solid var(--tp-gray-200); margin: 0.25rem 0; }

.tp-header__mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ── Footer ── */
.tp-footer { background: #fff; border-top: 1px solid var(--tp-gray-200); padding: 1.5rem 0; text-align: center; }
.tp-footer__links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 0.5rem; }
.tp-footer__links a { color: var(--tp-gray-500); text-decoration: none; font-size: 0.875rem; }
.tp-footer__copy { color: var(--tp-gray-400); font-size: 0.8rem; margin: 0; }

/* ── Cards ── */
.tp-card { background: #fff; border: 1px solid var(--tp-gray-200); border-radius: var(--tp-radius); padding: 1.5rem; box-shadow: var(--tp-shadow); }
.tp-card__title { font-size: 1.125rem; font-weight: 600; margin: 0 0 1rem; color: var(--tp-gray-900); }

.tp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tp-stat { background: #fff; border: 1px solid var(--tp-gray-200); border-radius: var(--tp-radius); padding: 1.25rem; text-align: center; }
.tp-stat__value { font-size: 2rem; font-weight: 700; color: var(--tp-primary); }
.tp-stat__label { font-size: 0.875rem; color: var(--tp-gray-500); margin-top: 0.25rem; }

/* ── Buttons ── */
.tp-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1.25rem; border-radius: var(--tp-radius); font-size: 0.9rem; font-weight: 500; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: all 0.15s; }
.tp-btn--primary { background: var(--tp-primary); color: #fff; }
.tp-btn--primary:hover { background: var(--tp-primary-dark); }
.tp-btn--secondary { background: #fff; color: var(--tp-gray-700); border-color: var(--tp-gray-300); }
.tp-btn--secondary:hover { background: var(--tp-gray-50); }
.tp-btn--success { background: var(--tp-success); color: #fff; }
.tp-btn--danger { background: var(--tp-danger); color: #fff; }
.tp-btn--danger:hover { background: #b91c1c; }
.tp-btn--sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.tp-btn--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.tp-btn--full { width: 100%; justify-content: center; }
.tp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Forms ── */
.tp-form { max-width: 600px; }
.tp-form--wide { max-width: 900px; }
.tp-form__group { margin-bottom: 1.25rem; }
.tp-form__label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--tp-gray-700); margin-bottom: 0.375rem; }
.tp-form__required { color: var(--tp-danger); }
.tp-form__input, .tp-form__select, .tp-form__textarea {
    width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--tp-gray-300); border-radius: var(--tp-radius);
    font-size: 0.9rem; color: var(--tp-gray-800); background: #fff; transition: border-color 0.15s;
}
.tp-form__input:focus, .tp-form__select:focus, .tp-form__textarea:focus { outline: none; border-color: var(--tp-primary); box-shadow: 0 0 0 3px var(--tp-primary-light); }
.tp-form__textarea { min-height: 100px; resize: vertical; }
.tp-form__help { font-size: 0.8rem; color: var(--tp-gray-500); margin-top: 0.25rem; }
.tp-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tp-form__row--3 { grid-template-columns: 1fr 1fr 1fr; }
.tp-form__checkbox { display: flex; align-items: start; gap: 0.5rem; }
.tp-form__checkbox input { margin-top: 3px; }
.tp-form__error { color: var(--tp-danger); font-size: 0.875rem; margin-bottom: 1rem; }

/* ── Alerts ── */
.tp-alert { padding: 1rem 1.25rem; border-radius: var(--tp-radius); margin-bottom: 1rem; font-size: 0.9rem; }
.tp-alert--error { background: var(--tp-danger-light); color: var(--tp-danger); border: 1px solid #fca5a5; }
.tp-alert--success { background: var(--tp-success-light); color: var(--tp-success); border: 1px solid #86efac; }
.tp-alert--warning { background: var(--tp-warning-light); color: var(--tp-warning); border: 1px solid #fcd34d; }
.tp-alert--info { background: var(--tp-info-light); color: var(--tp-info); border: 1px solid #67e8f9; }

/* ── Badges ── */
.tp-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.tp-badge--green { background: var(--tp-success-light); color: var(--tp-success); }
.tp-badge--yellow { background: var(--tp-warning-light); color: var(--tp-warning); }
.tp-badge--red { background: var(--tp-danger-light); color: var(--tp-danger); }
.tp-badge--blue { background: var(--tp-primary-light); color: var(--tp-primary); }
.tp-badge--orange { background: #fff7ed; color: #ea580c; }
.tp-badge--gray { background: var(--tp-gray-100); color: var(--tp-gray-500); }
.tp-badge--urgent { background: var(--tp-danger); color: #fff; animation: tp-pulse 2s infinite; }
@keyframes tp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* ── Tables ── */
.tp-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--tp-radius); overflow: hidden; box-shadow: var(--tp-shadow); }
.tp-table th { background: var(--tp-gray-50); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tp-gray-500); padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--tp-gray-200); }
.tp-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--tp-gray-100); font-size: 0.9rem; vertical-align: middle; }
.tp-table tr:hover td { background: var(--tp-gray-50); }
.tp-table__actions { display: flex; gap: 0.5rem; }

/* ── Tabs ── */
.tp-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--tp-gray-200); margin-bottom: 1.5rem; }
.tp-tabs__item { padding: 0.75rem 1rem; color: var(--tp-gray-500); text-decoration: none; font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tp-tabs__item:hover { color: var(--tp-gray-700); }
.tp-tabs__item--active { color: var(--tp-primary); border-bottom-color: var(--tp-primary); }

/* ── Listing Cards ── */
.tp-listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.tp-listing-card { background: #fff; border: 1px solid var(--tp-gray-200); border-radius: var(--tp-radius); padding: 1.25rem; transition: box-shadow 0.15s; text-decoration: none; color: inherit; display: block; }
.tp-listing-card:hover { box-shadow: var(--tp-shadow-lg); }
.tp-listing-card__header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 0.75rem; }
.tp-listing-card__title { font-size: 1rem; font-weight: 600; color: var(--tp-gray-900); margin: 0; }
.tp-listing-card__route { font-size: 0.9rem; color: var(--tp-gray-600); margin: 0.5rem 0; }
.tp-listing-card__route strong { color: var(--tp-gray-800); }
.tp-listing-card__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tp-listing-card__meta-item { font-size: 0.8rem; color: var(--tp-gray-500); }
.tp-listing-card__footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--tp-gray-100); }
.tp-listing-card__offers { font-size: 0.8rem; color: var(--tp-gray-500); }
.tp-listing-card__budget { font-size: 1rem; font-weight: 600; color: var(--tp-primary); }

/* ── Offer Cards ── */
.tp-offer-card { background: #fff; border: 1px solid var(--tp-gray-200); border-radius: var(--tp-radius); padding: 1.25rem; margin-bottom: 1rem; }
.tp-offer-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.tp-offer-card__price { font-size: 1.25rem; font-weight: 700; color: var(--tp-primary); }
.tp-offer-card__transporter { display: flex; align-items: center; gap: 0.5rem; }
.tp-offer-card__rating { color: var(--tp-warning); font-size: 0.875rem; }
.tp-offer-card__details { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; font-size: 0.875rem; color: var(--tp-gray-600); margin-bottom: 0.75rem; }
.tp-offer-card__message { font-size: 0.875rem; color: var(--tp-gray-600); font-style: italic; margin-bottom: 0.75rem; padding: 0.75rem; background: var(--tp-gray-50); border-radius: var(--tp-radius); }
.tp-offer-card__actions { display: flex; gap: 0.5rem; }
.tp-offer-card__deadline-warning { color: var(--tp-warning); font-weight: 500; }

/* ── Compare View ── */
.tp-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.tp-compare__card { background: #fff; border: 2px solid var(--tp-gray-200); border-radius: var(--tp-radius); padding: 1.5rem; }
.tp-compare__card--selected { border-color: var(--tp-primary); }
.tp-compare__item { margin-bottom: 0.75rem; }
.tp-compare__label { font-size: 0.75rem; color: var(--tp-gray-500); text-transform: uppercase; }
.tp-compare__value { font-size: 1rem; font-weight: 500; }

/* ── Job Timeline ── */
.tp-timeline { position: relative; padding-left: 2rem; margin: 1.5rem 0; }
.tp-timeline::before { content: ''; position: absolute; left: 0.75rem; top: 0; bottom: 0; width: 2px; background: var(--tp-gray-200); }
.tp-timeline__item { position: relative; padding-bottom: 1.5rem; }
.tp-timeline__dot { position: absolute; left: -1.625rem; top: 0.2rem; width: 12px; height: 12px; border-radius: 50%; background: var(--tp-gray-300); border: 2px solid #fff; }
.tp-timeline__item--active .tp-timeline__dot { background: var(--tp-primary); }
.tp-timeline__item--completed .tp-timeline__dot { background: var(--tp-success); }
.tp-timeline__title { font-weight: 600; font-size: 0.9rem; }
.tp-timeline__time { font-size: 0.8rem; color: var(--tp-gray-500); }

/* ── Chat ── */
.tp-chat { display: flex; flex-direction: column; height: 500px; background: #fff; border: 1px solid var(--tp-gray-200); border-radius: var(--tp-radius); overflow: hidden; }
.tp-chat__header { padding: 1rem; border-bottom: 1px solid var(--tp-gray-200); font-weight: 600; }
.tp-chat__messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.tp-chat__msg { max-width: 70%; padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.9rem; }
.tp-chat__msg--mine { align-self: flex-end; background: var(--tp-primary); color: #fff; border-bottom-right-radius: 4px; }
.tp-chat__msg--other { align-self: flex-start; background: var(--tp-gray-100); color: var(--tp-gray-800); border-bottom-left-radius: 4px; }
.tp-chat__msg-sender { font-size: 0.75rem; font-weight: 600; margin-bottom: 0.25rem; }
.tp-chat__msg-time { font-size: 0.7rem; opacity: 0.7; margin-top: 0.25rem; }
.tp-chat__input { display: flex; gap: 0.5rem; padding: 1rem; border-top: 1px solid var(--tp-gray-200); }
.tp-chat__input input { flex: 1; }
.tp-chat__readonly { padding: 0.75rem; text-align: center; background: var(--tp-gray-100); color: var(--tp-gray-500); font-size: 0.875rem; }

/* ── Rating Stars ── */
.tp-stars { display: inline-flex; gap: 0.125rem; }
.tp-stars__star { cursor: pointer; font-size: 1.5rem; color: var(--tp-gray-300); transition: color 0.15s; }
.tp-stars__star--active { color: #f59e0b; }
.tp-stars__star:hover { color: #f59e0b; }
.tp-stars--display .tp-stars__star { cursor: default; font-size: 1rem; }

/* ── Signature Canvas ── */
.tp-signature { border: 2px dashed var(--tp-gray-300); border-radius: var(--tp-radius); background: #fff; cursor: crosshair; touch-action: none; }
.tp-signature--signed { border-color: var(--tp-success); border-style: solid; }

/* ── Map ── */
.tp-map { height: 400px; border-radius: var(--tp-radius); border: 1px solid var(--tp-gray-200); margin: 1rem 0; }
.tp-map--small { height: 250px; }
.tp-map--picker { cursor: crosshair; }

/* ── Photo Gallery ── */
.tp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin: 1rem 0; }
.tp-photos__item { aspect-ratio: 1; border-radius: var(--tp-radius); overflow: hidden; border: 1px solid var(--tp-gray-200); }
.tp-photos__item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Modal ── */
.tp-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.tp-modal__content { background: #fff; border-radius: var(--tp-radius); padding: 2rem; max-width: 500px; width: 90%; box-shadow: var(--tp-shadow-lg); }
.tp-modal__actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; justify-content: flex-end; }

/* ── Pagination ── */
.tp-pagination { display: flex; gap: 0.25rem; justify-content: center; margin-top: 2rem; }
.tp-pagination__item { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--tp-radius); text-decoration: none; font-size: 0.875rem; color: var(--tp-gray-600); border: 1px solid var(--tp-gray-200); background: #fff; }
.tp-pagination__item:hover { border-color: var(--tp-primary); color: var(--tp-primary); }
.tp-pagination__item--active { background: var(--tp-primary); color: #fff; border-color: var(--tp-primary); }

/* ── Filters ── */
.tp-filters { background: #fff; border: 1px solid var(--tp-gray-200); border-radius: var(--tp-radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.tp-filters__row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.tp-filters__group { flex: 1; min-width: 150px; }
.tp-filters__group label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--tp-gray-500); text-transform: uppercase; margin-bottom: 0.25rem; }
.tp-filters__group input, .tp-filters__group select { width: 100%; padding: 0.5rem 0.625rem; border: 1px solid var(--tp-gray-300); border-radius: 6px; font-size: 0.875rem; }

/* ── Price Breakdown ── */
.tp-price-breakdown { background: var(--tp-gray-50); border-radius: var(--tp-radius); padding: 1rem 1.25rem; }
.tp-price-breakdown__row { display: flex; justify-content: space-between; padding: 0.375rem 0; font-size: 0.9rem; }
.tp-price-breakdown__row--total { border-top: 2px solid var(--tp-gray-200); margin-top: 0.5rem; padding-top: 0.75rem; font-weight: 700; font-size: 1rem; }

/* ── Legal Notice ── */
.tp-legal-notice { background: var(--tp-warning-light); border: 1px solid #fcd34d; border-radius: var(--tp-radius); padding: 1rem; font-size: 0.875rem; color: var(--tp-gray-700); margin: 1rem 0; }

/* ── File Upload ── */
.tp-file-upload { border: 2px dashed var(--tp-gray-300); border-radius: var(--tp-radius); padding: 2rem; text-align: center; cursor: pointer; transition: border-color 0.15s; }
.tp-file-upload:hover { border-color: var(--tp-primary); }
.tp-file-upload input[type="file"] { display: none; }
.tp-file-upload__label { color: var(--tp-primary); font-weight: 500; cursor: pointer; }

/* ── Auth Pages ── */
.tp-auth { max-width: 440px; margin: 2rem auto; }
.tp-auth .tp-card { padding: 2rem; }
.tp-auth__title { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.tp-auth__links { text-align: center; margin-top: 1rem; font-size: 0.875rem; }
.tp-auth__links a { color: var(--tp-primary); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .tp-header__nav { display: none; }
    .tp-header__mobile-toggle { display: block; }
    .tp-header__nav--open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--tp-gray-200); padding: 1rem; box-shadow: var(--tp-shadow-lg); }

    .tp-form__row, .tp-form__row--3 { grid-template-columns: 1fr; }
    .tp-stats { grid-template-columns: 1fr 1fr; }
    .tp-listings-grid { grid-template-columns: 1fr; }
    .tp-compare { grid-template-columns: 1fr; }
    .tp-filters__row { flex-direction: column; }

    .tp-table { display: block; overflow-x: auto; }
    .tp-chat { height: 400px; }
}

@media (max-width: 480px) {
    .tp-stats { grid-template-columns: 1fr; }
    .tp-container { padding: 0 0.75rem; }
    .tp-main { padding: 1rem 0; }
}

/* ── Language Switcher ── */
.tpt-lang { position: relative; }
.tpt-lang__btn { display: flex; align-items: center; gap: 0.375rem; background: rgba(0,0,0,0.05); border: 1px solid var(--tp-gray-300); padding: 0.3rem 0.6rem; border-radius: 50px; cursor: pointer; color: var(--tp-gray-700); font-size: 0.8rem; font-weight: 600; font-family: var(--tp-font); transition: 0.15s; }
.tpt-lang__btn:hover { background: rgba(0,0,0,0.08); }
.tpt-lang__flag { font-size: 1rem; line-height: 1; }
.tpt-lang__code { letter-spacing: 0.05em; }
.tpt-lang__dropdown { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: var(--tp-radius); box-shadow: 0 8px 30px rgba(0,0,0,0.15); min-width: 170px; padding: 0.375rem 0; z-index: 300; border: 1px solid var(--tp-gray-200); }
.tpt-lang__dropdown.is-open { display: block; }
.tpt-lang__item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; color: var(--tp-gray-700); font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: 0.15s; }
.tpt-lang__item:hover { background: var(--tp-gray-50); color: var(--tp-primary); }
.tpt-lang__item--active { background: var(--tp-primary-light); color: var(--tp-primary); font-weight: 600; }
.tpt-lang__item--active::after { content: '\2713'; margin-left: auto; font-size: 0.75rem; }

/* ══════════════════════════════════════════
   MODERN PORTAL DASHBOARD & PAGES
   ══════════════════════════════════════════ */

/* Stats Grid */
.tp-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tp-stat-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.5rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: box-shadow 0.2s, transform 0.2s; }
.tp-stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.tp-stat-value { display: block; font-size: 2.25rem; font-weight: 800; color: #e8720c; line-height: 1; }
.tp-stat-label { display: block; font-size: 0.8rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.5rem; }

/* Section headers */
.tp-section { margin-bottom: 2rem; }
.tp-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tp-section-title { font-size: 1.15rem; font-weight: 700; color: #111827; margin: 0; }

/* Page title */
.tp-page-title { font-size: 1.5rem; font-weight: 800; color: #111827; margin: 0 0 1.5rem; }

/* Dashboard */
.tp-dashboard { }
.tp-dashboard-actions { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }

/* Cards grid */
.tp-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.tp-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: box-shadow 0.2s, transform 0.2s; }
.tp-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }
.tp-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 0.75rem; }
.tp-card-title { font-size: 1rem; font-weight: 700; color: #111827; margin: 0; }
.tp-card-route { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; color: #4b5563; margin-bottom: 0.5rem; }
.tp-card-route svg { color: #e8720c; flex-shrink: 0; }
.tp-card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; font-size: 0.8rem; color: #9ca3af; }
.tp-card-price { font-size: 1.25rem; font-weight: 700; color: #e8720c; }
.tp-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid #f3f4f6; margin-top: 0.75rem; }
.tp-card-date { font-size: 0.8rem; color: #9ca3af; }

/* Tabs */
.tp-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tp-tab { display: inline-block; padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; text-decoration: none; border: 1px solid #e5e7eb; background: #fff; color: #6b7280; transition: all 0.2s; }
.tp-tab:hover { border-color: #e8720c; color: #e8720c; }
.tp-tab.active, .tp-tab-active { background: #e8720c; color: #fff; border-color: #e8720c; }

/* Badges */
.tp-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.tp-badge-success, .tp-badge-active, .tp-badge-verified, .tp-badge-completed { background: #dcfce7; color: #16a34a; }
.tp-badge-warning, .tp-badge-pending { background: #fef3c7; color: #d97706; }
.tp-badge-danger, .tp-badge-cancelled, .tp-badge-expired, .tp-badge-rejected { background: #fee2e2; color: #dc2626; }
.tp-badge-info, .tp-badge-selected, .tp-badge-in-transit { background: #dbeafe; color: #2563eb; }
.tp-badge-neutral, .tp-badge-retracted { background: #f3f4f6; color: #6b7280; }

/* Buttons */
.tp-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.tp-btn-primary { background: #e8720c; color: #fff; }
.tp-btn-primary:hover { background: #cc6200; color: #fff; }
.tp-btn-secondary { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.tp-btn-secondary:hover { background: #f9fafb; border-color: #e8720c; color: #e8720c; }
.tp-btn-danger { background: #dc2626; color: #fff; }
.tp-btn-danger:hover { background: #b91c1c; }
.tp-btn-small { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* Alerts */
.tp-alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.25rem; font-size: 0.9rem; }
.tp-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.tp-alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.tp-alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.tp-alert-info { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

/* Tables */
.tp-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.tp-table th { background: #f9fafb; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e5e7eb; }
.tp-table td { padding: 0.75rem 1rem; border-bottom: 1px solid #f3f4f6; font-size: 0.9rem; vertical-align: middle; }
.tp-table tr:hover td { background: #fafbfc; }
.tp-actions { display: flex; gap: 0.5rem; }

/* Forms */
.tp-form { }
.tp-form-group { margin-bottom: 1.25rem; }
.tp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tp-form-actions { margin-top: 1.5rem; }
.tp-label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.03em; }
.tp-input, .tp-select, .tp-textarea { width: 100%; padding: 0.7rem 0.85rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.9rem; font-family: inherit; color: #1f2937; transition: border-color 0.2s; }
.tp-input:focus, .tp-select:focus, .tp-textarea:focus { outline: none; border-color: #e8720c; box-shadow: 0 0 0 3px rgba(232,114,12,0.1); }
.tp-textarea { min-height: 100px; resize: vertical; }
.tp-checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.tp-checkbox { accent-color: #e8720c; }

/* Links */
.tp-link { color: #e8720c; text-decoration: none; font-weight: 500; }
.tp-link:hover { color: #cc6200; text-decoration: underline; }
.tp-text-muted { color: #9ca3af; font-size: 0.85rem; }

/* Empty state */
.tp-empty { text-align: center; padding: 3rem 1rem; color: #9ca3af; }
.tp-empty svg { margin: 0 auto 1rem; opacity: 0.5; }
.tp-empty p { margin: 0 0 1rem; }

/* Settings menu (account page) */
.tp-settings-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tp-settings-item { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.25rem; text-decoration: none; color: inherit; transition: all 0.2s; }
.tp-settings-item:hover { border-color: #e8720c; box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-1px); }
.tp-settings-item svg { color: #e8720c; flex-shrink: 0; }
.tp-settings-label h3 { font-size: 0.95rem; font-weight: 700; color: #111827; margin: 0 0 0.2rem; }
.tp-settings-label p { font-size: 0.8rem; color: #6b7280; margin: 0; }
.tp-settings-item-danger { border-color: #fca5a5; }
.tp-settings-item-danger:hover { border-color: #dc2626; }
.tp-settings-item-danger svg { color: #dc2626; }
.tp-settings-arrow { margin-left: auto; color: #d1d5db; }

/* Verification & Stripe status */
.tp-verification-status, .tp-stripe-status { display: flex; align-items: center; gap: 0.75rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; }
.tp-verification-badge { font-weight: 700; }

/* Profile edit */
.tp-profile-edit { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.tp-profile-form { }
.tp-fieldset { border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; background: #fff; }
.tp-legend { font-size: 0.85rem; font-weight: 700; color: #e8720c; text-transform: uppercase; letter-spacing: 0.05em; padding: 0 0.5rem; }
.tp-checkbox-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }

/* Service areas */
.tp-service-areas-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.tp-service-area-item { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid #f3f4f6; }
.tp-service-areas-map { height: 200px; border-radius: 8px; border: 1px solid #e5e7eb; margin-bottom: 1rem; background: #f3f4f6; }
.tp-remove-area { color: #dc2626; cursor: pointer; font-size: 0.8rem; }

/* Warning list */
.tp-warning-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.tp-warning-list li { padding: 0.35rem 0; }
.tp-pending-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.tp-pending-list li { padding: 0.35rem 0; }

/* Portal responsive */
@media (max-width: 768px) {
    .tp-stats-grid { grid-template-columns: 1fr 1fr; }
    .tp-cards-grid { grid-template-columns: 1fr; }
    .tp-settings-menu { grid-template-columns: 1fr; }
    .tp-profile-edit { grid-template-columns: 1fr; }
    .tp-form-row { grid-template-columns: 1fr; }
    .tp-tabs { gap: 0.25rem; }
    .tp-tab { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .tp-stats-grid { grid-template-columns: 1fr; }
}

/* ── Admin Styles (within WP admin) ── */
.tp-admin-wrap { max-width: 1200px; }
.tp-admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.tp-admin-stat { background: #fff; border: 1px solid #ddd; padding: 1rem; border-radius: 4px; text-align: center; }
.tp-admin-stat__value { font-size: 1.75rem; font-weight: 700; color: #2271b1; }
.tp-admin-stat__label { font-size: 0.8rem; color: #646970; }
.tp-admin-alert { padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; }
.tp-admin-alert--critical { background: #fee2e2; border-left: 4px solid #dc2626; }
.tp-admin-alert--warning { background: #fef3c7; border-left: 4px solid #d97706; }
.tp-admin-alert--info { background: #e0f2fe; border-left: 4px solid #0284c7; }
