/* ===== CSS Variables & Theme ===== */
:root {
    /* Colors - Refined Industrial Palette */
    --bg-white: #ffffff;
    --bg-primary: #faf9f7;
    --bg-secondary: #f5f3f0;
    --bg-tertiary: #eceae6;

    --sidebar-bg: #1a1a1f;
    --sidebar-hover: #2a2a30;
    --sidebar-active: #35353d;

    --text-primary: #1a1a1f;
    --text-secondary: #6b6b73;
    --text-tertiary: #9b9ba3;
    --text-inverse: #faf9f7;

    --border-color: #e5e3df;
    --border-light: #f0eeea;

    /* Accent Colors */
    --copper: #c17f59;
    --copper-light: #d4a484;
    --copper-dark: #a66b47;

    --blue: #4a7bbd;
    --blue-light: #e8f0f8;

    --green: #5a9a6e;
    --green-light: #e8f5eb;

    --amber: #c9973e;
    --amber-light: #fdf5e6;

    --purple: #8b6bb3;
    --purple-light: #f3eff8;

    --red: #c9615a;
    --red-light: #fdf0ef;

    /* Status Colors */
    --status-requested: #9b8fb8;
    --status-created: #7ba3cc;
    --status-parts: #c9973e;
    --status-schedule: #cc9966;
    --status-scheduled: #4a7bbd;
    --status-progress: #c17f59;
    --status-completed: #5a9a6e;
    --status-invoiced: #6b6b73;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

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

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
}

#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-slow);
    z-index: 100;
    position: relative;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--copper), var(--copper-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-inverse);
    white-space: nowrap;
    transition: opacity var(--transition-base);
}

.logo-accent {
    color: var(--copper-light);
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
}

.sidebar-toggle {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
}

.sidebar-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

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

.nav-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding: 0 12px;
    margin-bottom: 8px;
    transition: opacity var(--transition-base);
}

.sidebar.collapsed .nav-label {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--text-inverse);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--text-inverse);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--copper);
    border-radius: 0 2px 2px 0;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item span:not(.nav-badge) {
    white-space: nowrap;
    transition: opacity var(--transition-base);
}

.sidebar.collapsed .nav-item span:not(.nav-badge) {
    opacity: 0;
    width: 0;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    transition: opacity var(--transition-base);
}

.nav-badge.urgent {
    background: var(--copper);
    color: white;
}

