/* Nail & Hammer CRM — Mobile-first CSS — Dark Theme */

:root {
    --bg: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-elevated: #242424;
    --bg-input: #1e1e1e;
    --blue: #4a9eed;
    --blue-light: #5cb3ff;
    --blue-pale: rgba(74,158,237,0.12);
    --green: #4ade80;
    --green-pale: rgba(74,222,128,0.12);
    --orange: #fbbf24;
    --orange-pale: rgba(251,191,36,0.12);
    --red: #f87171;
    --red-pale: rgba(248,113,113,0.12);
    --gray-50: #141414;
    --gray-100: #1e1e1e;
    --gray-200: #2a2a2a;
    --gray-300: #333333;
    --gray-400: #666666;
    --gray-500: #888888;
    --gray-600: #aaaaaa;
    --gray-700: #cccccc;
    --gray-800: #e5e5e5;
    --text: #e5e5e5;
    --text-secondary: #999999;
    --border: #2a2a2a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
a, button, select, input, .btn, .nav-item, .list-item, .stat-card, .quick-action-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* Space for bottom nav + iPhone home bar */
    min-height: 100vh;
}

/* ── Flash messages ── */
.flash-container { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 8px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    animation: slideDown 0.3s ease;
}
.flash-success { background: var(--green-pale); color: var(--green); border: 1px solid rgba(74,222,128,0.3); }
.flash-error { background: var(--red-pale); color: var(--red); border: 1px solid rgba(248,113,113,0.3); }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Content ── */
.content { padding: 16px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); max-width: 600px; margin: 0 auto; }

