/* ---------- Theme tokens ---------- */
:root {
    --color-bg: #101010;
    --color-surface: #1c1c1c;
    --color-accent: #08b4ff;          /* cyan accent */
    --color-accent-light: #5ad9ff;
    --color-white: #ffffff;
    --color-text: #d1d5db;            /* gray-300 */
}

/* ---------- Global reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ====================================================================== */
/*                                NAVBAR                                  */
/* ====================================================================== */

.navbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-surface); /* replaces old #273340 */
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Brand (far left) ----------------------------------------------------- */
.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    min-width: 0;
}

.brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.25rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid rgba(90, 217, 255, 0.7);
    border-radius: 0.35rem;
    color: var(--color-accent-light);
    letter-spacing: 0;
}

.brand-name {
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255, 255, 255, 0.86);
}

/* Center links --------------------------------------------------------- */
.nav-links {
    flex: 1;                    /* pushes actions to the right */
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-link {
    position: relative;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-text);
    padding: 0.5rem 0;
    transition: color .2s;
}

/* animated underline on hover */
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: var(--color-accent);
    transition: width 0.25s;
}
.nav-link:hover,
.nav-link:focus { color: var(--color-accent); }
.nav-link:hover::after,
.nav-link:focus::after { width: 100%; }

/* Right-hand actions --------------------------------------------------- */
.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: inherit;
}
.dropdown-menu {
    position: absolute;
    right: 0; top: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-bg);
    border-radius: 0.5rem;
    display: none;               /* shown on hover / JS toggle */
    flex-direction: column;
    min-width: 160px;
    z-index: 1000;
}
.dropdown-item {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    white-space: nowrap;
}
.dropdown-item:hover { background: var(--color-bg); }

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
    display: flex;
}

a.btn-primary {
    text-decoration: none;
}

/* Buttons -------------------------------------------------------------- */
.btn-primary {
    padding: 0.5rem 1.1rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease-in-out;
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-accent-light);
    outline: none;
}

/* ====================================================================== */
/*                         MAIN CONTENT / HERO / ETC.                     */
/* ====================================================================== */

main { flex: 1; display: flex; flex-direction: column; gap: 4rem; }

/* Hero */
.hero {
    background: linear-gradient(180deg, rgba(8,180,255,0.15) 0%, rgba(8,180,255,0.05) 100%),
    var(--color-bg);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
}
.hero h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.hero p {
    max-width: 45rem;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* ====================================================================== */
/*                             REVIEW PAGE                                */
/* ====================================================================== */

.page {
    width: min(1400px, 96vw);
    margin: 0 auto;
    padding: 0;
}

.review-page {
    width: 100%;
}

.page-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 18px 40px;
}

/* =========================
   Review page table layout
   ========================= */

/* Review page only: give the dense table real horizontal room */
.page.review-page {
    width: min(1400px, 100%);
    max-width: 100%;
}

.review-page .page-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding-left: clamp(10px, 2vw, 18px);
    padding-right: clamp(10px, 2vw, 18px);
}

/* Prefer horizontal scrolling over vertical word stacking for the review table */
.review-page .table-wrapper,
.review-page .table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.review-page .invoice-table {
    table-layout: auto;   /* override fixed layout to reduce forced wrapping */
    width: max-content;
    min-width: 1180px;
    max-width: none;
}

/* Keep cells single-line + ellipsis by default (prevents "stacking") */
.review-page .invoice-table th,
.review-page .invoice-table td {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sticky table header for long lists */
.review-page .invoice-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Column sizing hints (works best with table-layout:auto) */
.review-page .actions-column { width: 240px; }

.review-page .col-week     { min-width: 140px; }
.review-page .col-status   { min-width: 120px; }
.review-page .col-actions  { min-width: 240px; }
.review-page .col-foreman  { min-width: 180px; }
.review-page .col-vendor   { min-width: 150px; }
.review-page .col-id       { min-width: 90px;  }
.review-page .col-last     { min-width: 160px; }
.review-page .col-days     { min-width: 140px; }
.review-page .col-job      { min-width: 240px; }
.review-page .col-contract { min-width: 320px; }

/* Contract cell: allow two-line structure, but keep each line readable */
.review-page .col-contract {
    white-space: normal;
    overflow: visible;
}

.review-page .contract-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.review-page .contract-dates {
    white-space: nowrap;
}

/* Actions: keep buttons on one line on desktop to avoid tall rows */
@media (min-width: 901px) {
    .review-page .table-actions {
        flex-wrap: wrap;
    }
    .review-page .action-group {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .review-page .actions-cell {
        overflow: visible;
    }
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.page-header h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-white);
    margin-bottom: 0.35rem;
}

.page-subtitle {
    color: var(--color-text);
    max-width: 32rem;
}


.invoice-detail-page .invoice-id-subtitle {
    margin: 0.05rem 0 0.75rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--color-accent-light);
    margin-bottom: 0.25rem;
}