.sidebar.collapsed .nav-badge {
    opacity: 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

/* ===== Header ===== */
.header {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    gap: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

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

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
}

.header-center {
    flex: 1;
    max-width: 480px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    outline: none;
    border-color: var(--copper);
    background: white;
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.lang-btn {
    padding: 5px 10px;
    border: none;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--copper);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--copper-light);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

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

.user-menu .chevron {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

/* ===== Content Wrapper ===== */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ===== Views ===== */
.view {
    display: none;
    animation: fadeIn var(--transition-base);
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.view-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.view-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    background: var(--copper-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

.btn-text {
    background: none;
    border: none;
    color: var(--copper);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-fast);
}

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

/* ===== KPI Cards ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    gap: 16px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    position: relative;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}

.kpi-card.highlight {
    background: linear-gradient(135deg, #fdf8f4 0%, #faf5f0 100%);
    border-color: var(--copper-light);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon svg {
    width: 24px;
    height: 24px;
}

.kpi-icon.blue { background: var(--blue-light); color: var(--blue); }
.kpi-icon.amber { background: var(--amber-light); color: var(--amber); }
.kpi-icon.green { background: var(--green-light); color: var(--green); }
.kpi-icon.copper { background: rgba(193, 127, 89, 0.12); color: var(--copper); }
.kpi-icon.purple { background: var(--purple-light); color: var(--purple); }

.kpi-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.kpi-value {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-change {
    font-size: 0.75rem;
    margin-top: 4px;
}

.kpi-change.positive { color: var(--green); }
.kpi-change.negative { color: var(--red); }
.kpi-change.neutral { color: var(--text-tertiary); }
.kpi-change.urgent { color: var(--copper); font-weight: 500; }

.kpi-action {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--copper);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.kpi-action:hover {
    background: var(--copper-dark);
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ===== Cards ===== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

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

.card-title {
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.select-mini {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    cursor: pointer;
}

/* ===== Status Chart ===== */
.chart-card {
    grid-column: span 1;
}

.chart-container {
    padding: 20px;
}

.status-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-bar-item {
    display: grid;
    grid-template-columns: 140px 1fr 40px;
    gap: 12px;
    align-items: center;
}

.status-bar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.requested { background: var(--status-requested); }
.status-dot.created { background: var(--status-created); }
.status-dot.parts { background: var(--status-parts); }
.status-dot.schedule { background: var(--status-schedule); }
.status-dot.scheduled { background: var(--status-scheduled); }
.status-dot.progress { background: var(--status-progress); }
.status-dot.completed { background: var(--status-completed); }
.status-dot.invoiced { background: var(--status-invoiced); }

.status-bar-track {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width var(--transition-slow);
}

.status-bar-fill.requested { background: var(--status-requested); }
.status-bar-fill.created { background: var(--status-created); }
.status-bar-fill.parts { background: var(--status-parts); }
.status-bar-fill.schedule { background: var(--status-schedule); }
.status-bar-fill.scheduled { background: var(--status-scheduled); }
.status-bar-fill.progress { background: var(--status-progress); }
.status-bar-fill.completed { background: var(--status-completed); }
.status-bar-fill.invoiced { background: var(--status-invoiced); }

.status-bar-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* ===== Activity Card ===== */
.activity-card {
    grid-column: span 1;
}

.activity-list {
    padding: 8px 0;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 12px 20px;
    transition: background var(--transition-fast);
}

.activity-item:hover {
    background: var(--bg-secondary);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg {
    width: 16px;
    height: 16px;
}

.activity-icon.blue { background: var(--blue-light); color: var(--blue); }
.activity-icon.green { background: var(--green-light); color: var(--green); }
.activity-icon.amber { background: var(--amber-light); color: var(--amber); }
.activity-icon.copper { background: rgba(193, 127, 89, 0.12); color: var(--copper); }
.activity-icon.purple { background: var(--purple-light); color: var(--purple); }

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ===== Region Card ===== */
.region-card {
    grid-column: span 1;
}

.region-stats {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.region-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.region-flag {
    font-size: 1.5rem;
}

.region-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.region-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.region-jobs {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.region-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 32px;
}

.mini-bar {
    width: 6px;
    background: var(--copper);
    border-radius: 2px;
    height: var(--height);
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.region-item:hover .mini-bar {
    opacity: 1;
}

/* ===== Partners Preview Card ===== */
.partners-preview-card {
    grid-column: span 1;
}

.partners-list {
    padding: 8px 0;
}

.partner-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.partner-row:hover {
    background: var(--bg-secondary);
}

.partner-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.partner-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.partner-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.partner-location {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.partner-stats {
    text-align: right;
}

.partner-jobs {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.partner-revenue {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--copper);
}

/* ===== Slide Panel ===== */
.slide-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    visibility: hidden;
    pointer-events: none;
}

.slide-panel.open {
    visibility: visible;
    pointer-events: auto;
}

.panel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.slide-panel.open .panel-overlay {
    opacity: 1;
}

.panel-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 560px;
    max-width: 90vw;
    background: white;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.slide-panel.open .panel-content {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.panel-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.panel-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.panel-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.panel-close svg {
    width: 20px;
    height: 20px;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ===== Status Pills ===== */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pill.requested { background: rgba(155, 143, 184, 0.15); color: #7a6b9e; }
.status-pill.requested::before { background: var(--status-requested); }

.status-pill.created { background: rgba(123, 163, 204, 0.15); color: #5a8ac0; }
.status-pill.created::before { background: var(--status-created); }

.status-pill.parts { background: rgba(201, 151, 62, 0.15); color: #b08535; }
.status-pill.parts::before { background: var(--status-parts); }

.status-pill.schedule { background: rgba(204, 153, 102, 0.15); color: #b8864d; }
.status-pill.schedule::before { background: var(--status-schedule); }

.status-pill.scheduled { background: rgba(74, 123, 189, 0.15); color: #3d6aa8; }
.status-pill.scheduled::before { background: var(--status-scheduled); }

.status-pill.progress { background: rgba(193, 127, 89, 0.15); color: var(--copper-dark); }
.status-pill.progress::before { background: var(--status-progress); }

.status-pill.completed { background: rgba(90, 154, 110, 0.15); color: #4a8560; }
.status-pill.completed::before { background: var(--status-completed); }

.status-pill.invoiced { background: rgba(107, 107, 115, 0.15); color: #5a5a62; }
.status-pill.invoiced::before { background: var(--status-invoiced); }

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.data-table tbody tr {
    transition: background var(--transition-fast);
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* ===== View Toggle ===== */
.view-toggle {
    display: inline-flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.view-toggle-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-tertiary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.view-toggle-btn:hover {
    color: var(--text-secondary);
}

.view-toggle-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== Filters ===== */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    padding-right: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b73' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--copper);
}

/* ===== Kanban Board ===== */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 500px;
}

.kanban-column {
    flex: 0 0 280px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
}

.kanban-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.kanban-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.kanban-count {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 14px 14px 14px 12px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
}

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

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

.kanban-ref {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.kanban-type {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    color: var(--text-secondary);
}

.kanban-customer {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.kanban-location {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.kanban-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.kanban-partner {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kanban-partner-avatar {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--copper-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
}

.kanban-partner-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.kanban-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ===== Kanban Drag & Drop ===== */

/* Drag handle */
.kanban-drag-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    cursor: grab;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--text-tertiary);
}

.kanban-drag-handle svg {
    width: 14px;
    height: 14px;
}

.kanban-card:hover .kanban-drag-handle {
    opacity: 1;
    background: var(--bg-secondary);
}

.kanban-drag-handle:hover {
    color: var(--copper);
    background: rgba(193, 127, 89, 0.1) !important;
}

.kanban-drag-handle:active {
    cursor: grabbing;
}

/* Card content wrapper */
.kanban-card-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Dragging card state */
.kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.98);
    box-shadow: none;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-medium);
}

/* Drag ghost (custom drag image) */
.kanban-drag-ghost {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(193, 127, 89, 0.1);
    transform: rotate(1deg) scale(1.01);
    opacity: 0.92;
    border: 2px solid var(--copper);
}

.kanban-drag-ghost .kanban-drag-handle {
    opacity: 1;
    color: var(--copper);
    background: rgba(193, 127, 89, 0.15);
}

/* Column states during drag */
.kanban-column.drag-active {
    position: relative;
}

.kanban-column.drag-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 2px dashed transparent;
    pointer-events: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.kanban-column.drag-over::after {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.03);
}

.kanban-column.drag-over .kanban-header {
    background: rgba(193, 127, 89, 0.08);
}

.kanban-column.drag-over .kanban-count {
    background: var(--copper);
    color: white;
    transform: scale(1.05);
}

/* Drop zone states */
.kanban-cards.drag-over {
    background: rgba(193, 127, 89, 0.04);
    min-height: 120px;
}

/* Drop placeholder */
.kanban-drop-placeholder {
    display: none;
    height: 80px;
    margin: 8px 0;
    border: 2px dashed var(--copper);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(193, 127, 89, 0.08) 0%, rgba(193, 127, 89, 0.04) 100%);
    position: relative;
    animation: placeholderPulse 1.5s ease-in-out infinite;
}

.kanban-drop-placeholder::before {
    content: 'Drop here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--copper);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

@keyframes placeholderPulse {
    0%, 100% {
        border-color: var(--copper);
        background: linear-gradient(135deg, rgba(193, 127, 89, 0.08) 0%, rgba(193, 127, 89, 0.04) 100%);
    }
    50% {
        border-color: var(--copper-light);
        background: linear-gradient(135deg, rgba(193, 127, 89, 0.12) 0%, rgba(193, 127, 89, 0.06) 100%);
    }
}

/* Kanban board drag state */
.kanban-board.is-dragging {
    cursor: grabbing;
}

.kanban-board.is-dragging .kanban-card:not(.dragging) {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.kanban-board.is-dragging .kanban-card:not(.dragging):hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Highlight for just-moved card */
.kanban-card.just-moved {
    animation: cardHighlight 0.6s ease;
    box-shadow: 0 0 0 2px var(--copper), var(--shadow-md);
}

@keyframes cardHighlight {
    0% {
        box-shadow: 0 0 0 3px var(--copper), 0 8px 24px rgba(193, 127, 89, 0.3);
    }
    100% {
        box-shadow: 0 0 0 2px var(--copper), var(--shadow-md);
    }
}

/* Smooth transitions for count badges */
.kanban-count {
    transition: transform 0.2s ease,
                background 0.15s ease,
                color 0.15s ease;
}

/* Cursor styles */
.kanban-card[draggable="true"] {
    cursor: pointer;
}

.kanban-card[draggable="true"] .kanban-drag-handle {
    cursor: grab;
}

.kanban-card[draggable="true"]:active .kanban-drag-handle,
.kanban-card.dragging .kanban-drag-handle {
    cursor: grabbing;
}

/* Status-specific drop zone colors */
.kanban-column[data-status="requested"].drag-over::after {
    border-color: #f59e0b;
}
.kanban-column[data-status="requested"].drag-over .kanban-count {
    background: #f59e0b;
}

.kanban-column[data-status="created"].drag-over::after {
    border-color: #8b5cf6;
}
.kanban-column[data-status="created"].drag-over .kanban-count {
    background: #8b5cf6;
}

.kanban-column[data-status="parts"].drag-over::after {
    border-color: #ec4899;
}
.kanban-column[data-status="parts"].drag-over .kanban-count {
    background: #ec4899;
}

.kanban-column[data-status="schedule"].drag-over::after {
    border-color: #f97316;
}
.kanban-column[data-status="schedule"].drag-over .kanban-count {
    background: #f97316;
}

.kanban-column[data-status="scheduled"].drag-over::after {
    border-color: var(--status-scheduled);
}
.kanban-column[data-status="scheduled"].drag-over .kanban-count {
    background: var(--status-scheduled);
}

.kanban-column[data-status="progress"].drag-over::after {
    border-color: var(--copper);
}
.kanban-column[data-status="progress"].drag-over .kanban-count {
    background: var(--copper);
}

.kanban-column[data-status="completed"].drag-over::after {
    border-color: var(--status-completed);
}
.kanban-column[data-status="completed"].drag-over .kanban-count {
    background: var(--status-completed);
}

/* ===== Responsive ===== */
@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        z-index: 200;
    }

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

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

    .header-center {
        display: none;
    }
}

/* ===== Sidebar Role Switcher - Prototype Demo ===== */
.sidebar-role-switcher {
    position: relative;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-role-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: rgba(193, 127, 89, 0.1);
    border: 1px solid rgba(193, 127, 89, 0.2);
    border-radius: var(--radius-md);
    color: #faf9f7;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-role-toggle:hover {
    background: rgba(193, 127, 89, 0.15);
    border-color: rgba(193, 127, 89, 0.3);
}

.sidebar-role-switcher.open .sidebar-role-toggle {
    background: rgba(193, 127, 89, 0.2);
    border-color: var(--copper);
}

.sidebar-role-current {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-role-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a7bbd 0%, #3d6aa8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-role-icon svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.sidebar-role-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sidebar-role-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-role-name {
    font-size: 13px;
    font-weight: 600;
    color: #faf9f7;
}

.sidebar-role-chevron {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.sidebar-role-switcher.open .sidebar-role-chevron {
    transform: rotate(180deg);
    color: var(--copper);
}

/* Sidebar Role Menu */
.sidebar-role-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 100;
}

.sidebar-role-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sidebar-role-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, #1a1a1f 0%, #2d2d35 100%);
    color: #fff;
}

.sidebar-role-menu-header span:first-child {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-role-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--copper);
    color: #fff;
}

/* Sidebar Role Options */
.sidebar-role-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-role-option:last-child {
    border-bottom: none;
}

.sidebar-role-option:hover {
    background: var(--bg-secondary);
}

.sidebar-role-option.active {
    background: linear-gradient(135deg, rgba(193, 127, 89, 0.08) 0%, rgba(193, 127, 89, 0.03) 100%);
}

.sidebar-role-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-role-option-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-role-option-icon.admin {
    background: linear-gradient(135deg, #4a7bbd 0%, #3d6aa8 100%);
    color: #fff;
}

.sidebar-role-option-icon.technician {
    background: linear-gradient(135deg, #c17f59 0%, #a66b47 100%);
    color: #fff;
}

.sidebar-role-option-icon.partner {
    background: linear-gradient(135deg, #5a9a6e 0%, #4a8a5e 100%);
    color: #fff;
}

.sidebar-role-option-info {
    flex: 1;
    min-width: 0;
}

.sidebar-role-option-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 1px;
}

.sidebar-role-option-desc {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
}

.sidebar-role-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--copper);
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-role-check svg {
    width: 12px;
    height: 12px;
    color: #fff;
}

.sidebar-role-option.active .sidebar-role-check {
    display: flex;
}

/* Collapsed sidebar - hide role switcher details */
.sidebar.collapsed .sidebar-role-switcher {
    padding-top: 8px;
}

.sidebar.collapsed .sidebar-role-toggle {
    padding: 8px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-role-info,
.sidebar.collapsed .sidebar-role-chevron {
    display: none;
}

.sidebar.collapsed .sidebar-role-icon {
    width: 28px;
    height: 28px;
}

.sidebar.collapsed .sidebar-role-icon svg {
    width: 14px;
    height: 14px;
}

.sidebar.collapsed .sidebar-role-menu {
    left: calc(100% + 8px);
    bottom: 0;
    width: 240px;
}

/* ===== New Job Modal ===== */
.new-job-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.new-job-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 31, 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.new-job-modal.active .modal-container {
    transform: translateY(0) scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #2a2a30 100%);
    color: white;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--copper) 0%, var(--copper-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.modal-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

/* Progress Steps */
.modal-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    transition: all var(--transition-base);
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
}

.progress-step.active .step-indicator {
    border-color: var(--copper);
    background: var(--copper);
}

.progress-step.completed .step-indicator {
    border-color: var(--green);
    background: var(--green);
}

.step-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.progress-step.active .step-number {
    color: white;
}

.progress-step.completed .step-number {
    display: none;
}

.step-check {
    display: none;
    width: 16px;
    height: 16px;
    color: white;
}

.progress-step.completed .step-check {
    display: block;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.progress-step.active .step-label {
    color: var(--text-primary);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 16px;
    position: relative;
    overflow: hidden;
}

.progress-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--copper);
    transition: width var(--transition-base);
}

.progress-step.completed + .progress-line::after {
    width: 100%;
}

/* Modal Body */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.form-step {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Elements */
.form-section {
    margin-bottom: 24px;
}

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

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

.form-label .required {
    color: var(--copper);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

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

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-section.flex-1 {
    flex: 1;
}

.form-row .form-section.flex-2 {
    flex: 2;
}

.form-field {
    margin-bottom: 16px;
}

.form-field:last-child {
    margin-bottom: 0;
}

.form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-field label .required {
    color: var(--copper);
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: white;
    transition: all var(--transition-fast);
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* Partner Search & Dropdown */
.partner-select-wrapper {
    position: relative;
}

.partner-search-container {
    position: relative;
}

.partner-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.partner-search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    transition: all var(--transition-fast);
}

.partner-search-input:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.partner-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
    z-index: 100;
    display: none;
    max-height: 280px;
    overflow: hidden;
}

.partner-dropdown.show {
    display: block;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.partner-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.partner-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.partner-option:hover {
    background: var(--bg-secondary);
}

.partner-option-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.partner-option-info {
    flex: 1;
    min-width: 0;
}

.partner-option-name {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.partner-option-location {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.partner-option-region {
    font-size: 1.1rem;
}

.partner-dropdown-footer {
    border-top: 1px solid var(--border-light);
    padding: 8px;
}

.add-partner-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--copper);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-partner-trigger:hover {
    background: rgba(193, 127, 89, 0.08);
    border-color: var(--copper);
}

.add-partner-trigger svg {
    width: 16px;
    height: 16px;
}

/* Selected Partner Display */
.selected-partner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.selected-partner-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-partner-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.selected-partner-details {
    display: flex;
    flex-direction: column;
}

.selected-partner-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.selected-partner-location {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.change-partner-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.change-partner-btn:hover {
    border-color: var(--copper);
    color: var(--copper);
}

/* Quick Add Partner */
.quick-add-partner {
    display: none;
    background: linear-gradient(135deg, rgba(193, 127, 89, 0.06) 0%, rgba(193, 127, 89, 0.02) 100%);
    border: 1px solid rgba(193, 127, 89, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 16px;
    animation: expandIn 0.3s ease;
}

.quick-add-partner.show {
    display: block;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: scaleY(0.9);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

.quick-add-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.quick-add-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--copper-dark);
}

.quick-add-title svg {
    width: 20px;
    height: 20px;
    color: var(--copper);
}

.quick-add-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.quick-add-close:hover {
    background: rgba(193, 127, 89, 0.1);
    color: var(--copper);
}

.quick-add-close svg {
    width: 16px;
    height: 16px;
}

.quick-add-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.quick-add-grid .form-field {
    margin-bottom: 0;
}

.quick-add-grid .form-field:last-child {
    grid-column: span 2;
}

.region-toggle-group {
    display: flex;
    gap: 8px;
}

.region-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.region-toggle-btn:hover {
    border-color: var(--copper);
}

.region-toggle-btn.active {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.1);
    color: var(--copper-dark);
}

.region-toggle-btn .region-flag {
    font-size: 1rem;
}

.quick-add-confirm {
    width: 100%;
}

/* Region Selector */
.region-selector {
    display: flex;
    gap: 8px;
}

.region-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.region-btn:hover {
    border-color: var(--text-tertiary);
}

.region-btn.active {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.08);
    color: var(--copper-dark);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.region-btn .region-flag {
    font-size: 1.2rem;
}

/* Service Type Grid */
.service-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.service-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.service-type-card:hover {
    border-color: var(--text-tertiary);
    transform: translateY(-2px);
}

.service-type-card.active {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.06);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.service-type-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.service-type-icon svg {
    width: 26px;
    height: 26px;
}

.service-type-icon.installation {
    background: var(--blue-light);
    color: var(--blue);
}

.service-type-icon.repair {
    background: rgba(193, 127, 89, 0.12);
    color: var(--copper);
}

.service-type-icon.maintenance {
    background: var(--green-light);
    color: var(--green);
}

.service-type-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.service-type-desc {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Priority Grid */
.priority-grid {
    display: flex;
    gap: 12px;
}

.priority-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.priority-card:hover {
    border-color: var(--text-tertiary);
}

.priority-card.active {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.06);
}

.priority-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.priority-indicator.normal {
    background: var(--green);
}

.priority-indicator.high {
    background: var(--amber);
}

.priority-indicator.urgent {
    background: var(--red);
}

.priority-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Scheduling Section */
.scheduling-section {
    background: var(--bg-secondary);
    margin: 0 -28px -28px;
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
}

.scheduling-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.scheduling-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.scheduling-toggle-left svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.scheduling-toggle-left span {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.scheduling-optional {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.scheduling-toggle-switch {
    position: relative;
}

.toggle-track {
    width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    transition: background var(--transition-fast);
    position: relative;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.scheduling-toggle-switch.active .toggle-track {
    background: var(--copper);
}

.scheduling-toggle-switch.active .toggle-thumb {
    transform: translateX(20px);
}

.scheduling-fields {
    display: none;
    margin-top: 16px;
    animation: fadeSlideIn 0.3s ease;
}

.scheduling-fields.show {
    display: block;
}

.scheduling-fields .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.scheduling-fields .form-field {
    margin-bottom: 0;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.modal-footer-right {
    display: flex;
    gap: 10px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #2a2a30 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    width: 36px;
    height: 36px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.toast-content {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
}

.toast-message {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Toast Type Variations */
.toast.error .toast-icon {
    background: var(--red);
}

.toast.warning .toast-icon {
    background: var(--amber);
}

.toast.success .toast-icon {
    background: var(--green);
}

/* ===== New Job Full-Page Form (Matching Partner Portal) ===== */

/* Form Progress Container */
.form-progress-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
}

.step-number {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.step-check {
    position: absolute;
    width: 20px;
    height: 20px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-base);
}

.progress-step.active .step-circle,
.progress-step.completed .step-circle {
    background: var(--copper);
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    color: white;
}

.progress-step.completed .step-number {
    opacity: 0;
    transform: scale(0);
}

.progress-step.completed .step-check {
    opacity: 1;
    transform: scale(1);
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    transition: color var(--transition-base);
}

.progress-step.active .step-label {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    max-width: 100px;
    height: 2px;
    background: var(--border-color);
    margin: 0 16px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.progress-line-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--copper);
    transition: width var(--transition-slow);
}

.progress-step.completed + .progress-line .progress-line-fill {
    width: 100%;
}

/* Form Container */
.form-container {
    max-width: 720px;
}

#newJobView .form-step {
    display: none;
    animation: fadeIn var(--transition-base);
}

#newJobView .form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.form-card-header {
    margin-bottom: 24px;
}

.form-card-header h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form-card-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group .required {
    color: var(--red);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-white);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px var(--copper-subtle);
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Service Type Grid */
#newJobView .service-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.service-option {
    cursor: pointer;
}

.service-option input {
    display: none;
}

.service-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.service-option:hover .service-option-content {
    border-color: var(--border-color);
}

.service-option input:checked + .service-option-content {
    background: var(--copper-subtle);
    border-color: var(--copper);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.service-option input:checked + .service-option-content .service-icon {
    background: var(--copper);
    color: white;
}

.service-icon svg {
    width: 24px;
    height: 24px;
}

.service-option-content span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Priority Grid */
#newJobView .priority-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.priority-option {
    cursor: pointer;
}

.priority-option input {
    display: none;
}

.priority-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.priority-option:hover .priority-content {
    border-color: var(--border-color);
}

.priority-option input:checked + .priority-content {
    background: var(--copper-subtle);
    border-color: var(--copper);
}

.priority-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-dot.low { background: var(--green); }
.priority-dot.normal { background: var(--amber); }
.priority-dot.high { background: #e67e22; }
.priority-dot.urgent { background: var(--red); }

.priority-text {
    display: flex;
    flex-direction: column;
}

.priority-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.priority-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Region Toggle Group */
.region-toggle-group {
    display: flex;
    gap: 8px;
}

.region-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.region-toggle-btn:hover {
    border-color: var(--border-color);
}

.region-toggle-btn.active {
    background: var(--copper-subtle);
    border-color: var(--copper);
    color: var(--text-primary);
}

.region-flag {
    font-size: 1.1rem;
}

/* Scheduling Card (Admin Feature) */
.scheduling-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.scheduling-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.scheduling-header:hover {
    background: var(--bg-tertiary);
}

.scheduling-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.scheduling-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.scheduling-icon svg {
    width: 20px;
    height: 20px;
}

.scheduling-title {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.scheduling-subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.toggle-switch {
    width: 48px;
    height: 28px;
    position: relative;
}

.toggle-track {
    width: 100%;
    height: 100%;
    background: var(--border-color);
    border-radius: 14px;
    position: relative;
    transition: background var(--transition-fast);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active .toggle-track {
    background: var(--copper);
}

.toggle-switch.active .toggle-thumb {
    transform: translateX(20px);
}

.scheduling-fields {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
}

.scheduling-fields .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.scheduling-fields .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduling-fields .form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.scheduling-fields .form-field input,
.scheduling-fields .form-field select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-white);
}

/* Partner Selection (New Job View) */
#newJobView .partner-select-wrapper {
    position: relative;
}

#newJobView .partner-search-container {
    position: relative;
}

#newJobView .partner-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

#newJobView .partner-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg-white);
    transition: all var(--transition-fast);
}

#newJobView .partner-search-input:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px var(--copper-subtle);
}

#newJobView .partner-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
    max-height: 280px;
    overflow: hidden;
}

#newJobView .partner-dropdown.open {
    display: block;
}

#newJobView .partner-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg-white);
}

#newJobView .partner-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

#newJobView .partner-dropdown-item:hover {
    background: var(--bg-secondary);
}

#newJobView .partner-dropdown-item .partner-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

#newJobView .partner-dropdown-item .partner-details {
    flex: 1;
    min-width: 0;
}

#newJobView .partner-dropdown-item .partner-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

#newJobView .partner-dropdown-item .partner-location {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

#newJobView .partner-dropdown-item .partner-region-flag {
    font-size: 1.2rem;
}

#newJobView .partner-dropdown-footer {
    padding: 12px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
}

#newJobView .add-partner-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: var(--copper-subtle);
    border: 1px dashed var(--copper);
    border-radius: var(--radius-sm);
    color: var(--copper);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

#newJobView .add-partner-trigger:hover {
    background: var(--copper);
    color: white;
    border-style: solid;
}

#newJobView .add-partner-trigger svg {
    width: 16px;
    height: 16px;
}

/* Selected Partner Display */
#newJobView .selected-partner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--copper-subtle);
    border: 1px solid var(--copper);
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

#newJobView .selected-partner-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#newJobView .selected-partner-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

#newJobView .selected-partner-details {
    display: flex;
    flex-direction: column;
}

#newJobView .selected-partner-name {
    font-weight: 600;
    color: var(--text-primary);
}

#newJobView .selected-partner-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#newJobView .change-partner-btn {
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#newJobView .change-partner-btn:hover {
    border-color: var(--copper);
    color: var(--copper);
}

