@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Brand — primary palette */
    --navy: #002147;
    --navy-light: #003366;
    --navy-dark: #001530;
    --teal-green: #1a6b5a;  /* green-tinted teal: links, modal headers, popovers */
    --teal: #1a7a8a;
    --teal-light: #2a9db0;
    --teal-soft: #e8f4f6;
    --green: #4CAF50;
    --green-light: #66bb6a;
    --green-soft: #e8f5e9;

    /* Semantic / status */
    --status-success: #28a745;
    --status-warning: #ffc107;
    --status-danger: #dc3545;
    --status-info: #1565c0;
    --status-purple: #ab47bc;
    --status-orange: #ffa726;

    /* Surface */
    --bg-warm: #f5f7fa;
    --border-subtle: #e2e6ea;
    --border-card: 1px solid rgba(0, 33, 71, 0.09);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-body: #2d3340;

    /* Radius system */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Type scale tokens */
    --text-xs:   0.6875rem;
    --text-sm:   0.75rem;
    --text-base: 0.875rem;
    --text-md:   1rem;
    --text-lg:   1.25rem;
    --text-xl:   1.75rem;

    /* 4px spacing grid */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-12: 3rem;

    /* Elevation */
    --card-shadow: 0 1px 4px rgba(0, 33, 71, 0.06), 0 2px 12px rgba(0, 33, 71, 0.05);
    --card-shadow-hover: 0 4px 20px rgba(0, 33, 71, 0.11);
    --btn-shadow-hover: 0 4px 12px rgba(0, 33, 71, 0.2);

    /* Motion */
    --transition-speed: 0.18s;

    /* Legacy aliases — use --green instead */
    --accent-green: #4CAF50;
    --easyisf-green: #4CAF50;
}

body {
    background-color: var(--bg-warm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

.navbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 2px 12px rgba(0, 33, 71, 0.2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.text-primary-navy {
    color: var(--navy) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all var(--transition-speed) ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--navy-light) 0%, var(--teal-light) 100%);
    border: none;
    transform: translateY(-1px);
    box-shadow: var(--btn-shadow-hover);
}

.btn-outline-primary {
    color: var(--navy);
    border-color: var(--teal);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.btn-outline-primary:hover,
.btn-check:checked + .btn-outline-primary {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    border-color: var(--teal);
    color: #fff;
}

.btn-outline-teal {
    color: var(--teal-green);
    border-color: var(--teal-green);
    background: transparent;
}

.btn-outline-teal:hover {
    background: var(--teal-green);
    color: #fff;
    border-color: var(--teal-green);
}

.btn-success {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049 0%, #5cb860 100%);
    border: none;
    transform: translateY(-1px);
    box-shadow: var(--btn-shadow-hover);
}

.progress-bar {
    background: linear-gradient(90deg, var(--navy) 0%, var(--teal) 50%, var(--green) 100%);
    font-size: 0.7rem;
}

.auth-card {
    border: var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.form-card {
    border: var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border-top: 3px solid var(--teal);
    transition: box-shadow var(--transition-speed) ease;
}

.form-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.form-card .card-header {
    background: #fff;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0,33,71,0.07);
}

.form-control,
.form-select {
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border-color: #cdd3da;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(26, 122, 138, 0.12);
}

.form-check-input:checked {
    background-color: var(--teal);
    border-color: var(--teal);
}

.divider-text {
    position: relative;
    text-align: center;
}

.divider-text span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    z-index: 1;
    color: #6c757d;
    font-size: 0.9rem;
}

.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-subtle);
}

.nav-pills .nav-link {
    color: var(--navy);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.88rem;
    transition: all var(--transition-speed) ease;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    color: #fff;
}

.info-toggle {
    color: var(--teal);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
}

.info-toggle:hover {
    color: var(--navy);
    text-decoration: underline;
}

.info-content {
    background-color: var(--teal-soft);
    border-left: 4px solid var(--teal);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.footer-bar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: rgba(255, 255, 255, 0.65);
    margin-top: auto;
    font-size: 0.78rem;
}