.panel {
    border-radius: 12px;
    padding: 14px;
    margin-top: 14px;
    min-width: 0;
    max-width: 100%;
}

.filter-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.panel-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 6px 10px;
}

.panel-summary::-webkit-details-marker {
    display: none;
}

.panel-summary-left {
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.panel-subtitle {
    font-size: 13px;
    opacity: 0.75;
    margin: 4px 0 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.table-panel {
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
    max-width: 100%;
}

.table-wrap {
    margin-top: 10px;
    overflow-x: auto;
    max-width: 100%;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
    table-layout: fixed;
}

.invoice-table thead {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(209, 213, 219, 0.7);
}

.invoice-table th,
.invoice-table td {
    text-align: left;
    padding: 0.75rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-wrap: anywhere;
}

.invoice-table th {
    font-size: 12px;
    letter-spacing: 0.02em;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.03);
}

.filters-grid {
    display: grid;
    gap: 10px 12px;
    grid-template-columns: repeat(12, 1fr);
    align-items: end;
}

.filters-grid .form-field {
    grid-column: span 3;
    min-width: 180px;
    max-width: 100%;
}

.filters-grid .form-field.field-search {
    grid-column: span 4;
}

.filters-grid .form-field.field-job,
.filters-grid .form-field.field-contract {
    grid-column: span 3;
}

.filters-grid .form-field label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.filters-grid .form-field input,
.filters-grid .form-field select {
    width: 100%;
    height: 38px;
}

.filters-actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.filters-actions-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters-actions-right {
    display: flex;
    align-items: center;
}

.search-select {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
}

.search-select-input {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
    color: var(--color-white);
}

.invoice-table tbody tr:hover {
    background: rgba(8, 180, 255, 0.08);
}


.invoice-table .vendor-invoice-cell strong {
    color: inherit;
}

.actions-column {
    width: 220px;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


.actions-cell {
    white-space: nowrap;
}

.action-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.table-actions form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.table-actions .btn:hover {
    transform: translateY(-1px);
}


.bulk-bar {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bulk-bar-right {
    display: flex;
    align-items: center;
}

.btn-secondary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-small {
    padding: 0.34rem 0.72rem;
    font-size: 0.82rem;
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--color-white);
}
.btn[disabled],
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    background: rgba(8, 180, 255, 0.15);
    color: var(--color-accent-light);
}

.status-badge.status-draft {
    background: rgba(148, 163, 184, 0.2);
    color: rgba(226, 232, 240, 0.95);
}

.status-badge.status-submitted {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}


.status-badge.status-foremanapproved {
    background: rgba(14, 165, 233, 0.2);
    color: #bae6fd;
}

.status-badge.status-approved {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.status-badge.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.status-badge.status-paid {
    background: rgba(168, 85, 247, 0.2);
    color: #e9d5ff;
}

.table-rejection-input {
    min-width: 180px;
    padding: 0.35rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    color: var(--color-white);
}

.form-textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    color: var(--color-white);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(8, 180, 255, 0.15);
    color: var(--color-accent-light);
    text-transform: capitalize;
}

.empty-state {
    text-align: center;
}

.empty-state p {
    padding: 1.5rem 0;
    color: rgba(209, 213, 219, 0.8);
}

@media (max-width: 1200px) {
    .filters-grid .form-field {
        grid-column: span 4;
    }

    .filters-grid .form-field.field-search {
        grid-column: span 12;
    }
}
@media (max-width: 900px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions-column {
        width: auto;
    }

    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .filters-grid .form-field {
        grid-column: span 12;
    }

    .bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-group {
        justify-content: flex-start;
    }
}

/* ====================================================================== */
/*                          INVOICE EDIT WORKFLOW                         */
/* ====================================================================== */

.invoice-edit-page {
    gap: 2rem;
    padding: 2rem clamp(1rem, 3vw, 3rem) 4rem;
}

.invoice-edit-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background: var(--color-surface);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.75rem;
    color: var(--color-white);
}

.card header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}
.status-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.status-history-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.45);
}

.status-history-date {
    font-weight: 600;
    color: rgba(248, 250, 252, 0.9);
}