/* Quick Add Partner */
#newJobView .quick-add-partner {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 12px;
}

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

#newJobView .quick-add-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

#newJobView .quick-add-title svg {
    width: 20px;
    height: 20px;
    color: var(--copper);
}

#newJobView .quick-add-close {
    width: 32px;
    height: 32px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

#newJobView .quick-add-close:hover {
    border-color: var(--red);
    color: var(--red);
}

#newJobView .quick-add-close svg {
    width: 16px;
    height: 16px;
}

#newJobView .quick-add-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

#newJobView .quick-add-grid .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#newJobView .quick-add-grid .form-field.full-width {
    grid-column: span 2;
}

#newJobView .quick-add-grid .form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

#newJobView .quick-add-grid .form-field input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg-white);
}

#newJobView .quick-add-confirm {
    width: 100%;
    justify-content: center;
}

/* Review Card */
.review-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.review-card .form-card-header {
    padding: 24px 24px 0;
}

.review-sections {
    padding: 24px;
}

.review-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.review-section:first-child {
    padding-top: 0;
}

.review-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.review-section-header h4 {
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.edit-btn {
    background: none;
    border: none;
    color: var(--copper);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.edit-btn:hover {
    color: var(--copper-dark);
}

.review-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.review-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.review-value {
    font-weight: 600;
    color: var(--text-primary);
}

.submit-notice {
    display: flex;
    gap: 14px;
    padding: 20px 24px;
    background: var(--blue-light);
    border-top: 1px solid var(--border-light);
}

.submit-notice svg {
    width: 22px;
    height: 22px;
    color: var(--blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.submit-notice p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Form Actions */
#newJobView .form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    margin-top: 8px;
}

#newJobView .form-nav-buttons {
    display: flex;
    gap: 12px;
}

#newJobView .btn.submit-btn {
    background: var(--green);
}

#newJobView .btn.submit-btn:hover {
    background: #4a8a5e;
}

