﻿/* ==========================================================================
   TC-TEAM-HUB — Global Web Panel Theme Contract V1
   Applies after site.css to every old and new Web-panel surface.
   ========================================================================== */

:root {
    --tc-bg: #080D10;
    --tc-top: #0B1115;
    --tc-sidebar-bg: #080D10;
    --tc-panel: #0F161B;
    --tc-panel-2: #111A20;
    --tc-panel-3: #141D23;
    --tc-input: #0E151A;
    --tc-border: #2E3A42;
    --tc-border-soft: #222D34;
    --tc-border-strong: #3B4850;
    --tc-muted: #8B99A2;
    --tc-muted-2: #6F7D86;
    --tc-text: #EEF2F4;
    --tc-text-soft: #C9D0D4;
    --tc-orange: #FFA300;
    --tc-orange-soft: #FFA30020;
    --tc-orange-border: #FFA30055;
    --tc-green: #5CD66F;
    --tc-blue: #59BFF2;
    --tc-red: #FF6262;
    --tc-yellow: #FFD05A;
    --tc-radius: 14px;
    --tc-control-radius: 9px;
    --tc-control-height: 43px;
    --tc-filter-button-width: 140px;
    --tc-filter-button-height: 42px;
}

/* --- Global shell ------------------------------------------------------- */

html {
    color-scheme: dark;
    background: var(--tc-bg);
}