/* ── Typography ── */
h1 { font-size: 22px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: var(--gray-700); }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.card-title { font-weight: 600; font-size: 15px; color: var(--text); }
.card-subtitle { font-size: 13px; color: var(--text-secondary); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    gap: 6px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #000; }
.btn-primary:hover { background: var(--blue-light); }
.btn-success { background: var(--green); color: #000; }
.btn-warning { background: var(--orange); color: #000; }
.btn-danger { background: var(--red); color: #000; }
.btn-secondary { background: var(--gray-300); color: var(--text); }
.btn-secondary:hover { background: var(--gray-400); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-block { display: flex; width: 100%; margin-bottom: 8px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px; /* Prevents zoom on iOS */
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text);
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
.form-control:focus {
    border-color: var(--blue);
    outline: none;
}
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    background-color: var(--bg-input);
}
textarea.form-control { min-height: 80px; resize: vertical; }

/* ── Status badges ── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-lead { background: var(--blue-pale); color: var(--blue); }
.badge-estimated { background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-quote_sent, .badge-quote-sent { background: rgba(251,191,36,0.15); color: #f59e0b; }
.badge-approved { background: #16a34a; color: #fff; font-weight: 600; }
.badge-scheduled { background: var(--orange-pale); color: var(--orange); }
.badge-in_progress, .badge-in-progress { background: rgba(251,146,60,0.15); color: #fb923c; }
.badge-completed { background: var(--green-pale); color: var(--green); }
.badge-invoiced, .badge-sent { background: rgba(56,189,248,0.15); color: #38bdf8; }
.badge-paid { background: var(--green-pale); color: var(--green); }
.badge-cancelled, .badge-void { background: rgba(100,100,100,0.2); color: var(--gray-500); }
.badge-draft { background: rgba(100,100,100,0.2); color: var(--text-secondary); }
.badge-overdue { background: var(--red-pale); color: var(--red); }
.badge-accepted { background: var(--green-pale); color: var(--green); }
.badge-declined, .badge-expired { background: var(--red-pale); color: var(--red); }

/* ── Lists ── */
.list-item {
    display: block;
    padding: 14px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.list-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.list-item:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: none; }
.list-item:only-child { border-radius: var(--radius); }
.list-item:active { background: var(--bg-elevated); }
.list-group {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.list-item-row { display: flex; justify-content: space-between; align-items: center; }
.list-item-title { font-weight: 500; font-size: 15px; color: var(--text); }
.list-item-title.unread { font-weight: 700; }
.list-item-desc { font-size: 13px; color: var(--gray-600); margin-top: 3px; line-height: 1.4; }
.list-item-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ── Detail view ── */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    min-height: 40px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-secondary); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; margin-right: 12px; flex-shrink: 0; }
.detail-value { font-weight: 500; text-align: right; max-width: 60%; word-break: break-word; color: var(--text); padding-left: 8px; }

/* ── Section headers ── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    margin-bottom: 8px;
}

/* ── Dashboard stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}
.stat-number { font-size: 28px; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Line items table ── */
.line-items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.line-items-table th {
    text-align: left;
    padding: 8px;
    background: var(--bg-elevated);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.line-items-table td { padding: 8px; border-bottom: 1px solid var(--border); color: var(--text); }
.line-items-table .text-right { text-align: right; }
.totals-row td { font-weight: 600; border-top: 2px solid var(--gray-400); }

/* ── Line item builder ── */
.line-item-row {
    display: grid;
    grid-template-columns: 1fr 50px 80px 40px;
    gap: 8px;
    margin-bottom: 8px;
    align-items: start;
}
.line-item-row input { padding: 10px 8px; font-size: 14px; }
.remove-item {
    background: var(--red-pale);
    color: var(--red);
    border: none;
    border-radius: var(--radius);
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
}

/* ── Bottom navigation ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 12px;
    -webkit-tap-highlight-color: transparent;
}
.nav-item svg { width: 22px; height: 22px; margin-bottom: 2px; }
.nav-item.active { color: var(--blue); }
.nav-item.nav-add svg {
    width: 28px;
    height: 28px;
    background: var(--blue);
    color: #000;
    border-radius: 50%;
    padding: 4px;
}
.nav-item.nav-add { color: var(--blue); }

/* ── Modal ── */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modal-content {
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    padding: 24px;
    width: 100%;
    max-width: 600px;
    animation: slideUp 0.25s ease;
    border-top: 1px solid var(--border);
}
.modal-content h3 { text-align: center; margin-bottom: 16px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ── Search bar ── */
.search-bar {
    position: relative;
    margin-bottom: 16px;
}
.search-bar input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text);
}
.search-bar input:focus { border-color: var(--blue); outline: none; }
.search-bar svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-500);
}

/* ── Filter tabs ── */
.filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.filter-tab {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    background: var(--gray-300);
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
}
.filter-tab.active { background: var(--blue); color: #000; }

/* ── Sort bar ── */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.sort-label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
}
.sort-option {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--border);
    background: transparent;
}
.sort-option.active {
    background: var(--blue-pale);
    color: var(--blue);
    border-color: var(--blue);
}

/* ── Stat card links ── */
.stats-grid a.stat-card {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}
.stats-grid a.stat-card:active {
    transform: scale(0.97);
    opacity: 0.8;
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; margin-bottom: 16px; }

/* ── Page header ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.page-header h1 { margin-bottom: 0; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* ── Login page ── */
/* Image-relative form positioning: real <img> + form positioned absolute
   inside a wrapper that matches the image's rendered bounds. Form lives in
   the gap between the HAMMER wordmark bottom (~67%) and the orange services
   icons (~78%) — center is ~74%. Image-relative percentages = same visual
   spot at any viewport size. */
body:has(.login-shell) {
    padding-bottom: 0;
    background: #0a0a0a;
}
.login-shell {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    overflow: hidden;
}
/* Wrapper sized to the image's rendered bounds. aspect-ratio matches the
   intrinsic 592x1280 of login-hero.jpg so wrapper height === rendered img
   height === percentages map onto image content. */
