/* ============================================================================
   AMAZING ELECTRIC CRM - Dashboard Styles
   A modern, electric-themed design system
   ============================================================================ */

/* CSS Variables */
:root {
    /* Electric color palette */
    --electric-yellow: #FFD100;
    --electric-amber: #FFAA00;
    --electric-orange: #FF6B00;
    --deep-navy: #0A1628;
    --navy-800: #0F1D32;
    --navy-700: #152440;
    --navy-600: #1C2E52;
    --slate-400: #94A3B8;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --white: #FFFFFF;
    
    /* Status colors */
    --status-new: #22D3EE;
    --status-contacted: #A78BFA;
    --status-quoted: #FBBF24;
    --status-converted: #34D399;
    --status-archived: #6B7280;
    
    /* Functional colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    
    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 80px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 209, 0, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

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

body {
    font-family: var(--font-primary);
    background: var(--deep-navy);
    color: var(--slate-200);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--electric-yellow);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--electric-amber);
}

/* ============================================================================
   LUCIDE ICONS
   ============================================================================ */

svg[data-lucide] {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.logo-icon svg[data-lucide] {
    width: 28px;
    height: 28px;
    color: var(--electric-yellow);
    filter: drop-shadow(0 0 8px rgba(255, 209, 0, 0.6));
}

.nav-icon svg[data-lucide] {
    width: 20px;
    height: 20px;
}

.stat-icon svg[data-lucide] {
    width: 28px;
    height: 28px;
}

.user-avatar svg[data-lucide] {
    width: 24px;
    height: 24px;
    color: var(--slate-400);
}

.empty-icon svg[data-lucide] {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.flash-icon svg[data-lucide] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn svg[data-lucide] {
    width: 16px;
    height: 16px;
}

.btn-sm svg[data-lucide] {
    width: 14px;
    height: 14px;
}

.back-link svg[data-lucide] {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.toggle-btn svg[data-lucide] {
    width: 14px;
    height: 14px;
}

.login-logo svg[data-lucide] {
    width: 36px;
    height: 36px;
    color: var(--deep-navy);
}

/* ============================================================================
   SIDEBAR NAVIGATION
   ============================================================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--navy-800) 0%, var(--deep-navy) 100%);
    border-right: 1px solid var(--navy-600);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

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

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

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.02em;
}

.nav-links {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.nav-links li {
    margin-bottom: 4px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--slate-400);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.nav-links a:hover {
    background: var(--navy-600);
    color: var(--white);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--electric-yellow) 0%, var(--electric-amber) 100%);
    color: var(--deep-navy);
    box-shadow: var(--shadow-glow);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--navy-600);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-weight: 500;
    color: var(--white);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--navy-700);
    color: var(--slate-400);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.logout-btn svg[data-lucide] {
    width: 16px;
    height: 16px;
}

.logout-btn:hover {
    background: var(--error);
    color: var(--white);
}

/* ============================================================================
   MAIN CONTENT AREA
   ============================================================================ */

main {
    min-height: 100vh;
    padding: 32px;
}

main.with-sidebar {
    margin-left: var(--sidebar-width);
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.header-subtitle {
    color: var(--slate-400);
    font-size: 16px;
}

/* ============================================================================
   STATS CARDS
   ============================================================================ */

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

.stat-card {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-normal);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-700);
    border-radius: var(--radius-md);
    color: var(--slate-400);
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--slate-400);
    margin-top: 4px;
}

.stat-new .stat-icon { background: rgba(34, 211, 238, 0.15); color: var(--status-new); }
.stat-new .stat-value { color: var(--status-new); }

.stat-contacted .stat-icon { background: rgba(167, 139, 250, 0.15); color: var(--status-contacted); }
.stat-contacted .stat-value { color: var(--status-contacted); }

.stat-quoted .stat-icon { background: rgba(251, 191, 36, 0.15); color: var(--status-quoted); }
.stat-quoted .stat-value { color: var(--status-quoted); }

.stat-converted .stat-icon { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.stat-converted .stat-value { color: var(--status-converted); }

.stat-total .stat-icon { color: var(--slate-300); }

/* ============================================================================
   FILTERS BAR
   ============================================================================ */

.filters-bar {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    padding: 10px 14px;
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-sm);
    background: var(--navy-700);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 14px;
    min-width: 180px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-group select:hover,
.filter-group select:focus {
    border-color: var(--electric-yellow);
    outline: none;
}

/* ============================================================================
   DATA TABLE
   ============================================================================ */

.table-container {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.data-table thead {
    background: var(--navy-700);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--navy-600);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--navy-600);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: var(--navy-700);
}

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

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-email {
    font-size: 14px;
    color: var(--electric-yellow);
}

.contact-phone {
    font-size: 13px;
    color: var(--slate-400);
}

/* Service Badge */
.service-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--navy-600);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--slate-300);
}

