@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Montserrat:wght@600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #F39C12;
    --accent-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --light-bg: #f8f8f8;
    --white: #ffffff;
    --text-dark: #0f0f0f;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --sidebar-width: 250px;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.5;
}

/* Typography Scale */

.page-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    margin: 0 0 1.5rem 0;
    padding: 0;
    letter-spacing: -0.01em;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.005em;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.005em;
}

.card-text {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6b7280;
    margin: 0;
}

.card-meta {
    font-size: 0.8rem;
    font-weight: 500;
    color: #F39C12;
    margin: 0;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-logo {
    display: block;
    max-width: 195px;
    width: 100%;
    height: auto;
    margin: 0 auto 0.3rem auto;
    object-fit: contain;
}

.sidebar-subtitle {
    display: block;
    width: 100%;
    max-width: 195px;
    margin: 0 auto;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f7f7f7;
    opacity: 0.8;
    white-space: nowrap;
    font-weight: 500;
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 0.50em;
    line-height: 1.2;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-menu li a {
    display: block;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--secondary-color);
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 30px;
}

.page-header {
    margin-bottom: 0.75rem;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.dashboard-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem 1.5rem;
}

.dashboard-top-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    align-items: stretch;
}

.dashboard-card {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    min-height: 180px;
    border-radius: 10px;
    padding: 1.1rem 1.2rem 2.1rem;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-metrics {
    display: flex;
    gap: 1.5rem;
    flex: 1 1 auto;
    align-items: stretch;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 0;
}

.stat-card {
    align-items: flex-start;
}

.stat-card .card-title {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.15rem;
    max-width: 100%;
}

.stat-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.stat-card-link {
    display: flex;
    flex-direction: column;
}

.top-action-card {
    flex-direction: column;
    position: relative;
}

.top-action-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.top-action-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-top: 0.6rem;
}

.top-action-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin: 0;
    line-height: 1.2;
}

.top-action-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.35;
    margin: 0.35rem 0 0 0;
    max-width: 11rem;
    display: block;
}


.action-add {
    position: relative;
    overflow: hidden;
}

.action-add::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url('/static/img/arri-camera.png');
    background-size: 200px;
    background-repeat: no-repeat;
    background-position: right center;
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
}

.action-add .top-action-content {
    position: relative;
    z-index: 2;
}

.action-job {
    position: relative;
    overflow: hidden;
}

.action-job::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url('/static/img/slate-clapperboard.png');
    background-size: 180px;
    background-repeat: no-repeat;
    background-position: right center;
    opacity: 0.14;
    pointer-events: none;
    z-index: 1;
}

.action-job .top-action-content {
    position: relative;
    z-index: 2;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    margin-top: 0;
    color: var(--secondary-color);
}


.stat-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #F39C12;
    text-decoration: none;
}

.stat-card:hover .stat-link {
    text-decoration: underline;
}

.dashboard-section-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}

.dashboard-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dashboard-section-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dashboard-section-header .section-title {
    margin: 0;
}