.success-icon {
    animation: pulse 2s ease-in-out forwards;
}

@keyframes pulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.flash-messages {
    margin-bottom: 1rem;
}

.form-check-label a {
    color: var(--teal);
    font-weight: 500;
}

.form-check-label a:hover {
    color: var(--navy);
}

.alert-info {
    background-color: var(--teal-soft);
    border-color: var(--teal-light);
    color: #155a6b;
}

.badge {
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 20px;
    font-size: 0.75rem;
}

h1, h2, h3, h4, h5 {
    letter-spacing: -0.02em;
}

h6 {
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

.table-compact {
    font-size: 0.86rem;
}
.table-compact th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.5rem;
    white-space: nowrap;
    color: #4a5568;
    background: #f8fafc;
    font-weight: 600;
}
.table-compact td {
    padding: 0.45rem 0.5rem;
    vertical-align: middle;
}
.table-compact .badge-status {
    font-size: 0.72rem;
    padding: 0.25em 0.55em;
    white-space: nowrap;
    border-radius: 20px;
}
/* Tighter variant of .table-compact — fits 10-12 column tables on a 24" monitor
   without horizontal scrolling. Allows header text to wrap and gives
   common wide columns sensible max-widths. */
.table-fit {
    font-size: 0.78rem;
}
.table-fit th,
.table-fit td {
    padding: 0.4rem 0.45rem;
    vertical-align: middle;
}
.table-fit th {
    font-size: 0.72rem;
    white-space: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4a5568;
    font-weight: 600;
}
.table-fit .col-account {
    max-width: 160px;
    white-space: normal;
    word-break: break-word;
}
.table-fit .col-bol-collapsed,
.table-fit .col-veh-collapsed {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.table-fit .col-veh-collapsed {
    max-width: 180px;
}
.btn-compact {
    padding: 0.2rem 0.5rem;
    font-size: 0.775rem;
    border-radius: var(--radius-md);
}
.btn-compact i {
    font-size: 0.75rem;
}

.row-complete td {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border-top-color: rgba(40, 167, 69, 0.18) !important;
}
.row-complete td:first-child {
    border-left: 3px solid var(--status-success);
}
.row-no-bill td {
    background-color: rgba(255, 193, 7, 0.12) !important;
    border-top-color: rgba(255, 193, 7, 0.2) !important;
}
.row-no-bill td:first-child {
    border-left: 3px solid var(--status-warning);
}
.row-pending td {
    background-color: rgba(220, 53, 69, 0.08) !important;
    border-top-color: rgba(220, 53, 69, 0.15) !important;
}
.row-pending td:first-child {
    border-left: 3px solid #e8684a;
}
.row-pending-filing td {
    background-color: rgba(21, 101, 192, 0.08) !important;
    border-top-color: rgba(21, 101, 192, 0.15) !important;
}
.row-pending-filing td:first-child {
    border-left: 3px solid var(--status-info);
}
.row-payment-late td {
    background-color: rgba(220, 53, 69, 0.12) !important;
    border-top-color: rgba(220, 53, 69, 0.18) !important;
}
.row-payment-late td:first-child {
    border-left: 3px solid var(--status-danger);
}

.status-popover {
    cursor: pointer;
    transition: filter var(--transition-speed);
}
.status-popover:hover {
    filter: brightness(1.15);
}
.status-hint {
    font-size: 0.65rem;
    color: #6c8ebf;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition-speed);
    display: inline-block;
    margin-top: 2px;
}
.status-hint:hover {
    opacity: 1;
    text-decoration: underline;
}
.status-hint i {
    font-size: 0.55rem;
}
.status-info-popover {
    max-width: 420px !important;
}
.status-info-popover .popover-header {
    background: linear-gradient(135deg, var(--navy), var(--teal-green));
    color: #fff;
    font-size: 0.92rem;
    border-bottom: none;
}
.status-info-popover .popover-header i {
    color: #fff !important;
}
.status-info-popover .popover-body {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #333;
    padding: 0.85rem 1rem;
}
.status-info-popover .popover-body a {
    color: var(--teal-green);
    font-weight: 600;
}

.bond-option-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--navy) !important;
}
.bond-option-card.border-primary {
    border-color: var(--navy) !important;
    background-color: #f0f4f8;
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.doc-carousel-tabs .nav-link {
    color: var(--navy);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.6rem 1rem;
    transition: all var(--transition-speed);
}
.doc-carousel-tabs .nav-link:hover {
    color: var(--teal);
    border-bottom-color: var(--teal-light);
    background: var(--teal-soft);
}
.doc-carousel-tabs .nav-link.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
    background: white;
    font-weight: 700;
}
.vehicle-toggle {
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.vehicle-toggle .fa-chevron-down {
    transition: transform var(--transition-speed) ease;
    font-size: 0.7rem;
}
.vehicle-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}
.bg-teal {
    background-color: var(--teal) !important;
}
.text-teal {
    color: var(--teal) !important;
}