/* Message Preview */
.message-preview {
    max-width: 250px;
    font-size: 13px;
    color: var(--slate-400);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status Select */
.status-form {
    margin: 0;
}

.status-select {
    padding: 6px 10px;
    border: 2px solid transparent;
    border-radius: 20px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.status-select:focus {
    outline: none;
}

.status-new {
    background: rgba(34, 211, 238, 0.15);
    color: var(--status-new);
    border-color: var(--status-new);
}

.status-contacted {
    background: rgba(167, 139, 250, 0.15);
    color: var(--status-contacted);
    border-color: var(--status-contacted);
}

.status-quoted {
    background: rgba(251, 191, 36, 0.15);
    color: var(--status-quoted);
    border-color: var(--status-quoted);
}

.status-converted {
    background: rgba(52, 211, 153, 0.15);
    color: var(--status-converted);
    border-color: var(--status-converted);
}

.status-archived {
    background: rgba(107, 114, 128, 0.15);
    color: var(--status-archived);
    border-color: var(--status-archived);
}

/* Date Display */
.date-display {
    font-size: 13px;
    color: var(--slate-400);
}

.date-display small {
    color: var(--slate-400);
    opacity: 0.7;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--electric-yellow) 0%, var(--electric-amber) 100%);
    color: var(--deep-navy);
    box-shadow: 0 2px 8px rgba(255, 209, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 209, 0, 0.4);
}

.btn-secondary {
    background: var(--navy-600);
    color: var(--slate-300);
}

.btn-secondary:hover {
    background: var(--navy-700);
    color: var(--white);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid var(--error);
}

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

.btn-ghost {
    background: transparent;
    color: var(--slate-400);
    padding: 6px 10px;
}

.btn-ghost:hover {
    background: var(--navy-600);
    color: var(--white);
}

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

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
}

/* Add Service Card */
.add-service-card {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
    border-color: var(--navy-600);
}

.add-service-form .form-row {
    display: flex;
    gap: 12px;
}

.add-service-form .form-input {
    flex: 1;
}

/* ============================================================================
   FORMS
   ============================================================================ */

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-300);
    margin-bottom: 8px;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-sm);
    background: var(--navy-700);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--electric-yellow);
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15);
}

.form-input::placeholder,
input::placeholder {
    color: var(--slate-400);
}

/* Inline Forms */
.inline-form {
    display: inline;
}

.inline-edit-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-input {
    background: transparent;
    border: 1px solid transparent;
    padding: 8px 12px;
    color: var(--white);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.inline-input:hover,
.inline-input:focus {
    background: var(--navy-700);
    border-color: var(--navy-600);
}

/* ============================================================================
   TOGGLE BUTTON
   ============================================================================ */

.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 2px solid var(--navy-600);
    border-radius: 20px;
    background: var(--navy-700);
    color: var(--slate-400);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-btn.active {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.toggle-btn:hover {
    background: var(--navy-600);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--slate-400);
}

.empty-state h3 {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--slate-400);
}

/* ============================================================================
   FLASH MESSAGES
   ============================================================================ */

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

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.flash span {
    flex: 1;
}

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

.flash-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.flash-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.flash-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--info);
    color: var(--info);
}

.flash-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    padding: 0;
}

.flash-close svg[data-lucide] {
    width: 18px;
    height: 18px;
}

.flash-close:hover {
    opacity: 1;
}

/* ============================================================================
   CODE/SLUG DISPLAY
   ============================================================================ */

.slug-display {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--slate-400);
    background: var(--navy-700);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.lead-count {
    font-size: 13px;
    color: var(--slate-400);
}

/* ============================================================================
   DEV TOOLS
   ============================================================================ */

.dev-tools {
    margin-bottom: 24px;
}

/* ============================================================================
   INACTIVE ROW
   ============================================================================ */

.inactive-row {
    opacity: 0.6;
}

.inactive-row:hover {
    opacity: 1;
}

/* ============================================================================
   LOGIN PAGE
   ============================================================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--deep-navy);
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 1;
}

.login-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(255, 209, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 107, 0, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--deep-navy) 0%, var(--navy-800) 100%);
    z-index: 0;
}

.login-card {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 420px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--electric-yellow) 0%, var(--electric-orange) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}


.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--slate-400);
    font-size: 15px;
}

.login-form {
    margin-bottom: 24px;
}

.login-footer {
    text-align: center;
}

.login-footer p {
    font-size: 13px;
    color: var(--slate-400);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left var(--transition-normal);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    main.with-sidebar {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .add-service-form .form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    main {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header h1 {
        font-size: 24px;
    }
}

/* ============================================================================
   DASHBOARD HEADER WITH ACTIONS
   ============================================================================ */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.header-content {
    flex: 1;
}

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

.back-link {
    display: inline-block;
    font-size: 14px;
    color: var(--slate-400);
    margin-bottom: 8px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--electric-yellow);
}

/* ============================================================================
   REVENUE DISPLAY
   ============================================================================ */

.stat-revenue .stat-icon {
    background: rgba(255, 209, 0, 0.15);
    color: var(--electric-yellow);
}

.stat-revenue .stat-value {
    color: var(--electric-yellow);
}

.revenue-display {
    font-weight: 600;
    color: var(--slate-400);
}

.revenue-display.has-revenue {
    color: var(--success);
}

/* ============================================================================
   JOB COUNT BADGE
   ============================================================================ */

.job-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--navy-600);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-300);
}