.status-history-status {
    color: var(--color-accent-light);
    font-weight: 600;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.form-field.full-width {
    grid-column: 1 / -1;
}

.invoice-create-form .week-ending-field input[type="date"] {
    font-size: 1.05rem;
    padding: 0.85rem 0.9rem;
    border-color: rgba(8, 180, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(8, 180, 255, 0.12);
}

.invoice-create-form .week-ending-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.85;
    cursor: pointer;
}

.invoice-create-form .vendor-invoice-field input {
    font-size: 1.05rem;
    padding: 0.85rem 0.9rem;
    border-color: rgba(8, 180, 255, 0.45);
}

.invoice-create-form .required {
    color: rgba(90, 217, 255, 0.95);
    margin-left: 0.15rem;
}
.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
    color: var(--color-white);
}

.form-field textarea {
    resize: vertical;
}
.notes-field {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notes-field label {
    text-align: center;
}


.update-contract-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #f8fafc;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.3);
}

.update-contract-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(148, 163, 184, 0.5);
    color: #e2e8f0;
}



.notes-field textarea {
    min-height: 140px;
    width: 100%;
    max-width: 900px;
}

.line-items-card .table-wrapper {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    overflow-x: auto;
    max-width: 100%;
}

.table-responsive {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.line-items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.line-items-table thead {
    background: rgba(255, 255, 255, 0.05);
}

.line-items-table th,
.line-items-table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.line-items-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.45);
}

.line-items-table select,
.line-items-table input[type="number"],
.line-items-table input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
    color: var(--color-white);
}

.line-items-table input[readonly] {
    background: rgba(148, 163, 184, 0.12);
    color: rgba(226, 232, 240, 0.9);
}

.description-cell p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    font-size: 0.85rem;
}

.checkbox-pill input {
    width: auto;
    accent-color: var(--color-accent);
}

.helper-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.attachments-card input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 0.1px;
    height: 0.1px;
}

.attachment-upload {
    position: relative;
}

.attachment-upload label {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
}

.action-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.action-bar .left-group,
.action-bar .right-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.alert {
    padding: 0.85rem 1.2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: flex;
    gap: 0.5rem;
}

.alert.success {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.alert.error {
    background: rgba(248, 113, 113, 0.16);
    color: #fecdd3;
}

.alert.info {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

.field-error {
    color: #fca5a5;
    font-size: 0.9rem;
    margin: 0.15rem 0 0.5rem;
    display: block;
}

.contact-form input:invalid,
.contact-form textarea:invalid {
    border: 1px solid #f87171;
    box-shadow: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.action-bar .btn-outline.btn-primary,
.action-bar .btn-outline.btn-secondary {
    background: transparent;
    border-color: rgba(8, 180, 255, 0.55);
    color: var(--color-accent-light);
}

.action-bar .btn-outline.btn-danger {
    background: transparent;
    border-color: rgba(239, 68, 68, 0.55);
    color: #fca5a5;
}

.action-bar .btn-outline.btn-primary:hover,
.action-bar .btn-outline.btn-secondary:hover {
    background: rgba(8, 180, 255, 0.12);
}

.action-bar .btn-outline.btn-danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.page-actions .btn,
.action-bar button,
.action-bar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 0.6rem;
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.page-actions .btn:hover,
.action-bar button:hover,
.action-bar .btn:hover {
    transform: translateY(-1px);
}










/* Contact */
#contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
    padding: 3rem 1.5rem;
    width: min(1100px, 100%);
    max-width: 100%;
    margin: 0 auto;
}
#contact .info h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}
#contact .info p { margin-bottom: 0.75rem; }

.contact-form {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 0.5rem;
    min-width: 0;
    max-width: 100%;
}
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #333;
    border-radius: 0.375rem;
    background: #111;
    color: var(--color-white);
    font-family: inherit;
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* Footer */
footer {
    background: #2e2e2e;
    color: var(--color-text);
    text-align: center;
    font-size: 0.875rem;
    padding: 1rem;
}

/* ====================================================================== */
/*                            MOBILE TWEAKS                               */
/* ====================================================================== */

@media (max-width: 640px) {
    .nav-links { display: none; }        /* hide center links on small screens */

    .navbar {
        padding-inline: 0.75rem;
    }

    .brand {
        flex: 1;
    }

    .brand-name {
        display: none;
    }

    .brand-mark {
        min-width: auto;
    }

    .actions {
        gap: 0.5rem;
    }

    .current-user {
        max-width: 8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 900px) {
    .filters-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .filters-grid .form-field,
    .filters-grid .form-field.field-search,
    .filters-grid .form-field.field-job,
    .filters-grid .form-field.field-contract {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
    }

    .filters-actions-left,
    .filters-actions-right {
        width: 100%;
    }
}

@media (max-width: 520px) {
    #contact {
        grid-template-columns: minmax(0, 1fr);
        padding-inline: 1rem;
    }
}

.notes-card .notes-content{
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-height: 180px;
    overflow-y: auto;
}