/* Responsive - New Job Form */
@media (max-width: 768px) {
    .form-progress-container {
        padding: 20px;
    }

    .form-progress {
        flex-direction: row;
        justify-content: space-between;
    }

    .progress-line {
        max-width: 40px;
        margin: 0 8px;
        margin-bottom: 28px;
    }

    .step-circle {
        width: 36px;
        height: 36px;
    }

    .step-number {
        font-size: 0.85rem;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .form-card {
        padding: 20px;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }

    #newJobView .service-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #newJobView .priority-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scheduling-fields .form-row {
        grid-template-columns: 1fr;
    }

    #newJobView .quick-add-grid {
        grid-template-columns: 1fr;
    }

    #newJobView .quick-add-grid .form-field.full-width {
        grid-column: span 1;
    }

    #newJobView .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    #newJobView .form-nav-buttons {
        width: 100%;
        flex-direction: column;
    }

    #newJobView .form-nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Invoice Editor Styles ===== */
.invoice-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 31, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.invoice-editor-overlay.open {
    opacity: 1;
    visibility: visible;
}

.invoice-editor-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 800px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.invoice-editor-panel.open {
    transform: translateX(0);
}

/* Editor Header */
.invoice-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.invoice-editor-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.invoice-editor-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--copper);
    background: rgba(193, 127, 89, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    width: fit-content;
}