.job-count {
    font-size: 13px;
    color: var(--slate-400);
}

/* ============================================================================
   ARCHIVED SECTION
   ============================================================================ */

.archived-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--navy-600);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--slate-300);
    margin-bottom: 8px;
}

.section-title svg[data-lucide] {
    width: 20px;
    height: 20px;
    color: var(--slate-400);
}

.section-description {
    font-size: 14px;
    color: var(--slate-400);
    margin-bottom: 20px;
}

.archived-table {
    opacity: 0.8;
}

.archived-row {
    background: rgba(107, 114, 128, 0.05);
}

.archived-row td {
    color: var(--slate-400);
}

/* ============================================================================
   CLICKABLE TABLE ROWS
   ============================================================================ */

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: var(--navy-700) !important;
}

/* ============================================================================
   FORM CONTAINER & SECTIONS
   ============================================================================ */

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

.form-section {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--navy-600);
}

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

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

.form-group.flex-grow {
    flex: 2;
}

.required {
    color: var(--error);
}

textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-sm);
    background: var(--navy-700);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: all var(--transition-fast);
}

textarea:focus {
    outline: none;
    border-color: var(--electric-yellow);
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15);
}

textarea::placeholder {
    color: var(--slate-400);
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-sm);
    background: var(--navy-700);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

select:focus {
    outline: none;
    border-color: var(--electric-yellow);
}

input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-sm);
    background: var(--navy-700);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

input[type="tel"]:focus {
    outline: none;
    border-color: var(--electric-yellow);
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.form-actions-inline {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.customer-form {
    margin: 0;
}

/* ============================================================================
   PROFILE PAGE LAYOUT
   ============================================================================ */

.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-sidebar .card {
    margin-bottom: 16px;
}

.profile-main {
    min-width: 0;
}

.stats-small {
    grid-template-columns: repeat(3, 1fr);
}

.stats-small .stat-card {
    padding: 16px;
}

.stats-small .stat-icon {
    width: 44px;
    height: 44px;
}

.stats-small .stat-icon svg[data-lucide] {
    width: 22px;
    height: 22px;
}

.stats-small .stat-value {
    font-size: 22px;
}

/* ============================================================================
   CUSTOMER DETAILS CARD
   ============================================================================ */

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

.card-header h3 {
    margin: 0;
    padding: 0;
    border: none;
}

.customer-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 14px;
    color: var(--white);
}

.detail-value.notes-text {
    color: var(--slate-300);
    font-style: italic;
}

.customer-edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-edit-form .form-group {
    margin-bottom: 0;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   DANGER ZONE
   ============================================================================ */

.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.danger-zone h4 {
    font-size: 14px;
    color: var(--error);
    margin-bottom: 12px;
}

/* ============================================================================
   ADD JOB CARD
   ============================================================================ */

.add-job-card {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
}

.add-job-form .form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.add-job-form .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 12px;
}

.add-job-form .form-group label {
    font-size: 11px;
    margin-bottom: 6px;
}

.add-job-form .form-group input,
.add-job-form .form-group select {
    padding: 10px 12px;
    font-size: 13px;
}

/* ============================================================================
   JOB CARDS
   ============================================================================ */

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

.job-card {
    background: var(--navy-700);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-md);
    padding: 16px;
    border-left: 4px solid var(--slate-400);
}

.job-card.job-status-inquiry {
    border-left-color: var(--status-new);
}

.job-card.job-status-scheduled {
    border-left-color: var(--info);
}

.job-card.job-status-in-progress {
    border-left-color: var(--warning);
}

.job-card.job-status-completed {
    border-left-color: var(--success);
}

.job-card.job-status-cancelled {
    border-left-color: var(--status-archived);
    opacity: 0.7;
}

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

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

.job-date {
    font-size: 12px;
    color: var(--slate-400);
}

.job-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-400);
}

.job-amount.has-amount {
    color: var(--success);
}

.job-message {
    font-size: 13px;
    color: var(--slate-400);
    margin-bottom: 12px;
    padding: 10px;
    background: var(--navy-800);
    border-radius: var(--radius-sm);
}

.job-message strong {
    color: var(--slate-300);
}

.job-edit-form {
    margin: 0;
}

.job-edit-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

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

.form-group-inline label {
    font-size: 10px;
    font-weight: 600;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.amount-input {
    width: 100px;
    padding: 8px 10px !important;
    font-size: 13px !important;
}

.job-status-select {
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-width: 120px;
}

.notes-input {
    padding: 8px 10px !important;
    font-size: 13px !important;
}

.job-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

/* ============================================================================
   EMPTY STATE VARIANTS
   ============================================================================ */

.empty-state.small {
    padding: 30px 20px;
}

.empty-state.small .empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.empty-state.small p {
    font-size: 14px;
}

/* ============================================================================
   RESPONSIVE - PROFILE PAGE
   ============================================================================ */

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-small {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-small {
        grid-template-columns: 1fr;
    }
    
    .job-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .job-edit-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .job-actions {
        margin-left: 0;
        justify-content: flex-end;
    }
    
    .amount-input {
        width: 100%;
    }
}

