@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Poppins:wght@400;500&display=swap');

:root {
    --bg-primary: #f4f4f2; --bg-secondary: #ffffff; --bg-tertiary: #e9e9e7;
    --text-primary: #2a3a3c; --text-secondary: #586466;
    --color-accent: #c4a98a; --color-header-bg: #2a3a3c; --color-header-text: #ffffff;
    --shadow: 0 4px 15px rgba(42, 58, 60, 0.08);
    
    /* Status Colors */
    --status-active-bg: #d4edda; --status-active-text: #155724;
    --status-service-bg: #cce5ff; --status-service-text: #004085;
    --status-sold-bg: #f8d7da; --status-sold-text: #721c24;
    --status-client-bg: #e2e3e5; --status-client-text: #383d41;

    /* Toast Colors */
    --toast-bg: #333; --toast-text: #fff; --toast-success: #28a745; --toast-error: #dc3545; --toast-info: #17a2b8;
}

body.dark-mode {
    --bg-primary: #202b2d; --bg-secondary: #2a3a3c; --bg-tertiary: #34474a;
    --text-primary: #f0f0f0; --text-secondary: #a0b0b3;
    --color-accent: #c4a98a; --color-header-bg: #1a2223; --color-header-text: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    
    --status-active-bg: #20442c; --status-active-text: #7ee89d;
    --status-service-bg: #203c54; --status-service-text: #73baff;
    --status-sold-bg: #495057; --status-sold-text: #ff8e99;
    --status-client-bg: #3a3f44; --status-client-text: #d1d2d3;
}

body.dark-mode .guest-price, body.dark-mode .card-footer { color: var(--color-accent) !important; }

body { font-family: 'Poppins', sans-serif; background-color: var(--bg-primary); color: var(--text-primary); transition: background-color 0.3s, color 0.3s; margin: 0; padding: 0; box-sizing: border-box; }
h1, h2, h3, h4, h5, h6, .btn, .submit-btn, .status-dropdown, .status-badge { font-family: 'Montserrat', sans-serif; font-weight: 600; }
.hidden { display: none !important; }
* { box-sizing: border-box; }
.btn { cursor: pointer; border-radius: 8px; border: none; padding: 10px 15px; font-weight: 600; transition: transform 0.2s; }
.btn:hover { transform: translateY(-2px); }

/* Filter Chips */
.filter-chips-container { display: flex; gap: 8px; overflow-x: auto; padding: 5px 0 15px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-chips-container::-webkit-scrollbar { display: none; }
.filter-chip { padding: 8px 16px; background-color: var(--bg-secondary); border: 1px solid var(--bg-tertiary); border-radius: 20px; color: var(--text-secondary); cursor: pointer; white-space: nowrap; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; box-shadow: var(--shadow); }
.filter-chip:hover { background-color: var(--bg-tertiary); transform: translateY(-1px); }
.filter-chip.active { background-color: var(--color-accent); color: white; border-color: var(--color-accent); }

/* TAB NAVIGATION (Admin only now) */
.tabs-container { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--bg-tertiary); overflow-x: auto; padding-bottom: 0; -webkit-overflow-scrolling: touch; }
.tab-btn { background: none; border: none; padding: 10px 15px; font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.tab-btn:hover { color: var(--text-primary); background-color: var(--bg-tertiary); border-radius: 8px 8px 0 0; }
.tab-btn.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* --- GUEST FLOATING NAVIGATION --- */
#guest-nav {
    position: fixed;
    top: 75px; 
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-secondary);
    padding: 8px 15px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    gap: 10px;
    z-index: 990; 
    border: 1px solid var(--bg-tertiary);
    width: max-content;
}

body.dark-mode #guest-nav { box-shadow: 0 10px 30px rgba(0,0,0,0.6); }

#guest-nav .tab-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#guest-nav .tab-btn.active {
    background-color: var(--color-accent);
    color: #ffffff;
}

/* Add padding to the top of main content to prevent the floating nav from covering items */
body.guest-mode main { padding-top: 60px; }