.login-image-wrap {
    position: relative;
    aspect-ratio: 592 / 1280;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;     /* fill viewport vertically; aspect-ratio sets width */
    width: auto;
    display: block;
}
.login-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.login-card {
    /* Gap zone tight: form sits centered between HAMMER and services icons. */
    --gap-y: 70%;
    position: absolute;
    top: var(--gap-y);
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(82%, 240px);
    padding: 2px 8px 3px;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    z-index: 2;
}
.login-form { width: 100%; }
.login-form .form-group { margin-bottom: 2px; }
.login-form .form-control {
    background: rgba(255, 248, 235, 0.97);
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;        /* prevents iOS zoom-on-focus */
    padding: 2px 8px;
    border-radius: 4px;
    height: auto;
    line-height: 1.15;
    width: 100%;
}
.login-form .form-control::placeholder {
    color: rgba(60, 60, 60, 0.6);
}
.login-form .form-control:focus {
    background: #fffaf0;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
    outline: none;
}
.login-form .btn-primary {
    background: var(--orange);
    color: #111;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
    padding: 3px;
    margin-top: 1px;
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 3px 8px rgba(251, 191, 36, 0.3);
    line-height: 1.2;
}
.login-form .btn-primary:hover { background: #ffd24a; }

/* Hide bottom nav padding on login page (no nav present anyway) */
body:has(.login-shell) main.content {
    padding: 0;
    max-width: none;
    margin: 0;
}

/* Desktop / wider: keep image-relative positioning. Bigger viewports just
   render the image bigger (constrained by 100vh) — form still tracks the
   gap zone since percentages are image-relative. */
@media (min-width: 820px) {
    .login-card {
        width: 220px;
        padding: 6px 8px;
    }
    .login-form .form-group { margin-bottom: 4px; }
    .login-form .form-control { font-size: 14px; padding: 5px 8px; }
    .login-form .btn-primary { font-size: 13px; padding: 6px; }
}

/* ── Utility ── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }

/* ── Links ── */
a.action-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

/* ── More menu ── */
.more-menu { position: relative; }
.more-menu-items {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 100;
    overflow: hidden;
    border: 1px solid var(--border);
}
.more-menu-items a, .more-menu-items button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: none;
    background: none;
    font-size: 14px;
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
}
.more-menu-items a:active, .more-menu-items button:active {
    background: var(--bg-card);
}

/* ── Quick action buttons (Call, Text, Navigate, etc.) ── */
.quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--blue);
    font-size: 12px;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s;
    border: 1px solid var(--border);
}
.quick-action-btn:active { transform: scale(0.95); }
.quick-action-btn svg { width: 24px; height: 24px; margin-bottom: 4px; }

/* ── Photo attachments ── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.photo-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
}
.photo-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: var(--bg-elevated);
    border: 2px dashed var(--gray-400);
    border-radius: var(--radius);
    color: var(--gray-500);
    cursor: pointer;
}
.photo-upload-btn svg { width: 32px; height: 32px; }

/* ── Calendar view ── */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.calendar-nav { display: flex; gap: 8px; }
.calendar-day {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.calendar-day-header {
    background: var(--blue-pale);
    padding: 8px 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--blue);
}
.calendar-day-header.today { background: var(--blue); color: #000; }
.calendar-event {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}
.calendar-event:last-child { border-bottom: none; }
.calendar-no-events { padding: 10px 12px; color: var(--gray-500); font-size: 13px; font-style: italic; }

/* ── AI Lead badge ── */
.badge-ai-lead {
    background: rgba(243, 156, 18, 0.18);
    color: #f39c12;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-ai-lead svg {
    width: 12px;
    height: 12px;
}

/* AI Leads section card styling */
.ai-lead-card {
    border-left: 3px solid #f39c12;
}

/* Call recording card */
.recording-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}
.recording-card svg {
    width: 32px;
    height: 32px;
    color: #f39c12;
    flex-shrink: 0;
}
.recording-card audio {
    width: 100%;
    height: 40px;
}
.recording-card .recording-info {
    flex: 1;
    min-width: 0;
}
.recording-card .recording-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

/* Auto-dismiss flash */
.flash { animation: slideDown 0.3s ease, fadeOut 0.5s ease 3s forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-20px); } }

/* ── Page loading overlay ── */
#page-loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s;
}
#page-loader.active {
    opacity: 1;
    pointer-events: auto;
}
.loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-400);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Estimate builder mobile fix ── */
@media (max-width: 480px) {
    .line-item-row {
        grid-template-columns: 1fr 1fr 40px;
        grid-template-rows: auto auto;
    }
    .line-item-row input:first-child {
        grid-column: 1 / -1;
    }
}