.invoice-editor-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-editor-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.invoice-editor-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.invoice-editor-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.invoice-editor-close svg {
    width: 20px;
    height: 20px;
}

/* Editor Body */
.invoice-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Status Banner */
.invoice-status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: var(--amber-light);
    border: 1px solid rgba(201, 151, 62, 0.2);
}

.invoice-status-banner.pending {
    background: var(--amber-light);
    border-color: rgba(201, 151, 62, 0.2);
}

.invoice-status-banner.pending .status-banner-icon {
    background: rgba(201, 151, 62, 0.15);
    color: var(--amber);
}

.invoice-status-banner.synced {
    background: var(--blue-light);
    border-color: rgba(74, 123, 189, 0.2);
}

.invoice-status-banner.synced .status-banner-icon {
    background: rgba(74, 123, 189, 0.15);
    color: var(--blue);
}

.invoice-status-banner.paid {
    background: var(--green-light);
    border-color: rgba(90, 154, 110, 0.2);
}

.invoice-status-banner.paid .status-banner-icon {
    background: rgba(90, 154, 110, 0.15);
    color: var(--green);
}

.status-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-banner-icon svg {
    width: 22px;
    height: 22px;
}

.status-banner-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-banner-title {
    font-weight: 600;
    color: var(--text-primary);
}