.dashboard-section-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.calendar-month-display {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.dashboard-section {
    background-color: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.dashboard-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.upcoming-jobs-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upcoming-job-card-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.upcoming-job-card-link:hover {
    text-decoration: none;
}

.upcoming-job-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    margin-bottom: 0.75rem;
}

.upcoming-job-card:hover {
    border-color: #cbd5f5;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    cursor: pointer;
}

.upcoming-job-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.upcoming-job-title {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.upcoming-job-client {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.upcoming-job-date {
    font-size: 0.85rem;
    color: #F39C12;
    margin: 0;
}

.upcoming-job-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Bold orange outline for action cards */
.dashboard-action-card {
    border: 4px solid #F39C12 !important;
}

.upcoming-job-status-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(243, 156, 18, 0.12);
    color: #D97706;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    font-weight: 600;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.job-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.job-client {
    font-size: 14px;
    color: var(--text-light);
}

.job-date {
    font-size: 13px;
    color: var(--secondary-color);
    margin-top: 5px;
}

.job-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Unified status pill base class */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-enquiry {
    background-color: #e0f2ff;
    color: #1A4E89;
}

.status-pencil {
    background-color: #FFF4CC;
    border: 1px solid #F5D36C;
    color: #A67C00;
}

.status-completed {
    background-color: #e5e7eb;
    color: #374151;
}

.status-enquiry {
    background-color: #e0f2ff;
    color: #1A4E89;
}

.status-pencil {
    background-color: #FFF4CC;
    border: 1px solid #F5D36C;
    color: #A67C00;
}

.status-booked {
    background-color: #e3f9e5;
    color: #15803d;
}

.empty-message {
    color: var(--text-light);
    font-style: italic;
    padding: 20px 0;
}

.summary-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    padding: 1rem 1.25rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-actions-card {
    flex: 0 0 240px;
}

.quick-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quick-actions-buttons .btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

/* ---- GLOBAL BUTTON SYSTEM ---- */

/* Base button style */
.btn-unified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9px;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

/* Primary (blue) */
.btn-unified-primary {
    background-color: #F39C12;
    color: white;
}
.btn-unified-primary:hover {
    background-color: #F39C12;
}

/* Secondary (neutral) */
.btn-unified-secondary {
    background-color: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}
.btn-unified-secondary:hover {
    background-color: #f3f4f6;
}

/* Danger (red) */
.btn-unified-danger {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}
.btn-unified-danger:hover {
    background-color: #fca5a5;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #E08A0E;
}

.btn-secondary {
    background-color: var(--light-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #dfe6e9;
}

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

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

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

.btn-success:hover {
    background-color: #219a52;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 18px;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

.header-buttons-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
    text-transform: uppercase;
}

table tr:hover {
    background-color: var(--light-bg);
}

.actions {
    display: flex;
    gap: 10px;
}

/* Job header actions cluster */
.job-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Group Edit + Delete together */
.job-header-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Status pill (Upcoming, etc.) */
.job-status-pill {
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background-color: #e0edff;
    color: #F39C12;
    border: 1px solid rgba(243, 156, 18, 0.18);
}

/* Shared header button look (Edit + Delete) */
.btn-header {
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #374151;
    line-height: 1.2;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover state for neutral header button */
.btn-header:hover {
    background-color: #f3f4f6;
}

/* Delete variant */
.btn-header-danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-header-danger:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
}

/* Inline form styling */
.inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.equipment-name {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.equipment-name:hover {
    text-decoration: underline;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-item {
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.detail-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.notes-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.notes-section h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
}

.notes-section p {
    color: var(--text-dark);
    line-height: 1.8;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.back-link {
    margin-top: 20px;
}

.back-link a {
    color: var(--text-light);
    text-decoration: none;
}

.back-link a:hover {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.job-details-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.job-details-header h3 {
    margin: 0;
}

.job-details-separator {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.6;
    margin-top: 2px;
}

.job-details-title {
    font-size: 1.3rem;
    font-weight: 500;
    font-style: italic;
    opacity: 0.9;
}

.scrape-description {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.item-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.item-checkbox:hover {
    background-color: #f8f9fa;
}

.item-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.item-checkbox span {
    flex: 1;
    color: var(--text-dark);
}

.job-title-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.job-title-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-enquiry {
    background-color: #e0f2ff;
    color: #1A4E89;
}

.status-pencil {
    background-color: #FFF4CC;
    border: 1px solid #F5D36C;
    color: #A67C00;
}

.status-completed {
    background-color: #e5e7eb;
    color: #374151;
}

.status-enquiry {
    background-color: #e0f2ff;
    color: #1A4E89;
}

.status-pencil {
    background-color: #FFF4CC;
    border: 1px solid #F5D36C;
    color: #A67C00;
}

.status-booked {
    background-color: #e3f9e5;
    color: #15803d;
}

.form-section-title {
    font-size: 16px;
    color: var(--text-dark);
    margin: 25px 0 15px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.job-actions {
    display: flex;
    gap: 15px;
}

.info-card {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 20px;
}

.info-card h4 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 14px;
}

.info-card p {
    color: #1565c0;
    font-size: 13px;
    line-height: 1.6;
}

/* Bulk Equipment Add Styles */
.bulk-add-intro {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.bulk-add-global-select {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--light-bg);
    border-radius: 6px;
}

.bulk-add-global-select label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.equipment-category-heading {
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
}

.equipment-bulk-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.equipment-bulk-table th,
.equipment-bulk-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    text-align: left;
}

.equipment-bulk-table thead th {
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.equipment-bulk-table tbody tr:hover {
    background-color: var(--light-bg);
}

.equipment-bulk-table tbody tr.already-added {
    opacity: 0.5;
    background-color: #f5f5f5;
}

.already-on-job {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

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

.global-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.equipment-bulk-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bulk-input {
    width: 100%;
    max-width: 6rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

.bulk-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.link-subtle {
    color: var(--text-light);
    font-size: 0.85rem;
    text-decoration: none;
}

.link-subtle:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.equipment-info {
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.equipment-info p {
    margin-bottom: 5px;
    font-size: 14px;
}

.equipment-detail {
    display: block;
    font-size: 12px;
    color: var(--text-light);
}

.accessory-count {
    font-size: 12px;
    color: var(--secondary-color);
}

.total-row td {
    font-weight: 600;
    background-color: var(--light-bg);
}

.print-container {
    background-color: var(--white);
}

.packing-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.packing-header h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.packing-meta p {
    margin-bottom: 5px;
    color: var(--text-light);
}

.packing-table {
    width: 100%;
    border-collapse: collapse;
}

.packing-table th,
.packing-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.packing-table th {
    background-color: var(--light-bg);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--text-light);
}

.checkbox-col {
    width: 40px;
    text-align: center !important;
}

.packing-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.equipment-row {
    background-color: var(--white);
}

.accessory-row {
    background-color: #f8f9fa;
}

.indent-marker {
    color: var(--text-light);
    margin-right: 8px;
}

.item-name.equipment-item {
    font-weight: 600;
}

.serial-number {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 3px;
}

.accessory-parent {
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

.packing-summary {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--primary-color);
    display: flex;
    gap: 30px;
}

.packing-summary p {
    font-size: 14px;
    color: var(--text-dark);
}

.action-bar {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.invoice-container {
    max-width: 800px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--text-dark);
}

.invoice-header-left {
    flex: 0 0 auto;
}

.invoice-header-left h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 2px;  /* Small gap above invoice number */
    margin-top: 0;       /* Ensure top alignment */
}

.invoice-header-logo {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 20px;
}

.invoice-header-right {
    flex: 0 0 auto;
    text-align: right;
}

.invoice-header-right p {
    margin: 0;           /* No margins */
    line-height: 1.2;    /* Tighter line spacing */
}

.invoice-number {
    color: var(--text-light);
    font-size: 14px;
}

.invoice-date {
    text-align: right;
}

.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.invoice-from h4,
.invoice-to h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.invoice-from p,
.invoice-to p {
    margin-bottom: 5px;
    font-size: 14px;
}

.invoice-details {
    background-color: var(--light-bg);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.invoice-details p {
    margin-bottom: 5px;
    font-size: 14px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-table th,
.invoice-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.invoice-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

.invoice-table .text-center {
    text-align: center;
}

.invoice-table .text-right {
    text-align: right;
}

.invoice-table tfoot td {
    border-bottom: none;
}

.invoice-table .subtotal-row td,
.invoice-table .tax-row td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.invoice-table .total-row td {
    font-size: 16px;
    padding-top: 12px;
    border-top: 2px solid var(--primary-color);
}

.invoice-logo {
    margin-bottom: 20px;
}

.invoice-logo-centered {
    text-align: center;
    margin-bottom: 20px;
}

.invoice-logo-img {
    max-width: 250px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.invoice-payment-details {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.invoice-payment-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.invoice-payment-details .payment-info {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.6;
}

.address-block {
    line-height: 1.6;
}

.placeholder-text {
    color: var(--text-light);
    font-style: italic;
    font-size: 13px;
}

.invoice-footer {
    margin-top: 40px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.invoice-footer p {
    margin-bottom: 5px;
}

.payment-terms {
    font-size: 12px;
    color: var(--text-light);
}

/* Calendar Styles */
.calendar-section {
    margin-top: 40px;
}

.calendar-container {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.calendar-header {
    margin-bottom: 25px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 15px;
}

.calendar-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.calendar-nav-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.calendar-nav-btn:hover {
    background-color: #E08A0E;
}

.calendar-title {
    text-align: center;
    flex: 1;
}

.calendar-header h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.calendar-month {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    padding: 1px;
}

.calendar-weekday-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

.calendar-day {
    background-color: var(--white);
    min-height: 110px;
    padding: 0;
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.calendar-day.empty {
    background-color: #f8f9fa;
}

.calendar-day.has-jobs {
    background-color: #ffffff;
}

.calendar-day.is-today {
    background-color: #fff3cd;
    border: 2px solid #ffc107 !important;
}

.calendar-day.is-today .date-number {
    color: #ff9800;
    font-weight: 700;
}

.date-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 0;
    padding: 4px;
}

.job-markers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.job-marker-link {
    display: inline-block;
    text-decoration: none;
}

.job-marker {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    opacity: 0.85;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.job-marker-link:hover .job-marker {
    opacity: 1;
    transform: scale(1.15);
}

/* Job Bars - Horizontal bars spanning job duration */
.job-bars {
    position: relative;
    margin-top: 2px;
    height: 45px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-bar-link {
    position: absolute;
    left: 0;
    right: 0;
    text-decoration: none;
}

.job-bar {
    height: 8px;
    width: 100%;
    margin: 0;
    border-radius: 0;
    opacity: 0.9;
    transition: transform 0.15s ease, opacity 0.15s ease;
    cursor: pointer;
}

.job-bar-start {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
    margin-left: 12px;
    width: calc(100% - 12px);
}

.job-bar-end {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
    margin-right: 12px;
    width: calc(100% - 12px);
}

.job-bar-start.job-bar-end {
    margin-left: 12px;
    margin-right: 12px;
    width: calc(100% - 24px);
}

.job-bar-link:hover .job-bar {
    opacity: 1;
    transform: scaleY(1.3);
}

.calendar-legend {
    background: var(--white);
    border-radius: 8px;
    padding: 20px 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-legend h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.legend-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.legend-text {
    flex: 1;
}

.legend-text strong {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.legend-dates {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

/* Jobs List Card View */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px;
}

.job-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.job-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.job-card-title-section {
    flex: 1;
}

.job-card h4 {
    font-size: 18px;
    margin: 0 0 5px 0;
    color: var(--text-dark);
}

.job-card-title-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.job-card-title-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.job-card-client {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

.job-card-body {
    flex: 1;
    margin-bottom: 15px;
}

.job-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.info-label {
    font-weight: 600;
    color: var(--text-light);
    min-width: 80px;
}

.info-value {
    color: var(--text-dark);
}

.job-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.job-card-actions .btn {
    flex: 1;
    min-width: 70px;
    padding: 8px 12px;
    font-size: 13px;
}

/* A4 Print Styles */
@page {
    size: A4;
    margin: 20mm;
}

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    html, body {
        margin: 0;
        padding: 0;
        font-size: 11pt;
    }
    
    body {
        background: white !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .print-container,
    .invoice-container {
        box-shadow: none !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .page-header {
        display: none !important;
    }
    
    .calendar-section {
        display: none !important;
    }
    
    /* Invoice header in print - inline layout */
    .invoice-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        border-bottom: 2px solid var(--text-dark) !important;
    }
    
    .invoice-header-left h2 {
        margin-bottom: 2px !important;
        margin-top: 0 !important;
    }
    
    .invoice-header-right p {
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    .invoice-header-logo {
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }
    
    .invoice-logo-img {
        max-width: 200px !important;
        max-height: 60px !important;
    }
    
    /* Prevent breaking inside important elements */
    .invoice-header,
    .invoice-details,
    .invoice-parties {
        page-break-inside: avoid;
    }
    
    /* Keep section headers with their content */
    .invoice-section-header {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    /* Allow tables to break across pages but keep individual rows together */
    .invoice-table {
        page-break-inside: auto;
    }
    
    /* Table headers repeat on each page */
    .invoice-table thead {
        display: table-header-group !important;
    }
    
    /* Table footer stays together */
    .invoice-table tfoot {
        display: table-footer-group !important;
    }
    
    /* Keep each row intact */
    .invoice-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    /* Invoice table print styles */
    .invoice-table th {
        background-color: #F39C12 !important;
        color: white !important;
    }
    
    /* Totals section stays together */
    .invoice-totals-table {
        page-break-inside: avoid;
        margin-top: 1rem !important;
    }
    
    /* Payment details and footer stay together */
    .invoice-payment-details {
        page-break-inside: avoid;
        page-break-before: auto;
    }
    
    .invoice-footer {
        page-break-inside: avoid;
    }
    
    /* Back links hidden */
    .back-link {
        display: none !important;
    }
}

/* Invoice status pills */
.invoice-status-pill {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.invoice-status-draft {
    background-color: #f3f4f6;
    color: #6b7280;
}

.invoice-status-sent {
    background-color: #e0f2fe;
    color: #1d4ed8;
}

.invoice-status-paid {
    background-color: #dcfce7;
    color: #166534;
}

.invoice-status-overdue {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.invoice-overdue-banner {
    background-color: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid #fecaca;
}

.overdue-label {
    color: #991b1b;
    font-weight: 400;
}

.invoice-header-right .invoice-overdue-pill-row {
    margin-top: 12px !important;
    display: block;
}

.overdue-inline-label {
    color: #991b1b;
    font-size: 0.5em;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
}

.invoice-status-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
}

.invoice-group {
    margin-bottom: 30px;
}

.invoices-table-wrapper {
    overflow-x: auto;
}

.invoice-delete-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 24px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.form-section-hint {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 16px;
}

.accessory-row {
    margin-bottom: 12px;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.import-section {
    margin-bottom: 20px;
    padding: 12px;
    background-color: #f0f5ff;
    border-left: 3px solid #E08A0E;
    border-radius: 4px;
}

#manual-paste-panel textarea {
    font-family: monospace;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    width: 100%;
    resize: vertical;
}

/* Add Accessory page - Two-card layout */

.section-subtitle {
    margin-top: 0.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.accessories-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.accessories-card {
    flex: 1 1 0;
    min-width: 260px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    border: 1px solid #e5e7eb;
}

.accessories-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #F39C12;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.form-control textarea {
    resize: vertical;
}

.accessories-textarea {
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, monospace;
}

.form-group-quantity {
    max-width: 140px;
}

.form-hint {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Responsive: Stack cards on narrow screens */
@media (max-width: 768px) {
    .accessories-options {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group-quantity {
        max-width: 100%;
    }
}

/* Google Fonts import for DM Sans and Montserrat */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Montserrat:wght@600;700;800&display=swap');

/* Sidebar footer with logo */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

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

/* Adjust sidebar to accommodate footer */
.sidebar {
    display: flex;
    flex-direction: column;
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
}

/* Crew Section Styles */
.crew-notes {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 0.25rem;
}

.billing-unit-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #4b5563;
    text-transform: capitalize;
}

.role-name {
    font-weight: 500;
}

/* Invoice Section Styles */
.invoice-section-header {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #F39C12;
}

.invoice-section-header h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-note {
    color: #6b7280;
    font-style: italic;
}

.section-subtotal-row td {
    padding-top: 0.75rem;
    font-weight: 500;
    color: #4b5563;
    border-top: 1px solid #e5e7eb;
}

.invoice-totals-table {
    width: 100%;
    margin-top: 1.5rem;
    margin-left: auto;
    max-width: 350px;
    border-collapse: collapse;
}

.invoice-totals-table td {
    padding: 0.5rem 0.75rem;
}

.invoice-totals-table td:first-child {
    text-align: right;
    padding-right: 1rem;
}

.invoice-totals-table td:last-child {
    text-align: right;
    min-width: 100px;
}

.invoice-totals-table .subtotal-row td {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.invoice-totals-table .total-row td {
    border-top: 2px solid var(--primary-color);
    padding-top: 0.75rem;
    font-size: 1.1rem;
}

/* Info text styling */
.info-text {
    padding: 1rem;
    color: #4b5563;
    line-height: 1.6;
}

.info-text p {
    margin: 0;
}

/* Form row for side-by-side inputs */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

/* Input with prefix (for currency) */
.input-with-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: #6b7280;
    font-weight: 500;
}

.input-with-prefix input {
    border-radius: 0 6px 6px 0;
    flex: 1;
}

/* Required field indicator */
.required {
    color: #dc2626;
}

/* Logo Upload Dropzone */
.logo-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fafafa;
    margin-bottom: 1rem;
}

.logo-dropzone:hover,
.logo-dropzone.dragover {
    border-color: #F39C12;
    background-color: #fef9f1;
}

.logo-dropzone-icon {
    font-size: 2.5rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.logo-dropzone-text {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.logo-dropzone-hint {
    color: #9ca3af;
    font-size: 0.8rem;
}

.logo-dropzone input[type="file"] {
    display: none;
}

.logo-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-preview img {
    max-width: 150px;
    max-height: 75px;
    object-fit: contain;
    border-radius: 4px;
}

.logo-preview-name {
    flex: 1;
    color: #374151;
    font-size: 0.9rem;
}

.logo-preview-remove {
    color: #dc2626;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
}

.logo-preview-remove:hover {
    color: #b91c1c;
}

/* Branding section wrapper */
.branding-section {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 12px;
    padding-top: 4px !important;
    padding-bottom: 24px;
    padding-left: 24px;
    padding-right: 24px;
    margin-bottom: 32px;
}

.branding-section .form-section-title {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    border-top: none !important;
    border-bottom: none !important;
}

/* In case there's an inner card body adding padding */
.branding-section .card-body,
.branding-section .section-body {
    padding-top: 4px !important;
}

/* Flex container for branding layout */
.branding-flex {
    display: flex;
    gap: 24px;
    align-items: stretch;
    justify-content: flex-start;
}

/* Upload box styling */
.logo-upload-box {
    flex: 1 1 0;
}

/* Vertical divider */
.branding-flex .divider {
    width: 1px;
    background: var(--border-color);
    align-self: stretch;
}

/* Logo dropzone centered */
.logo-upload-box .logo-dropzone {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Logo preview box */
.logo-preview-box {
    background: white;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-sizing: border-box;
    min-height: 180px;
}

/* Previewed logo */
.branding-preview-img {
    max-width: 120px;
    height: auto;
    flex-shrink: 0;
}

/* File name + remove link */
.branding-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    min-width: 0;
    word-break: break-all;
}

.branding-preview-remove {
    color: var(--danger-color);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.branding-preview-remove:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .branding-flex {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .logo-upload-box {
        max-width: 100%;
    }
    
    .branding-flex .divider {
        display: none;
    }
    
    .logo-preview-box {
        width: 100%;
    }
}

/* Invoice archive header with preferences link */
.invoice-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.invoice-archive-header h3 {
    margin: 0;
}

/* Job status filter pills on Jobs list page */
.job-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 16px 24px 0 24px;
}

.job-status-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.job-status-filter-pill:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.job-status-filter-pill--active {
    border-color: #F39C12;
    background-color: #fff7ed;
    color: #92400e;
}

/* Active filter pill – Enquiry (matches Enquiry status pill) */
.job-status-filter-pill--active-enquiry {
    background-color: #e0f2ff;
    border-color: #93c5fd;
    color: #1A4E89;
}

/* Active filter pill – Pencil (matches Pencil status pill) */
.job-status-filter-pill--active-pencil {
    background-color: #FFF4CC;
    border-color: #F5D36C;
    color: #A67C00;
}

/* Active filter pill – Booked (matches Booked status pill) */
.job-status-filter-pill--active-booked {
    background-color: #e3f9e5;
    border-color: #86efac;
    color: #15803d;
}

/* Active filter pill – Completed (matches Completed status pill) */
.job-status-filter-pill--active-completed {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}

/* Filter pill count styling */
.filter-pill-count {
    font-size: 0.9em;
    opacity: 0.8;
    margin-left: 6px;
}

/* Make count feel like a subtle badge */
.job-status-filter-pill .filter-pill-count {
    opacity: 1;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.03);
}

/* Jobs toolbar with search */
.jobs-toolbar {
    padding: 0 24px;
    margin-bottom: 16px;
}

.jobs-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
}

.jobs-search-input {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.jobs-search-input:focus {
    outline: none;
    border-color: #F39C12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.jobs-search-input::placeholder {
    color: #9ca3af;
}

.jobs-search-clear {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
}

.jobs-search-clear:hover {
    color: #374151;
    text-decoration: underline;
}

/* Jobs toolbar layout - search left, create button right */
.jobs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 18px 0;
}

.jobs-toolbar__left {
    flex: 1 1 auto;
    max-width: 520px;
}

.jobs-toolbar__right {
    flex: 0 0 auto;
}

.jobs-toolbar .jobs-search-input,
.jobs-toolbar input[type="text"] {
    width: 100%;
}

/* Tighten spacing between toolbar and filter pills */
.jobs-toolbar {
    margin-bottom: 8px;
}

.job-status-filters {
    padding-top: 8px;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state__message {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.empty-state__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Quick status form on job cards */
.quick-status-form {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
}

.quick-status-select {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.quick-status-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.3);
}

.quick-status-select.status-enquiry {
    background-color: #e0f2ff;
    border-color: #90cdf4;
    color: #1A4E89;
}

.quick-status-select.status-pencil {
    background-color: #FFF4CC;
    border-color: #F5D36C;
    color: #A67C00;
}

.quick-status-select.status-booked {
    background-color: #e3f9e5;
    border-color: #86efac;
    color: #15803d;
}

.quick-status-select.status-completed {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}

/* Ensure select dropdowns inherit app typography */
select,
.select,
.quick-status-select {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

/* Lock quick status dropdown text size */
.quick-status-select {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* Invoice status filter pills (appended only) */
.invoice-status-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0 18px;
    padding: 0 24px;
}

.invoice-status-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.invoice-status-filter-pill:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform: translateY(-1px);
}

.invoice-status-filter-pill--active {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245,158,11,.18);
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--draft {
    border-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(156,163,175,.22);
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--sent {
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96,165,250,.22);
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--paid {
    border-color: #34d399;
    box-shadow: 0 4px 12px rgba(52,211,153,.22);
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--overdue {
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239,68,68,.22);
}

/* Invoice status pill color fixes (appended) */
.invoice-status-sent {
    background-color: #dbeafe;
    color: #1A4E89;
}

/* Invoice filter pills - filled background when active (matching Jobs pattern) */
.invoice-status-filter-pill--active {
    border-color: #F39C12;
    background-color: #fff7ed;
    color: #92400e;
    box-shadow: none;
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--draft {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
    box-shadow: none;
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--sent {
    background-color: #e0f2ff;
    border-color: #93c5fd;
    color: #1A4E89;
    box-shadow: none;
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--paid {
    background-color: #e3f9e5;
    border-color: #86efac;
    color: #15803d;
    box-shadow: none;
}

.invoice-status-filter-pill--active.invoice-status-filter-pill--overdue {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
    box-shadow: none;
}

/* Empty state for invoice archive (appended) */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    margin: 20px 0;
}

.empty-state-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.empty-state-text {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.empty-state .btn {
    margin-top: 4px;
}

/* Invoice Action Bar - 3-column grid layout */
.invoice-action-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: flex-start;
    column-gap: 16px;
    padding: 12px 20px;
    background-color: #fafafa;
    border-top: 1px solid #e5e7eb;
    margin: 20px -24px -24px -24px;
    border-radius: 0 0 8px 8px;
}

.invoice-action-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    align-self: flex-start;
}

.invoice-action-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-left: 16px;
    border-left: 1px solid #e0e0e0;
    align-self: flex-start;
}

.invoice-action-right {
    display: grid;
    grid-template-rows: auto auto;
    justify-items: end;
    align-items: start;
    row-gap: 12px;
    align-self: flex-start;
}

.invoice-action-right-top {
    display: flex;
    align-items: center;
    align-self: start;
}

.invoice-action-right-bottom {
    justify-self: end;
    align-self: start;
}

.invoice-action-right-single {
    grid-template-rows: auto;
    align-self: center;
}

.invoice-action-left form,
.invoice-action-center form {
    display: inline-flex;
}

.invoice-action-right form {
    display: inline-flex;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-action-primary {
    height: 38px;
    padding: 0 14px;
    font-size: 0.875rem;
    background-color: #F39C12;
    color: #fff;
    border-color: #F39C12;
}

.btn-action-primary:hover {
    background-color: #e08e0b;
    border-color: #e08e0b;
}

.btn-action-outline {
    background-color: #fff;
    color: #4b5563;
    border-color: #d1d5db;
}

.btn-action-outline:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

.btn-action-danger {
    background-color: #fff;
    color: #dc2626;
    border-color: #fca5a5;
}

.btn-action-danger:hover {
    background-color: #fef2f2;
    border-color: #f87171;
}

.paid-indicator {
    color: #166534;
    font-weight: 500;
    font-size: 0.8125rem;
}

@media (max-width: 900px) {
    .invoice-action-bar {
        grid-template-columns: 1fr;
        row-gap: 0;
        column-gap: 0;
        padding: 0;
        margin: 20px -16px -16px -16px;
    }
    
    .invoice-action-left {
        justify-content: center;
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .invoice-action-center {
        justify-content: center;
        padding: 12px 16px;
        flex-wrap: wrap;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .invoice-action-right {
        grid-template-rows: auto;
        grid-template-columns: auto auto;
        justify-content: flex-end;
        align-items: center;
        padding: 12px 16px;
        column-gap: 10px;
        row-gap: 0;
    }
    
    .invoice-action-right-top,
    .invoice-action-right-bottom {
        justify-self: auto;
    }
}

/* ===== RATE CARD MANAGEMENT ===== */

.rate-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-card-header h3 {
    margin: 0;
}

.rate-card-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
}

.rate-selector-form {
    padding: 20px;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.rate-selector-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rate-selector-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.rate-selector-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.rate-selector-group select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
}

.rate-selector-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.rate-grid {
    padding: 20px;
}

.rate-grid-section {
    margin-bottom: 24px;
}

.rate-grid-section:last-child {
    margin-bottom: 0;
}

.rate-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
}

.rate-grid-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.rate-grid-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rate-grid-item label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-dark);
}

.rate-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    overflow: hidden;
}

.rate-input-wrapper:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.rate-currency {
    padding: 8px 10px;
    background: var(--light-bg);
    color: var(--text-light);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
}

.rate-input-wrapper input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-family: inherit;
}

.rate-input-wrapper input:focus {
    outline: none;
}

.rate-input-wrapper input::placeholder {
    color: #d1d5db;
}

.rate-card-notes {
    padding: 0 20px 20px;
}

.rate-card-notes label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.rate-card-notes textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
}

.rate-card-notes textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.rate-card-actions {
    padding: 16px 20px;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    border-radius: 0 0 12px 12px;
}

/* Add Tier Form */
.add-tier-form {
    padding: 20px;
}

.add-tier-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.add-tier-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.add-tier-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.add-tier-group input,
.add-tier-group select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    font-size: 0.9375rem;
    font-family: inherit;
}

.add-tier-group input:focus,
.add-tier-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.add-tier-action {
    flex-shrink: 0;
}

/* Tier Badge */
.tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tier-badge-default {
    background: #e0f2fe;
    color: #0369a1;
}

.tier-badge-tv_drama {
    background: #fce7f3;
    color: #be185d;
}


.tier-badge-commercial {
    background: #dcfce7;
    color: #16a34a;
}

.tier-badge-feature_film {
    background: #fef3c7;
    color: #d97706;
}

.tier-badge-union {
    background: #ede9fe;
    color: #7c3aed;
}

.tier-badge-non_union {
    background: #f3f4f6;
    color: #4b5563;
}

/* Tier List */
.tier-list {
    border-bottom: 1px solid var(--gray-100);
}

.tier-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.tier-list-item:last-child {
    border-bottom: none;
}

.tier-list-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tier-list-name {
    font-weight: 500;
    color: var(--gray-800);
}

.tier-default-badge {
    font-weight: 400;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.tier-delete-form {
    display: inline;
}

.add-tier-section {
    padding: 20px;
    border-top: 1px solid var(--gray-100);
}

.add-tier-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

/* Hourly Link Toggle */
.hourly-link-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    background: var(--gray-50);
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.15s ease;
}

.hourly-link-toggle:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.rate-input-linked .hourly-link-toggle {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #d97706;
}

.rate-input-linked .hourly-link-toggle .link-icon {
    display: block;
}

.rate-input-linked .hourly-link-toggle .unlink-icon {
    display: none;
}

.rate-input-unlinked .hourly-link-toggle {
    background: var(--gray-50);
    border-color: var(--gray-200);
    color: var(--gray-400);
}

.rate-input-unlinked .hourly-link-toggle .link-icon {
    display: none;
}

.rate-input-unlinked .hourly-link-toggle .unlink-icon {
    display: block;
}

.rate-input-wrapper.rate-input-linked,
.rate-input-wrapper.rate-input-unlinked {
    display: flex;
    align-items: center;
}

/* ===== No Rate Card Notice ===== */
.no-rate-card-notice {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    background: #fffbf0;
    border: 1px solid #f5d89e;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    font-size: 0.84rem;
    color: #7a5a1a;
    margin-top: 1.25rem;
    line-height: 1.5;
}

.no-rate-card-notice a {
    color: var(--accent-color, #F39C12);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.no-rate-card-notice a:hover {
    text-decoration: underline;
}

/* ===== Crew Rate Grid (Add/Edit Crew pages) ===== */
.crew-rate-grid {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.crew-rate-grid-header,
.crew-rate-row {
    display: grid;
    grid-template-columns: 1fr 160px 100px 110px;
    align-items: center;
    padding: 0.55rem 0.9rem;
    gap: 0.75rem;
}

.crew-rate-grid-header {
    background: #f3f4f6;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.crew-rate-row {
    border-bottom: 1px solid #f0f1f3;
}

.crew-rate-row:last-child {
    border-bottom: none;
}

.crew-rate-row .col-label {
    font-size: 0.88rem;
    color: #374151;
}

.crew-rate-row .col-rate input,
.crew-rate-row .col-qty input {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.88rem;
    background: #fff;
    text-align: right;
}

.crew-rate-row .col-rate input:focus,
.crew-rate-row .col-qty input:focus {
    outline: none;
    border-color: var(--accent-color, #F39C12);
    box-shadow: 0 0 0 2px rgba(243,156,18,0.15);
}

.crew-rate-row .col-total {
    text-align: right;
    font-size: 0.88rem;
    color: #374151;
    padding-right: 0.25rem;
}

.crew-rate-subtotal-row {
    background: #f9fafb;
    border-top: 2px solid #e5e7eb !important;
}

.crew-rate-subtotal-row .col-total {
    font-size: 0.95rem;
    color: #111827;
}

.line-total {
    display: block;
    text-align: right;
}

/* ===== Crew line list in job view ===== */
.crew-line-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.83rem;
    color: #374151;
    line-height: 1.7;
}

.crew-line-list li {
    white-space: nowrap;
}

.muted-text {
    color: #9ca3af;
    font-size: 0.83rem;
    font-style: italic;
}

/* ===== Rate Card Export Page ===== */
.export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.export-form {
    padding: 1rem 1.5rem 1.5rem;
}

.export-form .form-group {
    margin-bottom: 1.25rem;
}

@media (max-width: 700px) {
    .export-grid {
        grid-template-columns: 1fr;
    }
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--text-dark);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--secondary-color);
    width: 15px;
    height: 15px;
}