body,
.tc-body,
.tc-auth-body {
    background:
        radial-gradient(circle at 80% -20%, #16212955 0, transparent 35%),
        var(--tc-bg);
    color: var(--tc-text);
}

.tc-shell,
.tc-main {
    background: transparent;
}

.tc-sidebar {
    background: linear-gradient(180deg, #090E12 0%, #080D10 100%);
    border-right-color: var(--tc-border-soft);
}

.tc-topbar {
    background: #0B1115F2;
    border-bottom-color: var(--tc-border-soft);
    backdrop-filter: blur(14px);
}

.tc-content {
    max-width: 1780px;
    padding: 24px 26px 64px;
}

.tc-sidebar-footer,
.tc-brand {
    border-color: var(--tc-border-soft);
}

.tc-nav-label {
    color: #70808A;
}

.tc-nav-item {
    color: #CBD2D6;
}

.tc-nav-item:hover {
    background: #11191E;
    color: #FFFFFF;
}

.tc-nav-item.is-active {
    background: linear-gradient(90deg, #FFA30018, #FFA30007);
    border-color: #FFA30045;
}

.tc-nav-item.is-active .tc-nav-dot {
    background: var(--tc-orange);
    border-color: var(--tc-orange);
}

.tc-nav-stage {
    color: #667680;
}

/* --- Typography -------------------------------------------------------- */

.tc-page-head,
.tc-page-hero,
.tc-dashboard-hero,
.tc-reports-hero,
.tc-members-page-head,
.tc-join-page-head {
    color: var(--tc-text);
}

.tc-page-head h1,
.tc-page-hero h1,
.tc-dashboard-hero h1,
.tc-reports-hero h1,
.tc-members-page-head h1,
.tc-join-page-head h1 {
    color: #F5F7F8;
}

.tc-page-head p,
.tc-page-hero p,
.tc-dashboard-panel-head p,
.tc-reports-hero p,
.tc-muted {
    color: var(--tc-muted);
}

.tc-eyebrow,
.tc-card-label {
    color: var(--tc-orange);
    font-weight: 800;
    letter-spacing: .13em;
}

.tc-section-head h2,
.tc-dashboard-panel-head h2,
.tc-data-section h2 {
    color: #F0F3F5;
}

/* --- One shared surface language for old + new pages ------------------ */

.tc-card,
.tc-dashboard-panel,
.tc-data-section,
.tc-filter-panel,
.tc-members-filter-card,
.tc-join-filter-card,
.tc-job-filter-card,
.tc-integrity-filter-card,
.tc-economy-filter-card,
.tc-reports-filter-panel,
.tc-settings-section,
.tc-join-recruitment-card,
.tc-member-summary-card,
.tc-members-history-card,
.tc-integrity-decision-section,
.tc-economy-reversal-policy,
.tc-reports-truth-note,
.tc-auth-card {
    background: linear-gradient(180deg, #11181D 0%, #0E151A 100%);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    box-shadow: 0 10px 34px #0000001F;
}

.tc-card,
.tc-dashboard-panel,
.tc-data-section,
.tc-settings-section,
.tc-auth-card {
    overflow: hidden;
}

.tc-stage-badge,
.tc-chip,
.tc-pill {
    border-color: var(--tc-border);
    background: #121A20;
    color: var(--tc-text-soft);
}

.tc-pill.is-green,
.tc-chip.is-green {
    border-color: #5CD66F55;
    color: #8BE99A;
}

.tc-pill.is-warning,
.tc-chip.is-warning {
    border-color: #FFA30055;
    color: #FFC052;
}

.tc-pill.is-danger,
.tc-chip.is-danger {
    border-color: #FF626255;
    color: #FF8B8B;
}

/* --- Global form/control theme ---------------------------------------- */

.tc-content label > span,
.tc-auth-card label > span,
.tc-form label > span {
    color: #8C9CA6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
}

.tc-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tc-content select,
.tc-content textarea,
.tc-auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tc-auth-card select,
.tc-auth-card textarea {
    min-height: var(--tc-control-height);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-control-radius);
    background: var(--tc-input);
    color: var(--tc-text);
    padding: 9px 12px;
    outline: none;
    box-shadow: none;
    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.tc-content select,
.tc-auth-card select {
    cursor: pointer;
}

.tc-content input::placeholder,
.tc-content textarea::placeholder,
.tc-auth-card input::placeholder,
.tc-auth-card textarea::placeholder {
    color: #667680;
    opacity: 1;
}

.tc-content input:focus,
.tc-content select:focus,
.tc-content textarea:focus,
.tc-auth-card input:focus,
.tc-auth-card select:focus,
.tc-auth-card textarea:focus {
    border-color: #FFA30088;
    background: #10191F;
    box-shadow: 0 0 0 3px #FFA30012;
}

.tc-content input[type="date"],
.tc-auth-card input[type="date"] {
    color-scheme: dark;
}

/* --- Buttons ----------------------------------------------------------- */

.tc-button,
button.tc-button {
    min-height: 40px;
    border-radius: 9px;
    border: 1px solid var(--tc-border);
    background: #151E24;
    color: var(--tc-text);
    font-weight: 750;
    cursor: pointer;
}

.tc-button:hover,
button.tc-button:hover {
    border-color: var(--tc-border-strong);
    background: #182229;
}

.tc-button.is-primary,
button.tc-button.is-primary {
    border-color: #FFA300;
    background: #FFA300;
    color: #0A0D0F;
    font-weight: 850;
}

.tc-button.is-primary:hover,
button.tc-button.is-primary:hover {
    border-color: #FFB529;
    background: #FFB529;
}

.tc-inline-action,
.tc-link-button {
    color: var(--tc-orange);
}

/* --- One filter contract for the entire project ----------------------- */

.tc-members-filter-form,
.tc-join-filter-form,
.tc-job-filter-form,
.tc-integrity-filter-form,
.tc-economy-filter-form,
.tc-reports-filter-form {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.7fr)
        repeat(4, minmax(145px, 1fr));
    gap: 10px;
    align-items: end;
}

.tc-members-filter-form > label,
.tc-join-filter-form > label,
.tc-job-filter-form > label,
.tc-integrity-filter-form > label,
.tc-economy-filter-form > label,
.tc-reports-filter-form > label {
    min-width: 0;
}

.tc-members-search,
.tc-job-search-field,
.tc-integrity-search-field,
.tc-economy-search-field,
.tc-reports-member-search,
.tc-join-filter-form > label:first-of-type {
    min-width: 0;
}

.tc-members-filter-form > .tc-button[type="submit"],
.tc-join-filter-form > .tc-button[type="submit"],
.tc-job-filter-form > .tc-button[type="submit"],
.tc-integrity-filter-form > .tc-button[type="submit"],
.tc-economy-filter-form > .tc-button[type="submit"],
.tc-reports-filter-form > .tc-button[type="submit"] {
    grid-column: 5;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    width: var(--tc-filter-button-width);
    min-width: var(--tc-filter-button-width);
    max-width: var(--tc-filter-button-width);
    height: var(--tc-filter-button-height);
    min-height: var(--tc-filter-button-height);
    margin: 0;
    padding: 0 18px;
    white-space: nowrap;
}

/* The filter wrapper itself has the same visual shell on every page. */
.tc-members-filter-card,
.tc-join-filter-card,
.tc-job-filter-card,
.tc-integrity-filter-card,
.tc-economy-filter-card,
.tc-reports-filter-panel,
.tc-filter-panel {
    padding: 13px 14px;
}

/* --- Dense-data table contract ---------------------------------------- */

.tc-data-table-wrap,
.tc-table-wrap,
.tc-detail-table-wrap,
.tc-job-table-wrap,
.tc-integrity-table-wrap,
.tc-job-audit-table-wrap,
.tc-settings-policy-table-wrap {
    border: 1px solid var(--tc-border-soft);
    border-radius: 11px;
    background: #0D1418;
    overflow-x: auto;
}

.tc-data-table,
.tc-table,
.tc-detail-table,
.tc-job-history-table,
.tc-integrity-table,
.tc-economy-ledger-table,
.tc-economy-pending-table,
.tc-economy-adjustment-table,
.tc-policy-history-table,
.tc-settings-policy-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--tc-text-soft);
    font-size: 14px;
    line-height: 1.35;
}

.tc-data-table thead,
.tc-table thead,
.tc-detail-table thead,
.tc-job-history-table thead,
.tc-integrity-table thead,
.tc-economy-ledger-table thead,
.tc-economy-pending-table thead,
.tc-economy-adjustment-table thead,
.tc-policy-history-table thead,
.tc-settings-policy-table thead {
    background: #121A20;
}

.tc-data-table th,
.tc-table th,
.tc-detail-table th,
.tc-job-history-table th,
.tc-integrity-table th,
.tc-economy-ledger-table th,
.tc-economy-pending-table th,
.tc-economy-adjustment-table th,
.tc-policy-history-table th,
.tc-settings-policy-table th {
    padding: 11px 12px;
    border-bottom: 1px solid var(--tc-border);
    color: #91A2AC;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tc-data-table td,
.tc-table td,
.tc-detail-table td,
.tc-job-history-table td,
.tc-integrity-table td,
.tc-economy-ledger-table td,
.tc-economy-pending-table td,
.tc-economy-adjustment-table td,
.tc-policy-history-table td,
.tc-settings-policy-table td {
    padding: 12px;
    border-bottom: 1px solid #222D34;
    vertical-align: middle;
}

.tc-data-table tbody tr:last-child td,
.tc-table tbody tr:last-child td,
.tc-detail-table tbody tr:last-child td,
.tc-job-history-table tbody tr:last-child td,
.tc-integrity-table tbody tr:last-child td,
.tc-economy-ledger-table tbody tr:last-child td,
.tc-economy-pending-table tbody tr:last-child td,
.tc-economy-adjustment-table tbody tr:last-child td,
.tc-policy-history-table tbody tr:last-child td,
.tc-settings-policy-table tbody tr:last-child td {
    border-bottom: 0;
}

.tc-data-table tbody tr:hover,
.tc-table tbody tr:hover,
.tc-job-history-table tbody tr:hover,
.tc-integrity-table tbody tr:hover,
.tc-economy-ledger-table tbody tr:hover,
.tc-economy-pending-table tbody tr:hover,
.tc-policy-history-table tbody tr:hover {
    background: #121A204F;
}

.tc-data-table strong,
.tc-table strong {
    color: #F1F4F5;
}

/* --- KPI / summary cards ---------------------------------------------- */

.tc-kpi,
.tc-metric-card {
    border: 1px solid var(--tc-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #11191E, #0E151A);
    box-shadow: 0 8px 28px #00000018;
}

.tc-kpi strong,
.tc-metric-card strong {
    color: #F3F5F6;
}

.tc-kpi small,
.tc-metric-card small {
    color: var(--tc-muted);
}

/* --- Centered detail modal contract ----------------------------------- */

.tc-job-detail-backdrop,
.tc-integrity-detail-backdrop,
.tc-economy-detail-backdrop,
.tc-policy-history-backdrop {
    background: #000000B8;
    backdrop-filter: blur(3px);
}

.tc-job-detail-dialog,
.tc-integrity-detail-dialog,
.tc-economy-detail-dialog,
.tc-policy-history-dialog {
    border: 1px solid var(--tc-border);
    border-radius: 15px;
    background: #0E151A;
    color: var(--tc-text);
    box-shadow: 0 26px 90px #00000088;
}

.tc-job-detail-content,
.tc-integrity-detail-content,
.tc-economy-detail-content,
.tc-policy-history-content {
    background: transparent;
}

/* --- Legacy/foundation screens ---------------------------------------- */

.tc-empty-state,
.tc-mini-list > div,
.tc-dashboard-row {
    border-color: var(--tc-border-soft);
}

.tc-mini-list > div {
    background: #0F171C;
}

.tc-auth-shell {
    color: var(--tc-text);
}

.tc-auth-card {
    border-color: var(--tc-border);
}

.tc-validation,
.validation-summary-errors,
.field-validation-error {
    color: #FF8A8A;
}

/* --- Scrollbars -------------------------------------------------------- */

.tc-nav,
.tc-data-table-wrap,
.tc-table-wrap,
.tc-detail-table-wrap,
.tc-job-table-wrap,
.tc-integrity-table-wrap {
    scrollbar-color: #4A555C #0C1216;
    scrollbar-width: thin;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 1280px) {
    .tc-members-filter-form,
    .tc-join-filter-form,
    .tc-job-filter-form,
    .tc-integrity-filter-form,
    .tc-economy-filter-form,
    .tc-reports-filter-form {
        grid-template-columns:
            repeat(3, minmax(155px, 1fr));
    }

    .tc-members-filter-form > .tc-button[type="submit"],
    .tc-join-filter-form > .tc-button[type="submit"],
    .tc-job-filter-form > .tc-button[type="submit"],
    .tc-integrity-filter-form > .tc-button[type="submit"],
    .tc-economy-filter-form > .tc-button[type="submit"],
    .tc-reports-filter-form > .tc-button[type="submit"] {
        grid-column: 3;
        grid-row: auto;
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .tc-content {
        padding: 18px 14px 48px;
    }

    .tc-members-filter-form,
    .tc-join-filter-form,
    .tc-job-filter-form,
    .tc-integrity-filter-form,
    .tc-economy-filter-form,
    .tc-reports-filter-form {
        grid-template-columns: 1fr;
    }

    .tc-members-filter-form > .tc-button[type="submit"],
    .tc-join-filter-form > .tc-button[type="submit"],
    .tc-job-filter-form > .tc-button[type="submit"],
    .tc-integrity-filter-form > .tc-button[type="submit"],
    .tc-economy-filter-form > .tc-button[type="submit"],
    .tc-reports-filter-form > .tc-button[type="submit"] {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
        width: var(--tc-filter-button-width);
        min-width: var(--tc-filter-button-width);
        max-width: var(--tc-filter-button-width);
    }

    .tc-data-table,
    .tc-table,
    .tc-detail-table {
        font-size: 13.5px;
    }
}


/* ========================================================================
   FIX16.12.3 - Reports filter alignment + members/join list padding
   Keeps Reports & Analytics on the same two-row filter contract as Jobs,
   and normalizes the dense-list card inner spacing.
   ======================================================================== */

/*
 * Reports labels must use the same "label above / control below" rhythm
 * already approved for the rest of the panel.
 */
.tc-reports-filter-form > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
    align-content: end;
}

.tc-reports-filter-form > label > span {
    display: block;
    justify-self: start;
    align-self: end;
    margin: 0;
    color: #8C9CA6;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .02em;
    text-align: left;
    white-space: nowrap;
}

.tc-reports-filter-form > label > input,
.tc-reports-filter-form > label > select {
    width: 100%;
    margin: 0;
}

/*
 * Desktop contract:
 * Row 1: Period | Start | End | Member Status | Member Search
 * Row 2: Member Sort | Page Size | ... | ... | Apply
 */
.tc-reports-filter-form {
    grid-template-columns:
        minmax(210px, 1.25fr)
        minmax(165px, .9fr)
        minmax(165px, .9fr)
        minmax(180px, 1fr)
        minmax(230px, 1.35fr);
    grid-auto-flow: row;
    gap: 10px;
    align-items: end;
}

.tc-reports-member-search {
    min-width: 0;
}

.tc-reports-filter-form > .tc-button[type="submit"] {
    grid-column: 5;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    width: var(--tc-filter-button-width);
    min-width: var(--tc-filter-button-width);
    max-width: var(--tc-filter-button-width);
    height: var(--tc-filter-button-height);
    min-height: var(--tc-filter-button-height);
    margin: 0;
}

/*
 * Members and Join Requests use the same dense-data card spacing.
 * The section title and table no longer sit too close to the outer border.
 */
.tc-members-page > .tc-data-section,
.tc-join-page > .tc-data-section {
    box-sizing: border-box;
    padding: 15px 14px 14px;
    gap: 12px;
}

.tc-members-page > .tc-data-section > .tc-data-section-head,
.tc-join-page > .tc-data-section > .tc-data-section-head {
    padding: 0 1px;
    margin: 0;
}

.tc-members-page > .tc-data-section > .tc-data-section-head h2,
.tc-join-page > .tc-data-section > .tc-data-section-head h2 {
    margin-top: 5px;
    margin-bottom: 3px;
}

.tc-members-page > .tc-data-section > .tc-data-section-head p,
.tc-join-page > .tc-data-section > .tc-data-section-head p {
    line-height: 1.45;
}

.tc-members-page > .tc-data-section > .tc-data-table-wrap,
.tc-join-page > .tc-data-section > .tc-data-table-wrap {
    margin: 0;
}

/* Preserve the same intent at intermediate widths without crushing fields. */
@media (max-width: 1280px) {
    .tc-reports-filter-form {
        grid-template-columns:
            repeat(3, minmax(170px, 1fr));
    }

    .tc-reports-filter-form > .tc-button[type="submit"] {
        grid-column: 3;
        grid-row: auto;
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .tc-reports-filter-form {
        grid-template-columns: 1fr;
    }

    .tc-reports-filter-form > .tc-button[type="submit"] {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
    }

    .tc-members-page > .tc-data-section,
    .tc-join-page > .tc-data-section {
        padding: 13px 10px 10px;
    }
}


/* ========================================================================
   16.13 - Telemetry Device Management UI V1
   ======================================================================== */

.tc-telemetry-claim-form {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.tc-telemetry-claim-form > label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.tc-telemetry-claim-form > label > span {
    justify-self: start;
    color: #8C9CA6;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.tc-telemetry-claim-form > .tc-button {
    width: 190px;
    min-width: 190px;
    height: var(--tc-filter-button-height);
    min-height: var(--tc-filter-button-height);
}

.tc-telemetry-claim-code {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px dashed var(--tc-orange-border);
    border-radius: 10px;
    background: var(--tc-orange-soft);
}

.tc-telemetry-claim-code code {
    overflow-wrap: anywhere;
    color: #FFD27A;
    font-size: 13px;
}

.tc-telemetry-warning {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #FFA30044;
    border-radius: 10px;
    background: #FFA3000D;
    color: var(--tc-text-soft);
    line-height: 1.5;
}

.tc-telemetry-history-table td:first-child code {
    font-size: 12px;
    color: #D4DADD;
}

@media (max-width: 760px) {
    .tc-telemetry-claim-form {
        grid-template-columns: 1fr;
    }

    .tc-telemetry-claim-form > .tc-button {
        justify-self: end;
        width: 190px;
        min-width: 190px;
    }
}

/* ========================================================================
   16.14 - Notifications & Activity Center V1
   ======================================================================== */

.tc-activity-filter-form {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.7fr)
        repeat(4, minmax(145px, 1fr));
    gap: 10px;
    align-items: end;
}

.tc-activity-filter-form > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
    align-content: end;
}

.tc-activity-filter-form > label > span {
    display: block;
    justify-self: start;
    margin: 0;
    color: #8C9CA6;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .02em;
    text-align: left;
    white-space: nowrap;
}

.tc-activity-search-field {
    min-width: 0;
}

.tc-activity-filter-form > .tc-button[type="submit"] {
    grid-column: 5;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    width: var(--tc-filter-button-width);
    min-width: var(--tc-filter-button-width);
    max-width: var(--tc-filter-button-width);
    height: var(--tc-filter-button-height);
    min-height: var(--tc-filter-button-height);
    margin: 0;
}

.tc-activity-table tbody tr.is-unread {
    background: linear-gradient(90deg, #FFA30012, transparent 55%);
}

.tc-activity-table tbody tr.is-unread:hover {
    background: linear-gradient(90deg, #FFA3001C, #121A204F 60%);
}

.tc-activity-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    background: #121A20;
    color: var(--tc-muted);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.tc-activity-state.is-unread {
    border-color: var(--tc-orange-border);
    background: var(--tc-orange-soft);
    color: #FFC052;
}

.tc-activity-copy {
    display: grid;
    gap: 4px;
    min-width: 280px;
}

.tc-activity-copy strong {
    color: #F2F5F6;
    font-size: 14px;
}

.tc-activity-copy span {
    color: var(--tc-muted);
    line-height: 1.45;
}

.tc-activity-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 120px;
}

.tc-activity-actions form {
    margin: 0;
}

.tc-activity-actions .tc-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.tc-pill.is-success {
    border-color: #5CD66F55;
    color: #8BE99A;
}

.tc-pill.is-info {
    border-color: #59BFF255;
    color: #8AD3F6;
}

@media (max-width: 1280px) {
    .tc-activity-filter-form {
        grid-template-columns:
            repeat(3, minmax(155px, 1fr));
    }

    .tc-activity-filter-form > .tc-button[type="submit"] {
        grid-column: 3;
        grid-row: auto;
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .tc-activity-filter-form {
        grid-template-columns: 1fr;
    }

    .tc-activity-filter-form > .tc-button[type="submit"] {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
    }

    .tc-activity-copy {
        min-width: 220px;
    }
}


/* ========================================================================
   16.15 - Unified Company Audit & Activity Timeline UI V1
   ======================================================================== */

.tc-audit-filter-form {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.6fr)
        minmax(160px, .9fr)
        minmax(175px, 1fr)
        minmax(190px, 1fr)
        minmax(190px, 1fr);
    gap: 10px;
    align-items: end;
}

.tc-audit-filter-form > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
    align-content: end;
}

.tc-audit-filter-form > label > span {
    display: block;
    justify-self: start;
    margin: 0;
    color: #8C9CA6;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.tc-audit-filter-form > label > input,
.tc-audit-filter-form > label > select {
    width: 100%;
    margin: 0;
}

.tc-audit-filter-form > .tc-button[type="submit"] {
    grid-column: 5;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    width: var(--tc-filter-button-width);
    min-width: var(--tc-filter-button-width);
    max-width: var(--tc-filter-button-width);
    height: var(--tc-filter-button-height);
    min-height: var(--tc-filter-button-height);
}

.tc-audit-table td:last-child {
    min-width: 280px;
}

.tc-audit-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 28px;
    background: #000000B8;
    backdrop-filter: blur(3px);
}

.tc-audit-detail-dialog {
    width: min(980px, 96vw);
    max-height: min(86vh, 880px);
    overflow: auto;
    border: 1px solid var(--tc-border);
    border-radius: 15px;
    background: #0E151A;
    color: var(--tc-text);
    box-shadow: 0 26px 90px #00000088;
    padding: 18px;
}

.tc-audit-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tc-audit-detail-head h2 {
    margin: 4px 0 0;
}

.tc-audit-modal-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--tc-border);
    border-radius: 9px;
    background: #141D23;
    color: var(--tc-text);
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
}

.tc-audit-modal-close:hover {
    border-color: var(--tc-border-strong);
    background: #182229;
}

@media (max-width: 1280px) {
    .tc-audit-filter-form {
        grid-template-columns:
            repeat(3, minmax(165px, 1fr));
    }

    .tc-audit-filter-form > .tc-button[type="submit"] {
        grid-column: 3;
        grid-row: auto;
    }
}

@media (max-width: 760px) {
    .tc-audit-filter-form {
        grid-template-columns: 1fr;
    }

    .tc-audit-filter-form > .tc-button[type="submit"] {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
    }

    .tc-audit-modal-backdrop {
        padding: 10px;
    }

    .tc-audit-detail-dialog {
        width: 100%;
        max-height: 92vh;
        padding: 14px;
    }
}


/* ========================================================================
   16.16 - Advanced Audit Search & Export UI V1
   ======================================================================== */

.tc-audit-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tc-audit-preset-group,
.tc-audit-export-actions,
.tc-audit-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tc-audit-preset-group > span {
    color: #8C9CA6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tc-audit-preset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--tc-border);
    border-radius: 8px;
    background: #10181D;
    color: var(--tc-text-soft);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.tc-audit-preset:hover {
    border-color: var(--tc-orange-border);
    color: #FFD27A;
    background: #FFA3000D;
}

.tc-audit-active-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--tc-orange-border);
    border-radius: 8px;
    background: var(--tc-orange-soft);
    color: var(--tc-text-soft);
    font-size: 12px;
}