.status-banner-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Billing Section */
.invoice-billing-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
}

.billing-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
}

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

.billing-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.billing-edit-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.billing-edit-btn:hover {
    background: var(--bg-secondary);
    color: var(--copper);
    border-color: var(--border-color);
}

.billing-edit-btn svg {
    width: 16px;
    height: 16px;
}

.billing-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.billing-company {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.billing-address {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.billing-detail {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.billing-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
    color: var(--text-tertiary);
}

.billing-arrow svg {
    width: 24px;
    height: 24px;
}

/* Billing Edit Form */
.billing-card-edit {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.billing-edit-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.billing-edit-field input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
}

.billing-edit-field input:focus {
    outline: none;
    border-color: var(--copper);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.billing-edit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.billing-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

/* Invoice Details Section */
.invoice-details-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.invoice-detail-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
}

.invoice-detail-card label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.invoice-detail-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
}

.invoice-detail-input:focus {
    outline: none;
    border-color: var(--copper);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

/* Line Items Section */
.invoice-items-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.items-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.items-section-title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-items-table {
    width: 100%;
}

.items-table-header {
    display: grid;
    grid-template-columns: 2fr 100px 120px 120px 50px;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
}

.items-table-header span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.items-table-body {
    max-height: 300px;
    overflow-y: auto;
}

.items-table-row {
    display: grid;
    grid-template-columns: 2fr 100px 120px 120px 50px;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    transition: background var(--transition-fast);
}

.items-table-row:hover {
    background: var(--bg-primary);
}

.items-table-row:last-child {
    border-bottom: none;
}

.item-col-desc {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-type-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: fit-content;
}

.item-type-badge.labor {
    background: var(--blue-light);
    color: var(--blue);
}

.item-type-badge.travel {
    background: var(--purple-light);
    color: var(--purple);
}

.item-type-badge.service {
    background: var(--green-light);
    color: var(--green);
}

.item-type-badge.parts {
    background: var(--amber-light);
    color: var(--amber);
}

.item-desc-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: transparent;
    transition: all var(--transition-fast);
}

.item-desc-input:hover {
    background: var(--bg-secondary);
}

.item-desc-input:focus {
    outline: none;
    border-color: var(--copper);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.item-job-ref {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: monospace;
}

.item-col-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-qty-input {
    width: 60px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: right;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
}

.item-qty-input:focus {
    outline: none;
    border-color: var(--copper);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.item-unit {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    min-width: 24px;
}

.item-col-rate {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rate-currency {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.item-rate-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: right;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
}

.item-rate-input:focus {
    outline: none;
    border-color: var(--copper);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.item-col-amount {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.item-col-actions {
    display: flex;
    justify-content: center;
}

.item-delete-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.item-delete-btn:hover {
    background: var(--red-light);
    color: var(--red);
}

.item-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.items-empty-state {
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.items-empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    opacity: 0.5;
}

.items-empty-state p {
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

/* Totals */
.invoice-totals {
    padding: 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.totals-row {
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    align-items: center;
}

.totals-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: flex-end;
}

.totals-value {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
    text-align: right;
}

.vat-select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-white);
    cursor: pointer;
}

.vat-select:focus {
    outline: none;
    border-color: var(--copper);
}

.total-row {
    padding-top: 12px;
    border-top: 2px solid var(--border-color);
}

.total-row .totals-label {
    font-weight: 600;
    color: var(--text-primary);
}

.total-row .totals-value {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    color: var(--copper);
}

/* Notes Section */
.invoice-notes-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.notes-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    resize: vertical;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--copper);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

/* Editor Footer */
.invoice-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Danger Outline Button */
.btn-danger-outline {
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-danger-outline svg {
    width: 18px;
    height: 18px;
}

/* Invoice Editor Responsive */
@media (max-width: 900px) {
    .invoice-editor-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .invoice-billing-section {
        grid-template-columns: 1fr;
    }

    .billing-arrow {
        display: none;
    }

    .invoice-details-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .items-table-header,
    .items-table-row {
        grid-template-columns: 1fr 80px 100px 100px 40px;
        gap: 8px;
        padding: 12px 16px;
    }

    .item-desc-input {
        font-size: 0.85rem;
    }

    .item-qty-input,
    .item-rate-input {
        width: 60px;
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    .invoice-editor-footer {
        flex-direction: column;
        gap: 16px;
    }

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

    .footer-left .btn-danger-outline {
        width: 100%;
        justify-content: center;
    }

    .footer-right {
        flex-direction: column;
    }

    .footer-right .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .invoice-details-section {
        grid-template-columns: 1fr;
    }

    .items-table-header {
        display: none;
    }

    .items-table-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .item-col-desc {
        order: 1;
    }

    .item-col-qty,
    .item-col-rate,
    .item-col-amount {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .item-col-qty::before {
        content: 'Quantity:';
        font-size: 0.8rem;
        color: var(--text-tertiary);
    }

    .item-col-rate::before {
        content: 'Rate:';
        font-size: 0.8rem;
        color: var(--text-tertiary);
    }

    .item-col-amount::before {
        content: 'Amount:';
        font-size: 0.8rem;
        color: var(--text-tertiary);
    }

    .item-col-actions {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .items-table-row {
        position: relative;
    }

    .billing-edit-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Partner Editor Styles ===== */

/* Overlay */
.partner-editor-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.partner-editor-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Panel */
.partner-editor-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 680px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-editor-panel.open {
    transform: translateX(0);
}

/* Header */
.partner-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.partner-editor-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.partner-editor-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--copper);
    background: rgba(193, 127, 89, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    width: fit-content;
}

.partner-editor-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.partner-editor-close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.partner-editor-close:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.partner-editor-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* Body */
.partner-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Progress Steps */
.partner-form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.partner-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.partner-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-tertiary);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.partner-progress-step.active .partner-step-number {
    background: var(--copper);
    border-color: var(--copper);
    color: white;
}

.partner-progress-step.completed .partner-step-number {
    background: var(--status-completed);
    border-color: var(--status-completed);
    color: white;
}

.partner-step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.partner-progress-step.active .partner-step-label {
    color: var(--copper);
    font-weight: 600;
}

.partner-progress-step.completed .partner-step-label {
    color: var(--status-completed);
}

.partner-progress-line {
    width: 80px;
    height: 3px;
    background: var(--border-light);
    margin: 0 12px;
    margin-bottom: 24px;
    border-radius: 2px;
    overflow: hidden;
}

.partner-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--copper);
    transition: width 0.4s ease;
}

/* Form Steps */
.partner-form-step {
    display: none;
    animation: fadeSlideIn 0.35s ease;
}

.partner-form-step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Sections */
.partner-form-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 24px;
    margin-bottom: 20px;
}

.partner-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.partner-section-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.partner-section-icon svg {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
}

.partner-section-icon.copper {
    background: linear-gradient(135deg, rgba(193, 127, 89, 0.1), rgba(193, 127, 89, 0.05));
    border-color: rgba(193, 127, 89, 0.2);
}

.partner-section-icon.copper svg {
    color: var(--copper);
}

.partner-section-title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.partner-section-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Form Grid */
.partner-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.partner-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.partner-form-field.full-width {
    grid-column: 1 / -1;
}

.partner-form-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.partner-form-field label .required {
    color: #e53e3e;
}

.partner-form-field input,
.partner-form-field textarea,
.partner-form-field select {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.partner-form-field input:focus,
.partner-form-field textarea:focus,
.partner-form-field select:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

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

.field-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 44px;
    width: 100%;
}

/* Input with Prefix */
.input-with-prefix {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-white);
    transition: all var(--transition-fast);
}

.input-with-prefix:focus-within {
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.input-prefix {
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.input-with-prefix input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 0.9rem;
    background: transparent;
}

.input-with-prefix input:focus {
    outline: none;
    box-shadow: none;
}

/* Region Selector */
.partner-region-selector {
    display: flex;
    gap: 12px;
}

.partner-region-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.partner-region-btn:hover {
    border-color: var(--copper-light);
    background: rgba(193, 127, 89, 0.03);
}

.partner-region-btn.active {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.08);
    color: var(--copper-dark);
}

.partner-region-btn .region-flag {
    font-size: 1.2rem;
}

/* Tier Selector */
.partner-tier-selector {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.tier-option {
    flex: 1;
    cursor: pointer;
    display: flex;
}

.tier-option input[type="radio"] {
    display: none;
}

.tier-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    text-align: center;
    transition: all 0.2s ease;
    width: 100%;
}

.tier-option:hover .tier-content {
    border-color: var(--border-dark);
}

.tier-option input:checked + .tier-content {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.05);
}

.tier-option.premium input:checked + .tier-content {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.tier-content .standard-icon {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    stroke: var(--text-tertiary);
}

.tier-option input:checked + .tier-content .standard-icon {
    color: var(--copper);
    stroke: var(--copper);
}

.tier-content .premium-icon {
    width: 20px;
    height: 20px;
    color: #f59e0b;
    fill: #f59e0b;
    stroke: #f59e0b;
}

.tier-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.tier-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Avatar Preview */
.partner-avatar-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.avatar-preview-circle {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.avatar-preview-circle svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.avatar-preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.avatar-preview-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.avatar-preview-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Pricing Grid */
.partner-pricing-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-option {
    cursor: pointer;
}

.pricing-option input[type="radio"] {
    display: none;
}

.pricing-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    transition: all 0.2s ease;
}

.pricing-option:hover .pricing-card {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.pricing-option input:checked + .pricing-card {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.04);
}

.pricing-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pricing-icon svg {
    width: 22px;
    height: 22px;
    color: var(--text-tertiary);
}

.pricing-option input:checked + .pricing-card .pricing-icon {
    background: rgba(193, 127, 89, 0.12);
}

.pricing-option input:checked + .pricing-card .pricing-icon svg {
    color: var(--copper);
}

.pricing-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pricing-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.pricing-desc {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.pricing-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-badge.default {
    background: rgba(74, 123, 189, 0.1);
    color: var(--status-scheduled);
}

/* Footer */
.partner-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.footer-step-indicator {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-tertiary);
}

.footer-actions {
    display: flex;
    gap: 12px;
}

/* Partner Editor Responsive */
@media (max-width: 768px) {
    .partner-editor-panel {
        width: 100%;
    }

    .partner-form-progress {
        padding: 16px;
    }

    .partner-progress-line {
        width: 40px;
        margin: 0 8px;
    }

    .partner-step-label {
        font-size: 0.65rem;
    }

    .partner-form-grid {
        grid-template-columns: 1fr;
    }

    .partner-region-selector {
        flex-direction: column;
    }

    .partner-tier-selector {
        flex-direction: column;
    }

    .partner-editor-footer {
        flex-direction: column;
        gap: 16px;
    }

    .footer-step-indicator {
        order: 2;
    }

    .footer-actions {
        width: 100%;
        flex-direction: column;
    }

    .footer-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .partner-editor-body {
        padding: 16px;
    }

    .partner-form-section {
        padding: 16px;
    }

    .partner-section-header {
        flex-direction: column;
        text-align: center;
    }

    .partner-section-icon {
        margin: 0 auto;
    }

    .pricing-card {
        flex-direction: column;
        text-align: center;
    }

    .pricing-badge {
        align-self: center;
    }
}

/* ===== Job Selector Panel (Create Invoice from Multiple Jobs) ===== */
.job-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.job-selector-overlay.open {
    opacity: 1;
    visibility: visible;
}

.job-selector-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-selector-panel.open {
    transform: translateX(0);
}

/* Panel Header */
.job-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-white);
    flex-shrink: 0;
}

.job-selector-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-selector-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--copper) 0%, var(--copper-dark) 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    width: fit-content;
}