.drop-zone {
    position: relative;
    border: 2px dashed #c0c8d4;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all var(--transition-speed) ease;
    background: #fafbfc;
    cursor: pointer;
}
.drop-zone:hover {
    border-color: var(--teal);
    background: var(--teal-soft);
}
.drop-zone.drag-over {
    border-color: var(--teal);
    background: var(--teal-soft);
    box-shadow: 0 0 0 3px rgba(26,122,138,0.15);
}
.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.drop-zone-label {
    pointer-events: none;
    color: #7b8a9a;
    font-size: 0.82rem;
}
.drop-zone-label i {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 6px;
    color: #a0adb8;
}
.drop-zone.has-file {
    border-color: var(--green);
    background: var(--green-soft);
}
.drop-zone.has-file .drop-zone-label {
    color: var(--green);
}
.drop-zone-sm {
    padding: 10px;
}
.drop-zone-sm .drop-zone-label {
    font-size: 0.78rem;
}
.drop-zone-sm .drop-zone-label i {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.dashboard-card {
    border: var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* Tab container: neutral background instead of gradient */
.dashboard-card > .card-header,
.dashboard-card > .nav-tabs,
.portal-tabs-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,33,71,0.08);
}

.dashboard-tab {
    color: #6c7a8d !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 0.7rem 1.2rem !important;
    margin-bottom: -1px;
    background: transparent !important;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-speed) ease;
}
.dashboard-tab:hover {
    color: var(--navy) !important;
    background: rgba(26,122,138,0.04) !important;
}
.dashboard-tab.active {
    color: var(--navy) !important;
    background: transparent !important;
    border-bottom-color: var(--teal) !important;
    font-weight: 600;
}

.dashboard-welcome {
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--teal);
    padding: 1.1rem 1.4rem;
}
.dashboard-welcome h4, .dashboard-welcome h5, .dashboard-welcome h6 {
    color: var(--navy);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.welcome-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.isf-table {
    border-collapse: separate;
    border-spacing: 0;
}
.isf-table thead th {
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.6rem 0.65rem;
    border-bottom: 1px solid rgba(0,33,71,0.08);
    border-top: none;
    white-space: nowrap;
}
.isf-table thead th:first-child { border-left: none; }
.isf-table thead th:last-child { border-right: none; }
.isf-table tbody td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid rgba(0,33,71,0.05);
    vertical-align: middle;
    font-size: 0.875rem;
}
.isf-table tbody tr:hover td {
    background: rgba(26,122,138,0.03);
}
.isf-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status pill — custom dot+label badge */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2em 0.6em;
    border-radius: 20px;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.status-pill::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
    opacity: 0.7;
}

