/* FREEsite Admin Portal - Shared Styles */
/* Brand Colors: Charcoal #374151, Teal #14B8A6, Soft Sand #F5F5F4, White #FFFFFF, Dark Navy #0F172A */

:root {
    /* FREEZ Brand Colors */
    --primary-charcoal: #374151;
    --accent-teal: #14B8A6;
    --soft-sand: #F5F5F4;
    --white: #FFFFFF;
    --dark-navy: #0F172A;

    /* Aliases used by the view templates. These were referenced but never
       defined, so every bare var(--primary) resolved to nothing: a gradient
       or background built on it rendered INVISIBLE (the Platform Analytics
       daily chart drew 30 correctly-sized bars with no paint). Defined as
       references, not literals, so they follow [data-theme="dark"].
       #14b8a6 is the value the inline fallbacks in chain-panel.js already
       assumed for --primary. */
    /* PILOTA type system — matches the marketing site (brand guide, 2026-09-21).
       Archivo = display, Inter = interface, IBM Plex Mono = data. */
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --primary: var(--accent-teal);
    --primary-subtle: rgba(20, 184, 166, 0.08);
    --bg-primary: var(--card-bg);
    --bg-secondary: var(--gray-100);
    --bg-light: var(--gray-100);
    --bg: var(--background);
    --bg-2: var(--surface);

    /* Extended Palette */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    /* BUG-522 (light parts B/C): badge TEXT on the 10% tinted fills. The
       brand semantic colours measured 2.0-3.3:1 there; these darker shades
       are 4.6-6.0:1 (WCAG AA 4.5:1). Dark mode keeps the bright ones below. */
    --badge-success-fg: #047857;
    --badge-warning-fg: #B45309;
    --badge-danger-fg: #B91C1C;
    --badge-info-fg: #1D4ED8;

    /* UI Variables */
    --background: #F9FAFB;
    --surface: #FFFFFF;
    --card-bg: #FFFFFF;
    --border-color: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Theme */
[data-theme="dark"] {
    --background: #111111;
    --surface: #1C1C1C;
    --card-bg: #1C1C1C;
    --border-color: #333333;
    --text-primary: #ECECEC;
    --text-secondary: #B3B3B3;
    --text-tertiary: #808080;

    /* Dark mode specific overrides */
    --gray-50: #1C1C1C;
    --gray-100: #2A2A2A;
    --gray-200: #3D3D3D;
    /* BUG-522: --gray-600 is the .badge-gray text colour (its only use). The
       light value #4B5563 on the dark card was 2.26:1; #A3A3A3 on the badge's
       tinted dark fill is ~6.1:1 (WCAG AA needs 4.5:1). */
    --gray-600: #A3A3A3;
    --badge-success-fg: #10B981;
    --badge-warning-fg: #F59E0B;
    --badge-danger-fg: #F87171; /* #EF4444 measured 4.11:1 on the dark tint */
    --badge-info-fg: #60A5FA;

    /* Adjust shadows for dark mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Force full opacity on buttons and form elements to prevent transparency issues */
button, .btn, input, select, textarea {
    opacity: 1 !important;
}

/* Ensure modal content is fully opaque */
[id*="modal"] > div {
    opacity: 1 !important;
    background: #FFFFFF !important;
}

[data-theme="dark"] [id*="modal"] > div {
    background: #1C1C1C !important;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Portal Container Layout */
.portal-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background-color: var(--surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sidebar-logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-teal); /* BUG-172: flat, no gradient */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 24px;
    padding: 0 12px;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* BUG-522: was --text-tertiary (#9CA3AF on white, 2.54:1). */
    color: var(--text-secondary);
    padding: 0 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.nav-item:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

[data-theme="dark"] .nav-item:hover {
    background-color: var(--gray-700);
}

.nav-item.active {
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--accent-teal);
    font-weight: 600;
}

.nav-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    /* min-width: 0 lets this flex item shrink below its content's width, so a
       wide table scrolls inside its overflow-x wrapper instead of widening the
       whole page past the window (change-order-dashboard was 1796px at 1440). */
    min-width: 0;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.topbar {
    height: 64px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-search {
    flex: 1;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--background);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.user-menu:hover {
    background-color: var(--gray-100);
}

[data-theme="dark"] .user-menu:hover {
    background-color: var(--gray-700);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #0F766E; /* BUG-172: flat teal-700 (white initials 5.4:1) */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 32px;
    transition: opacity 0.15s ease;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

/* Cards */
.card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-change {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--badge-success-fg); /* BUG-522: text-safe green (5.5:1 light) */
}

.stat-change.negative {
    color: var(--badge-danger-fg);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background-color: #14B8A6 !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
    border: none !important;
}

.btn-primary:hover {
    background-color: #0D9488 !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    opacity: 1 !important;
}

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.data-table thead {
    background-color: var(--gray-50);
}

[data-theme="dark"] .data-table thead {
    background-color: var(--gray-700);
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background-color: var(--gray-50);
}

[data-theme="dark"] .data-table tbody tr:hover {
    background-color: var(--gray-800);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--badge-success-fg);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--badge-warning-fg);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--badge-danger-fg);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--badge-info-fg);
}