.job-selector-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.job-selector-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.job-selector-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.job-selector-close svg {
    width: 20px;
    height: 20px;
}

/* Panel Body */
.job-selector-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Sections */
.job-selector-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.job-selector-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.job-selector-step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--copper) 0%, var(--copper-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.job-selector-section-title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.job-selector-section-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Partner Select */
.job-selector-partner-select {
    position: relative;
}

.partner-select-wrapper {
    position: relative;
}

.partner-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.partner-select-trigger:hover {
    border-color: var(--copper);
}

.partner-select-wrapper.open .partner-select-trigger {
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.partner-select-trigger svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.partner-select-wrapper.open .partner-select-trigger svg {
    transform: rotate(180deg);
}

.partner-select-placeholder {
    color: var(--text-secondary);
}

.partner-select-wrapper.selected .partner-select-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.selected-partner-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--copper) 0%, var(--copper-dark) 100%);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.selected-partner-name {
    font-weight: 500;
}

/* Partner Dropdown */
.partner-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    max-height: 280px;
    overflow-y: auto;
}

.partner-select-wrapper.open .partner-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.partner-dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.partner-dropdown-option:hover {
    background: var(--bg-secondary);
}

.partner-option-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--copper) 0%, var(--copper-dark) 100%);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.partner-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.partner-option-name {
    font-weight: 500;
    color: var(--text-primary);
}