.entry-row-todo td {
    background-color: rgba(121, 134, 203, 0.1) !important;
    border-top-color: rgba(121, 134, 203, 0.18) !important;
}
.entry-row-todo td:first-child {
    border-left: 3px solid #7986cb;
}
.entry-row-ready td {
    background-color: rgba(102, 187, 106, 0.1) !important;
    border-top-color: rgba(102, 187, 106, 0.18) !important;
}
.entry-row-ready td:first-child {
    border-left: 3px solid #66bb6a;
}
.entry-row-response td {
    background-color: rgba(255, 167, 38, 0.1) !important;
    border-top-color: rgba(255, 167, 38, 0.18) !important;
}
.entry-row-response td:first-child {
    border-left: 3px solid var(--status-orange);
}
.entry-row-release td {
    background-color: rgba(239, 83, 80, 0.1) !important;
    border-top-color: rgba(239, 83, 80, 0.18) !important;
}
.entry-row-release td:first-child {
    border-left: 3px solid #ef5350;
}
.entry-row-payment td {
    background-color: rgba(171, 71, 188, 0.1) !important;
    border-top-color: rgba(171, 71, 188, 0.18) !important;
}
.entry-row-payment td:first-child {
    border-left: 3px solid var(--status-purple);
}
.entry-row-released td {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border-top-color: rgba(40, 167, 69, 0.18) !important;
}
.entry-row-released td:first-child {
    border-left: 3px solid var(--status-success);
}

/* ─── Wizard styles ─────────────────────────────────────────────────────── */
.wizard-step {
    animation: wizardFadeIn 0.2s ease;
}
@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    gap: 1rem;
}
.wizard-step-indicator {
    font-size: 0.82rem;
    color: #6c757d;
    text-align: center;
    flex: 1;
}
.outer-step-label {
    color: #7a8499;
    transition: color 0.15s;
    font-size: 0.8rem;
    font-weight: 500;
}
.outer-step-label.active {
    color: var(--navy);
    font-weight: 600;
}

/* ─── Password show/hide toggle ─────────────────────────────────────────── */
.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 2px 4px;
    line-height: 1;
    z-index: 5;
}
.password-toggle-btn:hover { color: #002147; }

/* ─── Modal z-index floor ──────────────────────────────────────────────────
   Bootstrap defaults are 1050 (backdrop) / 1055 (modal). Several pages
   (team.html, portal.html) host fixed-position overlays and detail panels
   up to z-index 1100 (`file-viewer-modal`). Without this rule a Bootstrap
   modal renders BEHIND any stuck-shown overlay and only the gray backdrop
   is clickable. Inline `style="z-index:..."` on a specific modal still
   wins via specificity if intentional stacking is required. */
.modal-backdrop { z-index: 1105; }
.modal { z-index: 1110; }

/* ─── Modal header patterns ─────────────────────────────────────────────── */
.modal-header-definition {
    background: linear-gradient(135deg, var(--teal-green) 0%, var(--teal) 100%);
    color: #fff;
    border-bottom: none;
}
.modal-header-brand {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal-green) 100%);
    color: #fff;
    border-bottom: none;
}
.modal-header-success {
    background: linear-gradient(135deg, var(--teal-green) 0%, var(--green) 100%);
    color: #fff;
    border-bottom: none;
}
.modal-header-danger {
    background: linear-gradient(135deg, #c0392b 0%, var(--status-danger) 100%);
    color: #fff;
    border-bottom: none;
}

/* ─── Shared tab header class used across admin/team/portal ─────────────── */
.team-header,
.portal-header {
    background: #fff !important;
    border-bottom: 1px solid rgba(0,33,71,0.08) !important;
}

/* ─── Auth split layout (landing page) ──────────────────────────────────── */
.auth-layout {
    min-height: 100vh;
    display: flex;
}

.auth-split-left {
    flex: 0 0 40%;
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--teal-green) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 3.5rem;
    color: #fff;
}

.auth-split-left .auth-brand-logo {
    max-width: 260px;
    margin-bottom: 2rem;
    opacity: 0.96;
    align-self: center;
}