.badge-gray {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--gray-600);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    font-family: inherit; /* BUG-563: textarea was monospace, inputs Arial */
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background-color: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Chart Placeholder */
.chart-placeholder {
    height: 300px;
    background: var(--gray-50);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
}

[data-theme="dark"] .chart-placeholder {
    background: var(--gray-800);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-wrapper {
        margin-left: 220px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .main-content {
        padding: 20px;
    }

    .topbar {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 24px;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 12px;
    }

    /* BUG-170: pages wider than a 390 px phone. Shared causes, fixed once:
       tables with no scroll wrapper (the table itself becomes the horizontal
       scroller), grid/flex children that refused to shrink (min-width:auto),
       and flex rows that never wrapped (card headers, page actions, filters). */
    .data-table,
    .line-items-table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    .card, .card-body, .card-header > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .stats-grid > * {
        min-width: 0;
    }
    .card-header, .page-actions, .filter-group {
        flex-wrap: wrap;
    }
    .card-header {
        gap: 8px;
    }
    .form-input, .form-select, .filter-select, input, select, textarea {
        max-width: 100%;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 24px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Utility Classes */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ============================================
   PHASE 4: MODAL & ACTION STYLES
   ============================================ */

/* Modal Overlay */
.admin-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.admin-modal-overlay.active {
    display: flex;
}
.admin-modal {
    background: var(--surface);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}
.admin-modal-lg {
    max-width: 900px;
}
.admin-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.admin-modal-body {
    padding: 24px;
}
.admin-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Bulk Action Bar */
.bulk-action-bar {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
}
.bulk-action-bar.active {
    display: flex;
}

/* Row checkbox styling */
.row-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #14B8A6;
    cursor: pointer;
}

/* Action button group in table rows */
.action-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.action-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.action-btn:hover {
    background: var(--gray-100, #F3F4F6);
}
.action-btn-approve {
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.3);
}
.action-btn-approve:hover {
    background: rgba(16, 185, 129, 0.1);
}
.action-btn-reject {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.action-btn-reject:hover {
    background: rgba(239, 68, 68, 0.1);
}
.action-btn-view {
    color: #3B82F6;
    border-color: rgba(59, 130, 246, 0.3);
}
.action-btn-view:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Image lightbox for receipts */
.receipt-lightbox {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

/* Signature display */
.signature-display {
    display: inline-block;
    text-align: center;
    padding: 12px;
    background: var(--gray-50, #F9FAFB);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.signature-display img {
    max-width: 200px;
    border-bottom: 1px solid #111827;
}

/* Toast notifications */
.toast-banner {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}
.toast-banner.active {
    display: flex;
}
.toast-success {
    background: #ECFDF5;
    border: 1px solid #10B981;
    color: #047857;
}
.toast-error {
    background: #FEF2F2;
    border: 1px solid #EF4444;
    color: #991B1B;
}

/* Form grid for modals */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Line items table */
.line-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.line-items-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.line-items-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}
.line-items-table .line-item-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-primary);
}


/* PILOTA display type on headings (brand guide). At the end so it wins over
   the earlier rules without editing each of them. */
h1, h2, h3, .page-title, .card-title {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
code, pre, .mono {
  font-family: var(--font-mono);
}