.partner-option-jobs {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.partner-dropdown-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-secondary);
}

.partner-dropdown-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    color: var(--copper);
}

.partner-dropdown-empty p {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.partner-dropdown-empty span {
    font-size: 0.85rem;
}

/* Jobs List */
.job-selector-jobs-list {
    max-height: 400px;
    overflow-y: auto;
}

.job-selector-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
}

.job-selector-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--border-medium);
}

.job-selector-empty-state p {
    color: var(--text-primary);
    font-weight: 500;
}

/* Select All */
.job-selector-select-all {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.job-select-all-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.job-select-all-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--copper);
    cursor: pointer;
}

.job-select-all-checkbox span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Job Card */
.job-selector-job-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.job-selector-job-card:hover {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.02);
}

.job-selector-job-card.selected {
    border-color: var(--copper);
    background: rgba(193, 127, 89, 0.05);
    box-shadow: 0 0 0 2px rgba(193, 127, 89, 0.1);
}

.job-card-checkbox {
    flex-shrink: 0;
}

.job-card-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--copper);
    cursor: pointer;
}

.job-card-content {
    flex: 1;
    min-width: 0;
}

.job-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.job-card-id {
    font-weight: 600;
    color: var(--copper);
    font-size: 0.9rem;
}

.job-card-type {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.job-card-type.installation {
    background: rgba(74, 123, 189, 0.1);
    color: var(--status-scheduled);
}

.job-card-type.repair {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.job-card-type.maintenance {
    background: rgba(90, 154, 110, 0.1);
    color: var(--status-completed);
}

.job-card-type.inspection {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.job-card-equipment {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.job-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-card-date svg {
    width: 12px;
    height: 12px;
}

.job-card-hours,
.job-card-km {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

.job-card-amount {
    font-weight: 700;
    color: var(--copper);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Panel Footer */
.job-selector-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.job-selector-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.job-selector-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.job-selector-total {
    font-weight: 700;
    color: var(--copper);
    font-size: 1.1rem;
}

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

.job-selector-actions .btn svg {
    width: 16px;
    height: 16px;
}

/* ===== Batch Send Modal ===== */
.batch-send-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.batch-send-overlay.open {
    opacity: 1;
    visibility: visible;
}

.batch-send-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    z-index: 1101;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.batch-send-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.batch-send-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.batch-send-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.batch-send-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.batch-send-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.batch-send-close svg {
    width: 18px;
    height: 18px;
}

.batch-send-body {
    padding: 24px;
}

.batch-send-intro {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.batch-send-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.batch-send-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.batch-send-item:last-child {
    border-bottom: none;
}

.batch-send-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.batch-send-item-id {
    font-weight: 600;
    color: var(--text-primary);
}

.batch-send-item-partner {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.batch-send-item-amount {
    font-weight: 600;
    color: var(--copper);
}

.batch-send-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.batch-send-total-value {
    font-weight: 700;
    color: var(--copper);
    font-size: 1.25rem;
}

.batch-send-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.batch-send-footer .btn svg {
    width: 16px;
    height: 16px;
}

/* ===== Invoice Selection Styles ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-all-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.select-all-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--copper);
    cursor: pointer;
}

.section-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.section-header-actions.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.selected-count {
    font-size: 0.85rem;
    color: var(--copper);
    font-weight: 500;
}

.section-header-actions .btn svg {
    width: 14px;
    height: 14px;
}

.invoice-row.selected {
    background: rgba(193, 127, 89, 0.05);
    border-left: 3px solid var(--copper);
}

/* Invoice Empty State */
.invoice-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-light);
}

.invoice-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(90, 154, 110, 0.15), rgba(90, 154, 110, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.invoice-empty-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--status-completed);
}

.invoice-empty-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.invoice-empty-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    max-width: 300px;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
    .job-selector-panel {
        width: 100%;
    }

    .job-selector-body {
        padding: 16px;
    }

    .job-selector-section {
        padding: 16px;
    }

    .job-selector-footer {
        flex-direction: column;
        gap: 16px;
    }

    .job-selector-summary {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .job-selector-actions {
        width: 100%;
    }

    .job-selector-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .batch-send-modal {
        max-width: calc(100% - 32px);
    }
}