.auth-split-left .auth-brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.auth-split-left .auth-brand-sub {
    font-size: 0.95rem;
    opacity: 0.75;
    margin-bottom: 2.5rem;
    line-height: 1.55;
}

.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.88rem;
    opacity: 0.85;
    line-height: 1.45;
}

.auth-feature-list li::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
    margin-top: 1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.auth-split-left .auth-legal-note {
    margin-top: 2.5rem;
    font-size: 0.73rem;
    opacity: 0.5;
    line-height: 1.5;
    align-self: center;
}

.auth-review-header {
    align-self: center;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-review-stars-header {
    color: #ffc107;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.auth-review-rating {
    font-size: 0.82rem;
    opacity: 0.8;
    font-weight: 600;
}

.auth-review-rating a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-review-rating a:hover {
    opacity: 1;
    color: #fff;
}

.auth-reviews {
    align-self: stretch;
    margin-top: 0;
}

.auth-review-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    backdrop-filter: blur(4px);
}

.auth-review-stars {
    color: #ffc107;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    letter-spacing: 2px;
}

.auth-review-text {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.92;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.auth-review-author {
    font-size: 0.78rem;
    opacity: 0.7;
    font-weight: 600;
}

.auth-review-dots.carousel-indicators {
    position: static;
    margin: 0.75rem 0 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.auth-review-dots.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    padding: 0;
    cursor: pointer;
    transition: background 0.3s;
    text-indent: 0;
    flex: none;
}

.auth-review-dots.carousel-indicators button.active {
    background: rgba(255, 255, 255, 0.85);
}

.auth-review-link {
    text-align: center;
    margin-top: 0.6rem;
}

.auth-review-link a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-review-link a:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-split-right {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
    overflow-y: auto;
}

.auth-split-right .auth-form-inner {
    width: 100%;
    max-width: 400px;
}

@media (max-width: 768px) {
    .auth-layout {
        flex-direction: column;
    }
    .auth-split-left {
        display: none;
    }
    .auth-split-right {
        padding: 2rem 1.25rem;
        min-height: 100vh;
    }
}

/* ─── Portal tab header bar ──────────────────────────────────────────────── */
.portal-tab-bar {
    background: #fff;
    border-bottom: 1px solid rgba(0,33,71,0.08);
    padding: 0 0.75rem;
    display: flex;
    align-items: flex-end;
    gap: 0;
    min-height: 44px;
}

/* ─── Portal tab — synced to dashboard-tab values ───────────────────────── */
.portal-tab {
    color: #6c7a8d !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 0.7rem 1.2rem !important;
    margin-bottom: -1px;
    background: transparent !important;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-speed) ease;
    white-space: nowrap;
}
.portal-tab:hover {
    color: var(--navy) !important;
    background: rgba(26,122,138,0.04) !important;
}
.portal-tab.active {
    color: var(--navy) !important;
    background: transparent !important;
    border-bottom-color: var(--teal) !important;
    font-weight: 600;
}

/* ─── Phase A: Accessibility fixes ─────────────────────────────────────── */