/* Header Layout */
header { background-color: var(--color-header-bg); color: var(--color-header-text); padding: 0.5rem 1rem; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.header-content { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; width: 100%; max-width: 1400px; margin: 0 auto; }
.header-left { justify-self: start; display: flex; align-items: center; }
.header-center { justify-self: center; text-align: center; }
.header-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.logo-container { height: 40px; display: flex; align-items: center; }
#header-logo { height: 100%; width: auto; max-height: 40px; }
.dev-notice { font-size: 0.9rem; font-weight: 700; color: #ffd700; text-transform: uppercase; letter-spacing: 0.5px; }
.user-info-display { font-size: 0.9rem; margin-right: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.header-right button { background: rgba(255,255,255,0.1); border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.header-right button:hover { background: rgba(255,255,255,0.2); }

main { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }

/* Controls Layout */
.main-controls { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.controls-row { display: flex; gap: 1rem; width: 100%; flex-wrap: wrap; margin-bottom: 0.5rem; }
.action-row { display: flex; gap: 1rem; margin-top: 0.5rem; }
.search-container { flex: 2; position: relative; min-width: 200px; }
.sort-container { flex: 1; min-width: 180px; }
.search-container .fa-search { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
#search-bar, #sort-by { width: 100%; padding: 12px 15px 12px 40px; border-radius: 8px; border: 1px solid var(--bg-tertiary); background-color: var(--bg-secondary); color: var(--text-primary); font-size: 1rem; box-shadow: var(--shadow); }
#sort-by { padding-left: 15px; }

/* Analytics */
.analytics-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.analytic-card { background: var(--bg-secondary); box-shadow: var(--shadow); border-radius: 12px; padding: 1.5rem; }
.analytic-card p { font-size: 2rem; font-weight: 700; color: var(--text-primary); }
.profit { color: #28a745 !important; }
.loss { color: #dc3545 !important; }

/* Grid & Cards (Showroom) */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1rem; min-height: 200px; }
.sale-card { background: var(--bg-secondary); display: flex; flex-direction: column; overflow: hidden; position: relative; border: 1px solid var(--bg-tertiary); border-radius: 12px; box-shadow: var(--shadow); transition: transform 0.2s; height: 100%; }
.sale-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.job-notification-badge { position: absolute; top: 10px; left: 10px; background: #dc3545; color: white; padding: 6px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; z-index: 10; display: flex; gap: 5px; animation: pulseBadge 2s infinite; }
.card-header { padding: 1.25rem; display: flex; gap: 1rem; border-bottom: 1px solid var(--bg-tertiary); justify-content: space-between; align-items: start; }
.header-info { flex: 1; overflow: hidden; }
.header-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.card-body { padding: 1.25rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-footer { background: var(--bg-primary); padding: 1rem; font-size: 1.5rem; font-weight: 700; text-align: right; border-top: 1px solid var(--bg-tertiary); color: var(--color-header-bg); }
.card-actions button { background: var(--bg-tertiary); color: var(--text-secondary); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: flex; justify-content: center; align-items: center; }
.card-actions button:hover { background: var(--color-accent); color: white; }

/* THE CAMPFIRE (News Feed) */
.campfire-container { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; padding-bottom: 50px; }
.feed-post { background: var(--bg-secondary); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--bg-tertiary); }
.feed-header { display: flex; align-items: center; padding: 15px; gap: 15px; border-bottom: 1px solid var(--bg-tertiary); }
.feed-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-primary); object-fit: contain; padding: 2px; }
.feed-meta { flex: 1; font-size: 0.9rem; line-height: 1.2; }
.feed-content-clickable { cursor: pointer; }
.feed-caption { padding: 15px; font-size: 1rem; white-space: pre-wrap; }
.feed-video-container { position: relative; width: 100%; background: #000; min-height: 300px; display: flex; justify-content: center; }
.video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; color: white; cursor: pointer; z-index: 10; transition: background 0.2s; }
.video-overlay:hover { background: rgba(0,0,0,0.1); }
.feed-carousel { width: 100%; aspect-ratio: 4/3; }
.feed-promo-card { display: flex; align-items: center; justify-content: space-between; padding: 15px; background: var(--bg-primary); border-top: 1px solid var(--bg-tertiary); cursor: pointer; transition: background 0.2s; }
.feed-promo-card:hover { background: var(--bg-tertiary); }
.promo-info { font-size: 0.9rem; }

/* Bulletin Detail Modal Styles */
.bulletin-detail-content { padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; }
#bulletin-detail-wrapper { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.bd-header { display: flex; align-items: center; padding: 15px; gap: 15px; border-bottom: 1px solid var(--bg-tertiary); background: var(--bg-secondary); position: sticky; top: 0; z-index: 10; }
.bd-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--bg-primary); padding: 2px; }
.bd-body { padding: 20px; font-size: 1.1rem; line-height: 1.6; white-space: pre-wrap; }
.bd-media-container { width: 100%; background: #000; }
.bd-carousel { width: 100%; aspect-ratio: auto; min-height: 300px; }
.bd-carousel img { position: relative; opacity: 1; display: none; width: 100%; height: auto; }
.bd-carousel img.active { display: block; }
.bd-footer { padding: 20px; background: var(--bg-primary); border-top: 1px solid var(--bg-tertiary); }
.bd-promo-card { display: flex; align-items: center; padding: 15px; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--bg-tertiary); cursor: pointer; transition: transform 0.2s; }
.bd-promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Image Carousels */
.image-thumbnail-wrapper { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-tertiary); }
.image-thumbnail-wrapper img { transition: transform 0.3s ease; }
.sale-card:hover .image-thumbnail-wrapper img { transform: scale(1.05); }
.image-carousel { width: 100%; aspect-ratio: 16/10; position: relative; background: var(--bg-tertiary); }
.image-carousel img { width: 100%; height: 100%; object-fit: cover; position: absolute; opacity: 0; transition: opacity 0.5s; cursor: pointer; }
.image-carousel img.active { opacity: 1; }
.carousel-nav { position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; padding: 0 1rem; opacity: 0; transition: opacity 0.2s; transform: translateY(-50%); pointer-events: none; }
.image-carousel:hover .carousel-nav { opacity: 1; }
.carousel-nav button { background: rgba(0,0,0,0.5); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; pointer-events: auto; }

/* Install & WhatsApp */
.install-app-btn { background-color: var(--color-accent); color: white; border: none; padding: 12px 24px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 15px rgba(196, 169, 138, 0.4); animation: pulseBadge 3s infinite; transition: transform 0.2s; }
.install-app-btn:hover { background-color: #a88e70; transform: translateY(-2px); }
.header-action-btn { background: none; border: 2px solid var(--color-accent); color: var(--color-accent); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; margin-right: 10px; }
.guest-button-group { display: flex; gap: 10px; margin-top: auto; }
.whatsapp-btn { flex: 2; background-color: #25D366; color: white; border: none; padding: 12px; border-radius: 8px; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 600; transition: background 0.2s; }
.whatsapp-btn:hover { background-color: #128C7E; transform: translateY(-2px); }
.share-btn { flex: 1; background-color: var(--bg-tertiary); color: var(--text-primary); border: none; padding: 12px; border-radius: 8px; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; transition: background 0.2s; }
.share-btn:hover { background-color: var(--color-accent); color: white; transform: translateY(-2px); }

/* Towing Buttons & Badges */
.tow-check-btn { width: 100%; margin: 10px 0; background-color: #2a3a3c; color: #ffffff; padding: 12px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.2s, background 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.tow-check-btn:hover { background-color: #1a2223; transform: translateY(-2px); }
.spec-badge { background: var(--bg-tertiary); color: var(--text-secondary); padding: 5px 10px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }

/* Loader */
#app-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-primary); z-index: 9999; display: flex; justify-content: center; align-items: center; flex-direction: column; transition: opacity 0.5s ease-out; }
#app-loader.fade-out { opacity: 0; pointer-events: none; }
.loader-logo { width: 150px; margin-bottom: 2rem; animation: pulse 2s infinite; }
.spinner { width: 50px; height: 50px; border: 5px solid var(--bg-tertiary); border-top: 5px solid var(--color-accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1rem auto; }
.loader-tooltip { margin-top: 15px; font-size: 0.95rem; font-weight: 600; color: var(--color-accent); text-align: center; max-width: 80%; transition: opacity 0.3s; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulseBadge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* Login & Admin */
#auth-container { display: none; }
#auth-container.active { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; background-color: var(--color-header-bg); }
.login-box { background-color: var(--bg-secondary); padding: 2.5rem; border-radius: 12px; width: 100%; max-width: 400px; text-align: center; }
.login-logo { height: 120px; width: auto; margin-bottom: 1rem; }
.guest-btn { background: transparent; color: var(--text-secondary); border: 1px solid var(--text-secondary); width: 100%; padding: 12px; margin-top: 1rem; border-radius: 8px; cursor: pointer; }
.submit-btn { background-color: var(--color-header-bg); color: var(--color-header-text); width: 100%; padding: 12px; margin-top: 1.5rem; border-radius: 8px; cursor: pointer; border: none; }
.admin-login-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--bg-tertiary); }
.admin-toggle-btn { background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); width: 100%; padding: 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.admin-form-container { margin-top: 1rem; padding: 1rem; background: var(--bg-primary); border-radius: 8px; }
.guest-mode-indicator { background-color: #ffd700; color: #000; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; margin-left: 0; font-weight: bold; }

/* Guest Specifics */
body.guest-mode .card-footer, body.guest-mode .header-controls, body.guest-mode .action-row { display: none; }
.guest-card { border: 2px solid var(--color-accent); }
.guest-card::before { content: "Available"; position: absolute; top: 10px; right: 10px; background: var(--color-accent); color: white; padding: 4px 8px; border-radius: 4px; font-weight: bold; z-index: 1; }
.guest-price-section { text-align: center; border-top: 2px solid var(--color-accent); padding-top: 1rem; margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.guest-price { font-size: 1.5rem; font-weight: bold; color: var(--color-header-bg); }

/* Status & Other */
.status-dropdown { padding: 8px; border-radius: 14px; font-size: 0.75rem; font-weight: bold; }
.status-active { background: var(--status-active-bg); color: var(--status-active-text); }
.status-in-service { background: var(--status-service-bg); color: var(--status-service-text); }
.status-sold { background: var(--status-sold-bg); color: var(--status-sold-text); }
.status-client { background: var(--status-client-bg); color: var(--status-client-text); }

.job-item { display: flex; align-items: center; padding: 1rem; background: var(--bg-primary); border-radius: 8px; margin-bottom: 0.75rem; border-left: 4px solid var(--bg-tertiary); }
.priority-High { border-left-color: #dc3545; }
.status-Done { opacity: 0.6; text-decoration: line-through; }
.expense-row { display: flex; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px dashed var(--bg-tertiary); font-size: 0.9rem; }
.expense-row small { background: var(--bg-tertiary); padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; margin-right: 8px; }

/* Modals */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); overflow: auto; }
.modal-content { margin: 5% auto; padding: 2rem; width: 90%; max-width: 500px; background: var(--bg-secondary); border-radius: 12px; position: relative; }
.close-btn { position: absolute; top: 15px; right: 15px; font-size: 24px; cursor: pointer; color: var(--text-secondary); }
.form-group { margin-bottom: 1.25rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid var(--bg-tertiary); border-radius: 6px; }

/* Floating Close Button */
.floating-close-btn { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); color: white; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; z-index: 1002; display: none; align-items: center; justify-content: center; padding: 0; }
body.guest-mode .floating-close-btn { display: flex; }
body.guest-mode #close-card-detail { display: none; }

/* FULLSCREEN MODAL OVERRIDES */
#fullscreen-image-modal, #fullscreen-video-modal { background-color: rgba(0, 0, 0, 0.95); }
#fullscreen-image-modal .modal-content, #fullscreen-video-modal .modal-content { background-color: transparent; box-shadow: none; border: none; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; }
#fullscreen-image-container { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; position: relative; }
#fullscreen-image-wrapper { position: relative; max-width: 90vw; max-height: 85vh; display: flex; justify-content: center; align-items: center; }
#fs-image { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 4px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); }
#close-fullscreen, #close-fullscreen-video { position: absolute; top: 20px; right: 20px; color: white; background: rgba(255, 255, 255, 0.1); z-index: 1001; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.5rem; transition: background 0.3s; }
#close-fullscreen:hover, #close-fullscreen-video:hover { background: rgba(255, 255, 255, 0.3); }
.fs-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.1); border: none; color: white; padding: 1rem; cursor: pointer; z-index: 1001; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; transition: background 0.3s; }
.fs-nav-btn:hover { background: rgba(255, 255, 255, 0.3); }
#fs-prev { left: 20px; }
#fs-next { right: 20px; }
.fs-indicator { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); color: white; font-family: 'Montserrat', sans-serif; font-size: 1rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* JOB MODAL LAYOUT */
.job-modal-content { max-width: 800px; }
.job-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.job-section-tasks, .job-section-print { display: flex; flex-direction: column; }
.job-section-tasks h3, .job-section-print h3 { font-size: 1rem; border-bottom: 2px solid var(--bg-tertiary); padding-bottom: 5px; margin-bottom: 15px; color: var(--text-secondary); }
.form-group.small { margin-bottom: 0.8rem; }
.form-group.small label { font-size: 0.8rem; margin-bottom: 2px; display: block; }
.form-group.small input, .form-group.small select { padding: 6px; font-size: 0.9rem; }
@media (max-width: 768px) { .job-modal-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* PRINT STYLES */
#print-area { position: absolute; left: -9999px; top: 0; width: 210mm; background: white; color: black; z-index: -1; }

.contract-page { width: 210mm; min-height: 297mm; padding: 15mm; font-family: 'Arial', sans-serif; font-size: 12px; line-height: 1.4; background: white; }
.contract-header { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 15px; }
.logo-section img { height: 80px; }
.company-details { text-align: right; }
.company-title { font-size: 24px; font-weight: bold; text-transform: uppercase; }
.proforma-title { text-align: center; background: #333 !important; color: white !important; font-weight: bold; padding: 5px; margin: 10px 0; -webkit-print-color-adjust: exact; }
.invoice-number { color: red !important; font-size: 18px; font-weight: bold; text-align: right; margin-bottom: 10px; -webkit-print-color-adjust: exact; }
.section-box { border: 1px solid #000; margin-bottom: 10px; padding: 5px; }
.section-header { font-weight: bold; text-decoration: underline; margin-bottom: 5px; }
.input-line { border-bottom: 1px solid #ccc; display: inline-block; padding: 2px 5px; }
table.contract-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
table.contract-table th, table.contract-table td { border: 1px solid #000; padding: 4px; text-align: left; }
table.contract-table th { background-color: #f0f0f0 !important; -webkit-print-color-adjust: exact; }
.price-col { text-align: right; width: 100px; }
.signature-section { margin-top: 30px; display: flex; justify-content: space-between; }
.sig-box { width: 45%; border-top: 1px solid #000; padding-top: 5px; text-align: center; }

.job-card-page { width: 210mm; min-height: 297mm; background: white; padding: 0; font-family: 'Arial', sans-serif; color: #000; box-sizing: border-box; }
.jc-header { display: flex; justify-content: space-between; padding: 10mm 10mm 5mm 10mm; }
.jc-logo img { height: 80px; }
.jc-company-info { text-align: right; font-size: 11px; }
.jc-title-bar { background-color: #000; color: white; font-weight: bold; text-align: center; padding: 5px; margin: 5px 0 15px 0; font-size: 16px; text-transform: uppercase; -webkit-print-color-adjust: exact; }
.jc-row { display: flex; align-items: center; margin-bottom: 8px; padding: 0 10mm; font-size: 14px; }
.jc-label { margin-right: 5px; white-space: nowrap; }
.jc-line { border-bottom: 1px solid #666; flex-grow: 1; margin: 0 5px; height: 18px; position: relative; }
.jc-input-text { position: absolute; bottom: 2px; left: 5px; font-weight: bold; font-family: 'Courier New', monospace; }
.jc-card-num { font-size: 18px; font-weight: bold; margin-left: 10px; }
.jc-checkbox-row { display: flex; justify-content: space-between; padding: 10px 10mm; margin-bottom: 10px; font-size: 14px; }
.jc-checkbox-item { display: flex; align-items: center; gap: 8px; }
.jc-box { width: 16px; height: 16px; border: 1px solid #000; display: flex; align-items: center; justify-content: center; }
.jc-work-section { padding: 0 10mm; margin-top: 20px; }
.jc-work-title { font-size: 14px; margin-bottom: 10px; }
.jc-work-line { border-bottom: 1px solid #ccc; height: 30px; width: 100%; margin-bottom: 2px; position: relative; display: flex; align-items: flex-end; }
.jc-work-text { margin-left: 10px; margin-bottom: 4px; font-size: 14px; }

/* Image Manager Grid */
#image-manager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-bottom: 15px; }
.image-thumbnail-container { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--bg-tertiary); }
.image-thumbnail { width: 100%; height: 100%; object-fit: cover; }
.delete-image-btn { position: absolute; top: 5px; right: 5px; background: rgba(220, 53, 69, 0.9); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; cursor: pointer; font-size: 16px; }
.delete-image-btn:hover { background: #c82333; }

/* TOAST NOTIFICATIONS */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background-color: var(--toast-bg); color: var(--toast-text); padding: 12px 25px; border-radius: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 9999; display: flex; align-items: center; gap: 10px; animation: slideUp 0.3s ease-out forwards; }
.toast.fade-out { opacity: 0; transition: opacity 0.5s ease; }
.toast-success { background-color: var(--toast-success); }
.toast-error { background-color: var(--toast-error); }
.toast-info { background-color: var(--toast-info); }
@keyframes slideUp { from { bottom: -50px; opacity: 0; } to { bottom: 20px; opacity: 1; } }

/* TOWING ALERT STYLES */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 10px; border: 1px solid transparent; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.alert-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.alert-warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }

/* --- MOBILE TWEAKS --- */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    
    .header-content { grid-template-columns: 1fr auto 1fr; gap: 0.5rem; padding: 0.5rem; }
    .dev-notice { font-size: 0.75rem; }
    .controls-row { flex-direction: column; }
    .search-container, .sort-container { width: 100%; }
    .feed-video-container iframe { max-height: 400px; }
}