.tc-audit-active-filter a {
    color: #FFD27A;
    font-weight: 800;
    text-decoration: none;
}

.tc-audit-panel-head {
    align-items: flex-start;
}

.tc-audit-export-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.tc-audit-export-actions .tc-button {
    width: 92px;
    min-width: 92px;
}

.tc-audit-source-link {
    color: #90D7FA;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.tc-audit-source-link:hover {
    color: #C5ECFF;
    text-decoration: underline;
}

.tc-audit-detail-actions {
    justify-content: flex-end;
    margin-top: 14px;
}

.tc-audit-detail-actions .tc-button {
    width: auto;
    min-width: 120px;
}

@media (max-width: 760px) {
    .tc-audit-toolbar,
    .tc-audit-panel-head {
        align-items: stretch;
    }

    .tc-audit-export-actions {
        justify-content: flex-end;
        width: 100%;
    }

    .tc-audit-preset-group {
        width: 100%;
    }
}


/* ========================================================================
   16.17 - Account Security & Session Management UI V1
   ======================================================================== */

.tc-security-panel-head {
    align-items: flex-start;
}

.tc-security-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.tc-security-header-actions form {
    margin: 0;
}

.tc-security-header-actions .tc-button {
    width: auto;
    min-width: 148px;
}

.tc-security-danger {
    border-color: #C54B4B77;
    background: #A92F2F14;
    color: #FFB4B4;
}