/* P0 — Warning badge: #ffc107 bg with default text fails WCAG AA (1.8:1) */
.badge.bg-warning { color: #1a1a1a !important; }

/* P0 — Status hint: too faint and too small */
.status-hint {
    color: var(--navy);
    opacity: 0.6;
    font-size: 0.7rem;
}
.status-hint i { font-size: 0.65rem; }

/* P0 — Auth legal note: opacity 0.5 fails AA on gradient */
.auth-split-left .auth-legal-note { opacity: 0.7; }

/* P0 — Drop zone label: #7b8a9a fails AA */
.drop-zone-label { color: #5e6e80; }

/* ─── Phase A: Secondary button brand override ──────────────────────────── */
/* Replaces Bootstrap gray (#6c757d) with navy-toned appearance */
.btn-secondary {
    background: #f0f4f8;
    border-color: rgba(0, 33, 71, 0.2);
    color: var(--navy);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}
.btn-secondary:hover,
.btn-secondary:focus {
    background: rgba(0, 33, 71, 0.08);
    border-color: rgba(0, 33, 71, 0.35);
    color: var(--navy);
    box-shadow: none;
}
.btn-outline-secondary {
    color: var(--navy);
    border-color: rgba(0, 33, 71, 0.22);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: rgba(0, 33, 71, 0.05);
    border-color: rgba(0, 33, 71, 0.35);
    color: var(--navy);
    box-shadow: none;
}

/* ─── Phase A: Footer redesign ──────────────────────────────────────────── */
.footer-bar {
    background: #ffffff;
    color: #6c7a8d;
    border-top: 1px solid rgba(0, 33, 71, 0.06);
    margin-top: auto;
    font-size: 0.78rem;
}
.footer-link {
    color: var(--navy);
    text-decoration: underline;
    opacity: 0.7;
}

/* ─── Phase A: Animation & micro-motion ─────────────────────────────────── */

/* Shorten success pulse: 2s (consumer-feeling) → 0.6s (enterprise) */
.success-icon { animation: pulse 0.6s ease-out forwards; }

/* Tab content fade: Bootstrap's .fade has opacity but no transition duration set */
.tab-pane.fade { transition: opacity 0.15s ease; }

/* ─── Phase D: ISF empty state ──────────────────────────────────────────── */
.isf-empty-state {
    border: 1px dashed rgba(0, 33, 71, 0.12);
    border-radius: var(--radius-lg);
    background: #fafbfc;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile responsiveness — all rules scoped to @media queries
   Desktop view is completely unaffected.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* --- Tables: override inline min-widths, compact for mobile --- */
    .isf-table {
        min-width: 0 !important;
    }
    .isf-table thead th {
        white-space: normal;
        font-size: 0.65rem;
        padding: 0.4rem 0.35rem;
    }
    .isf-table tbody td {
        padding: 0.4rem 0.35rem;
        font-size: 0.78rem;
    }

    .table-compact {
        font-size: 0.78rem;
    }
    .table-compact th {
        white-space: normal;
        font-size: 0.65rem;
        padding: 0.35rem 0.3rem;
    }
    .table-compact td {
        padding: 0.3rem 0.3rem;
        font-size: 0.76rem;
    }
    .table-compact .badge-status {
        font-size: 0.65rem;
        padding: 0.2em 0.4em;
    }

    /* --- Tab bars: horizontal scroll instead of page overflow --- */
    #portalTabs,
    #teamTabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap !important;
    }
    #portalTabs::-webkit-scrollbar,
    #teamTabs::-webkit-scrollbar {
        display: none;
    }
    .portal-tab,
    .team-tab,
    .dashboard-tab {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem;
    }

    /* --- Search/filter inputs: let them shrink --- */
    .ob-filter-box,
    .entry-filter-box {
        min-width: 70px !important;
        font-size: 0.72rem;
        padding: 0.4rem !important;
    }

    /* --- General layout: wrapping, spacing --- */
    .portal-card .card-body {
        padding: 0.75rem;
    }
    .btn-compact {
        padding: 0.15rem 0.4rem;
        font-size: 0.72rem;
    }
    .status-pill {
        font-size: 0.68rem;
    }
}

@media (max-width: 480px) {

    /* --- Detail panels: full-width on small phones --- */
    #portal-entry-detail-panel,
    #ob-detail-panel,
    #entry-detail-panel,
    #isf-detail-panel,
    #importer-detail-panel {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    /* --- Tighter typography --- */
    .portal-tab,
    .team-tab,
    .dashboard-tab {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem;
    }

    .isf-table thead th {
        font-size: 0.6rem;
        padding: 0.3rem 0.25rem;
    }
    .isf-table tbody td {
        font-size: 0.73rem;
        padding: 0.3rem 0.25rem;
    }
}