.tc-security-danger:hover {
    border-color: #E26868AA;
    background: #B83B3B24;
    color: #FFD2D2;
}

.tc-security-session-table tr.is-current-session td {
    background: #FFA30008;
}

.tc-security-session-table code {
    color: #D4DADD;
    font-size: 12px;
}

.tc-security-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.tc-security-status.is-active {
    border-color: #53C27A55;
    background: #53C27A10;
    color: #8BE0A8;
}

.tc-security-status.is-inactive {
    color: #9CAAB2;
}

.tc-security-inline-button {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.tc-security-password-form {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(220px, 1fr))
        auto;
    gap: 10px;
    align-items: end;
}

.tc-security-password-form > label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.tc-security-password-form > label > span {
    justify-self: start;
    color: #8C9CA6;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.tc-security-password-form > label > input {
    width: 100%;
    margin: 0;
}

.tc-security-password-form > .tc-button {
    width: 168px;
    min-width: 168px;
    height: var(--tc-filter-button-height);
    min-height: var(--tc-filter-button-height);
}

@media (max-width: 1100px) {
    .tc-security-password-form {
        grid-template-columns:
            repeat(2, minmax(220px, 1fr));
    }

    .tc-security-password-form > .tc-button {
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .tc-security-header-actions {
        justify-content: flex-end;
        width: 100%;
    }

    .tc-security-password-form {
        grid-template-columns: 1fr;
    }

    .tc-security-password-form > .tc-button {
        justify-self: end;
    }
}


/* ========================================================================
   16.18 - Web Panel UX & Responsive Hardening V1
   Global responsive contract. No business markup is rewritten here.
   ======================================================================== */

/* --- Layout containment ------------------------------------------------ */

.tc-main,
.tc-content,
.tc-page-head,
.tc-page-hero,
.tc-dashboard-hero,
.tc-reports-hero,
.tc-dashboard-panel,
.tc-data-section,
.tc-card,
.tc-filter-panel,
.tc-settings-section {
    min-width: 0;
    max-width: 100%;
}

.tc-content {
    width: 100%;
    margin-inline: auto;
}

.tc-dashboard-panel-head,
.tc-section-head,
.tc-page-head,
.tc-page-hero,
.tc-dashboard-hero,
.tc-reports-hero {
    min-width: 0;
}

.tc-dashboard-panel-head > *,
.tc-section-head > *,
.tc-page-head > *,
.tc-page-hero > *,
.tc-dashboard-hero > *,
.tc-reports-hero > * {
    min-width: 0;
}

.tc-page-head h1,
.tc-page-hero h1,
.tc-dashboard-hero h1,
.tc-reports-hero h1,
.tc-members-page-head h1,
.tc-join-page-head h1,
.tc-dashboard-panel-head h2,
.tc-section-head h2 {
    overflow-wrap: anywhere;
}

/* --- Tables: never force the whole page wider ------------------------- */

.tc-data-table-wrap,
.tc-table-wrap,
.tc-detail-table-wrap,
.tc-job-table-wrap,
.tc-integrity-table-wrap,
.tc-job-audit-table-wrap,
.tc-settings-policy-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.tc-data-table,
.tc-table,
.tc-detail-table,
.tc-job-history-table,
.tc-integrity-table,
.tc-economy-ledger-table,
.tc-economy-pending-table,
.tc-economy-adjustment-table,
.tc-policy-history-table,
.tc-settings-policy-table {
    max-width: none;
}

.tc-data-table td,
.tc-table td,
.tc-detail-table td,
.tc-job-history-table td,
.tc-integrity-table td,
.tc-economy-ledger-table td,
.tc-economy-pending-table td,
.tc-economy-adjustment-table td,
.tc-policy-history-table td,
.tc-settings-policy-table td {
    vertical-align: middle;
}

.tc-data-table td code,
.tc-table td code,
.tc-detail-table td code,
.tc-job-history-table td code,
.tc-integrity-table td code,
.tc-economy-ledger-table td code,
.tc-economy-pending-table td code,
.tc-economy-adjustment-table td code,
.tc-policy-history-table td code,
.tc-settings-policy-table td code,
.tc-data-table td a,
.tc-table td a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tc-data-table td:last-child,
.tc-table td:last-child {
    max-width: 560px;
}

/* --- Shared filter hardening ------------------------------------------ */

.tc-members-filter-form,
.tc-join-filter-form,
.tc-job-filter-form,
.tc-integrity-filter-form,
.tc-economy-filter-form,
.tc-reports-filter-form,
.tc-activity-filter-form,
.tc-audit-filter-form,
.tc-security-password-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tc-members-filter-form > *,
.tc-join-filter-form > *,
.tc-job-filter-form > *,
.tc-integrity-filter-form > *,
.tc-economy-filter-form > *,
.tc-reports-filter-form > *,
.tc-activity-filter-form > *,
.tc-audit-filter-form > *,
.tc-security-password-form > * {
    min-width: 0;
}

.tc-members-filter-form input,
.tc-members-filter-form select,
.tc-join-filter-form input,
.tc-join-filter-form select,
.tc-job-filter-form input,
.tc-job-filter-form select,
.tc-integrity-filter-form input,
.tc-integrity-filter-form select,
.tc-economy-filter-form input,
.tc-economy-filter-form select,
.tc-reports-filter-form input,
.tc-reports-filter-form select,
.tc-activity-filter-form input,
.tc-activity-filter-form select,
.tc-audit-filter-form input,
.tc-audit-filter-form select,
.tc-security-password-form input {
    max-width: 100%;
}

.tc-members-filter-form > .tc-button[type="submit"],
.tc-join-filter-form > .tc-button[type="submit"],
.tc-job-filter-form > .tc-button[type="submit"],
.tc-integrity-filter-form > .tc-button[type="submit"],
.tc-economy-filter-form > .tc-button[type="submit"],
.tc-reports-filter-form > .tc-button[type="submit"],
.tc-activity-filter-form > .tc-button[type="submit"],
.tc-audit-filter-form > .tc-button[type="submit"] {
    flex: 0 0 auto;
}

/* --- Headers/actions/pagination --------------------------------------- */

.tc-dashboard-panel-head,
.tc-section-head,
.tc-security-header-actions,
.tc-audit-toolbar,
.tc-audit-preset-group,
.tc-audit-export-actions,
.tc-audit-detail-actions,
.tc-activity-actions,
.tc-pagination {
    max-width: 100%;
}

.tc-dashboard-panel-head,
.tc-section-head {
    gap: 14px;
}

.tc-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.tc-pagination .tc-button,
.tc-security-header-actions .tc-button,
.tc-audit-export-actions .tc-button {
    flex: 0 0 auto;
}

/* --- Modal/dialog hardening ------------------------------------------- */

.tc-job-detail-dialog,
.tc-integrity-detail-dialog,
.tc-economy-detail-dialog,
.tc-policy-history-dialog,
.tc-audit-detail-dialog {
    width: min(1080px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    max-height: calc(100dvh - 40px);
    margin: 0;
    overscroll-behavior: contain;
}

.tc-job-detail-dialog *,
.tc-integrity-detail-dialog *,
.tc-economy-detail-dialog *,
.tc-policy-history-dialog *,
.tc-audit-detail-dialog * {
    min-width: 0;
}

.tc-job-detail-dialog code,
.tc-integrity-detail-dialog code,
.tc-economy-detail-dialog code,
.tc-policy-history-dialog code,
.tc-audit-detail-dialog code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tc-audit-modal-backdrop {
    overflow: auto;
}

/* --- Empty/error/help text -------------------------------------------- */

.tc-alert,
.tc-muted,
.tc-dashboard-panel-head p,
.tc-page-head p,
.tc-page-hero p,
.tc-reports-hero p {
    overflow-wrap: anywhere;
}

/* --- Medium desktop / small laptop ------------------------------------ */

@media (max-width: 1280px) {
    .tc-content {
        padding-inline: 20px;
    }

    .tc-members-filter-form,
    .tc-join-filter-form,
    .tc-job-filter-form,
    .tc-integrity-filter-form,
    .tc-economy-filter-form,
    .tc-reports-filter-form,
    .tc-activity-filter-form,
    .tc-audit-filter-form {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .tc-members-filter-form > .tc-button[type="submit"],
    .tc-join-filter-form > .tc-button[type="submit"],
    .tc-job-filter-form > .tc-button[type="submit"],
    .tc-integrity-filter-form > .tc-button[type="submit"],
    .tc-economy-filter-form > .tc-button[type="submit"],
    .tc-reports-filter-form > .tc-button[type="submit"],
    .tc-activity-filter-form > .tc-button[type="submit"],
    .tc-audit-filter-form > .tc-button[type="submit"] {
        grid-column: 3;
        grid-row: auto;
        justify-self: end;
    }
}

/* --- Tablet ------------------------------------------------------------ */

@media (max-width: 900px) {
    .tc-content {
        padding: 18px 16px 48px;
    }

    .tc-dashboard-panel-head,
    .tc-section-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .tc-members-filter-form,
    .tc-join-filter-form,
    .tc-job-filter-form,
    .tc-integrity-filter-form,
    .tc-economy-filter-form,
    .tc-reports-filter-form,
    .tc-activity-filter-form,
    .tc-audit-filter-form,
    .tc-security-password-form {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .tc-members-filter-form > .tc-button[type="submit"],
    .tc-join-filter-form > .tc-button[type="submit"],
    .tc-job-filter-form > .tc-button[type="submit"],
    .tc-integrity-filter-form > .tc-button[type="submit"],
    .tc-economy-filter-form > .tc-button[type="submit"],
    .tc-reports-filter-form > .tc-button[type="submit"],
    .tc-activity-filter-form > .tc-button[type="submit"],
    .tc-audit-filter-form > .tc-button[type="submit"],
    .tc-security-password-form > .tc-button {
        grid-column: 2;
        grid-row: auto;
        justify-self: end;
    }

    .tc-job-detail-dialog,
    .tc-integrity-detail-dialog,
    .tc-economy-detail-dialog,
    .tc-policy-history-dialog,
    .tc-audit-detail-dialog {
        width: min(100%, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }
}

/* --- Phone / narrow window -------------------------------------------- */

@media (max-width: 760px) {
    .tc-content {
        padding: 14px 12px 40px;
    }

    .tc-card,
    .tc-dashboard-panel,
    .tc-data-section,
    .tc-filter-panel,
    .tc-members-filter-card,
    .tc-join-filter-card,
    .tc-job-filter-card,
    .tc-integrity-filter-card,
    .tc-economy-filter-card,
    .tc-reports-filter-panel,
    .tc-settings-section {
        border-radius: 10px;
    }

    .tc-members-filter-form,
    .tc-join-filter-form,
    .tc-job-filter-form,
    .tc-integrity-filter-form,
    .tc-economy-filter-form,
    .tc-reports-filter-form,
    .tc-activity-filter-form,
    .tc-audit-filter-form,
    .tc-security-password-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .tc-members-filter-form > .tc-button[type="submit"],
    .tc-join-filter-form > .tc-button[type="submit"],
    .tc-job-filter-form > .tc-button[type="submit"],
    .tc-integrity-filter-form > .tc-button[type="submit"],
    .tc-economy-filter-form > .tc-button[type="submit"],
    .tc-reports-filter-form > .tc-button[type="submit"],
    .tc-activity-filter-form > .tc-button[type="submit"],
    .tc-audit-filter-form > .tc-button[type="submit"],
    .tc-security-password-form > .tc-button {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
    }

    .tc-security-header-actions,
    .tc-audit-export-actions,
    .tc-audit-detail-actions,
    .tc-activity-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .tc-pagination {
        justify-content: center;
    }

    .tc-data-table th,
    .tc-table th,
    .tc-detail-table th,
    .tc-job-history-table th,
    .tc-integrity-table th,
    .tc-economy-ledger-table th,
    .tc-economy-pending-table th,
    .tc-economy-adjustment-table th,
    .tc-policy-history-table th,
    .tc-settings-policy-table th {
        padding-inline: 10px;
    }

    .tc-data-table td,
    .tc-table td,
    .tc-detail-table td,
    .tc-job-history-table td,
    .tc-integrity-table td,
    .tc-economy-ledger-table td,
    .tc-economy-pending-table td,
    .tc-economy-adjustment-table td,
    .tc-policy-history-table td,
    .tc-settings-policy-table td {
        padding-inline: 10px;
    }

    .tc-job-detail-dialog,
    .tc-integrity-detail-dialog,
    .tc-economy-detail-dialog,
    .tc-policy-history-dialog,
    .tc-audit-detail-dialog {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 10px;
    }

    .tc-audit-modal-backdrop {
        padding: 6px;
    }
}

/* --- Very narrow phone / split-screen --------------------------------- */

@media (max-width: 520px) {
    .tc-content {
        padding-inline: 8px;
    }

    .tc-dashboard-panel,
    .tc-data-section,
    .tc-filter-panel,
    .tc-settings-section {
        border-radius: 8px;
    }

    .tc-security-header-actions,
    .tc-audit-preset-group,
    .tc-audit-export-actions,
    .tc-audit-detail-actions {
        gap: 6px;
    }

    .tc-security-header-actions .tc-button,
    .tc-audit-export-actions .tc-button,
    .tc-audit-detail-actions .tc-button {
        min-width: 0;
        width: auto;
        max-width: 100%;
    }

    .tc-pagination {
        gap: 6px;
    }
}

/* --- Accessibility ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .tc-content *,
    .tc-sidebar *,
    .tc-topbar * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ========================================================================
   FIX16.18.1 - Unified Search / Table Filter Contract
   All searchable table surfaces share the same visual language.
   ======================================================================== */

.tc-table-filter-form {
    --tc-table-filter-gap: 10px;
    --tc-table-filter-control-height: 44px;
    --tc-table-filter-button-width: 140px;

    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: var(--tc-table-filter-gap);
    align-items: end;
    padding: 14px;
    margin: 0 0 16px;
    border: 1px solid var(--tc-border);
    border-radius: 14px;
    background: #0E151A;
}

.tc-table-filter-form > label {
    display: grid;
    min-width: 0;
    gap: 5px;
    margin: 0;
}

.tc-table-filter-form > label > span {
    justify-self: start;
    margin: 0;
    color: #89A8BA;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
}

.tc-table-filter-form input[type="search"],
.tc-table-filter-form input[type="text"],
.tc-table-filter-form input[type="date"],
.tc-table-filter-form select {
    width: 100%;
    min-width: 0;
    height: var(--tc-table-filter-control-height);
    min-height: var(--tc-table-filter-control-height);
    margin: 0;
    padding-block: 0;
    border-radius: 9px;
}

.tc-table-filter-form input[type="search"]::placeholder,
.tc-table-filter-form input[type="text"]::placeholder {
    color: #6F8797;
}

.tc-table-filter-form > .tc-button[type="submit"] {
    width: var(--tc-table-filter-button-width);
    min-width: var(--tc-table-filter-button-width);
    max-width: var(--tc-table-filter-button-width);
    height: var(--tc-table-filter-control-height);
    min-height: var(--tc-table-filter-control-height);
    margin: 0;
    justify-self: end;
    align-self: end;
    padding-inline: 16px;
    border-radius: 9px;
}

/*
 * Compact surfaces:
 * Search + up to three criteria + Uygula fit on one line.
 * Members and Join Requests use this contract.
 */
.tc-table-filter-form[data-table-filter-layout="single-row"] {
    grid-template-columns:
        minmax(280px, 1.8fr)
        minmax(180px, 1.15fr)
        minmax(150px, .85fr)
        minmax(190px, 1.05fr)
        var(--tc-table-filter-button-width);
}

.tc-table-filter-form[data-table-filter-layout="single-row"] > .tc-button[type="submit"] {
    grid-column: 5;
    grid-row: 1;
}

/*
 * Dense surfaces:
 * Five criteria on row one.
 * Remaining criteria on row two.
 * Uygula is always the last control at the lower-right.
 */
.tc-table-filter-form[data-table-filter-layout="two-row"] {
    grid-template-columns:
        minmax(260px, 1.65fr)
        repeat(3, minmax(165px, 1fr))
        minmax(150px, .9fr);
}

.tc-table-filter-form[data-table-filter-layout="two-row"] > .tc-button[type="submit"] {
    grid-column: 5;
    grid-row: 2;
}

/*
 * Existing page-specific "search field" classes keep their semantic names,
 * but the shared contract owns their visual width.
 */
.tc-table-filter-form .tc-members-search,
.tc-table-filter-form .tc-job-search-field,
.tc-table-filter-form .tc-integrity-search-field,
.tc-table-filter-form .tc-economy-search-field,
.tc-table-filter-form .tc-reports-member-search,
.tc-table-filter-form .tc-activity-search-field,
.tc-table-filter-form .tc-audit-search-field {
    min-width: 0;
}

/* Small laptop: preserve the same card, but let fields reflow cleanly. */
@media (max-width: 1280px) {
    .tc-table-filter-form[data-table-filter-layout="single-row"],
    .tc-table-filter-form[data-table-filter-layout="two-row"] {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .tc-table-filter-form[data-table-filter-layout="single-row"] > .tc-button[type="submit"],
    .tc-table-filter-form[data-table-filter-layout="two-row"] > .tc-button[type="submit"] {
        grid-column: 3;
        grid-row: auto;
        justify-self: end;
    }
}

/* Tablet: two columns, Uygula remains lower-right. */
@media (max-width: 900px) {
    .tc-table-filter-form[data-table-filter-layout="single-row"],
    .tc-table-filter-form[data-table-filter-layout="two-row"] {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .tc-table-filter-form[data-table-filter-layout="single-row"] > .tc-button[type="submit"],
    .tc-table-filter-form[data-table-filter-layout="two-row"] > .tc-button[type="submit"] {
        grid-column: 2;
        grid-row: auto;
    }
}

/* Phone / narrow split-screen: one column, button stays right aligned. */
@media (max-width: 760px) {
    .tc-table-filter-form {
        padding: 12px;
        border-radius: 10px;
    }

    .tc-table-filter-form[data-table-filter-layout="single-row"],
    .tc-table-filter-form[data-table-filter-layout="two-row"] {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .tc-table-filter-form[data-table-filter-layout="single-row"] > .tc-button[type="submit"],
    .tc-table-filter-form[data-table-filter-layout="two-row"] > .tc-button[type="submit"] {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
    }
}


/* ========================================================================
   FIX16.18.2 - Dense Table Structure Protection
   Filter standardization must never collapse established high-data tables.
   ======================================================================== */

/*
 * These minimums mirror the established table-first/dense-data contract.
 * The surrounding table wrapper owns horizontal scrolling when required.
 */
.tc-job-history-table.is-compact {
    min-width: 1050px;
}

.tc-integrity-table {
    min-width: 980px;
}

.tc-economy-ledger-table {
    min-width: 980px;
}

.tc-economy-pending-table {
    min-width: 1060px;
}

.tc-economy-adjustment-table {
    min-width: 1080px;
}

.tc-reports-quality-table {
    min-width: 760px;
}

.tc-reports-trend-table {
    min-width: 980px;
}

.tc-reports-members-table {
    min-width: 1540px;
}

.tc-activity-table {
    min-width: 980px;
}

.tc-audit-table.is-compact {
    min-width: 1050px;
}

/*
 * Preserve readable route / primary identity columns instead of allowing
 * the browser to squeeze every column merely to fit the viewport.
 */
.tc-job-route-cell,
.tc-table-primary {
    min-width: 170px;
}

/*
 * The page itself stays contained; only the table wrapper scrolls.
 */
.tc-data-table-wrap,
.tc-table-wrap,
.tc-job-table-wrap,
.tc-integrity-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}


/* ========================================================================
   FIX16.18.3 - Remove Nested Filter Cards
   If an existing page-level filter card already owns the border/background,
   the shared form contributes layout only.
   ======================================================================== */

.tc-members-filter-card > .tc-table-filter-form,
.tc-join-filter-card > .tc-table-filter-form,
.tc-job-filter-card > .tc-table-filter-form,
.tc-integrity-filter-card > .tc-table-filter-form,
.tc-economy-filter-card > .tc-table-filter-form,
.tc-reports-filter-panel > .tc-table-filter-form,
.tc-filter-panel > .tc-table-filter-form {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/*
 * Standalone filter forms (for example Activity and Audit) still keep the
 * shared tc-table-filter-form card styling because they do not have an outer
 * filter-card container.
 */


/* ========================================================================
   FIX16.18.4 - Account Sessions Unified Filter + Ready Navigation
   ======================================================================== */

.tc-account-session-filter-form {
    margin-bottom: 16px;
}

/*
 * Account Sessions filter is standalone between dashboard panels, so it keeps
 * the shared single-row card appearance. Do not de-nest this form.
 */
