:root {
    --primary: #7c3aed;
    --primary-light: #9333ea;
    --bg-sidebar: #f5f7fb;
    --bg-main: #f8fafc;
    --text-main: #111827;
    --text-muted: #6b7280;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
    --revenue: #16a34a;
    --pending: #dc2626;
    --border: #e2e8f0;
    --radius-md: 12px;
    --radius-lg: 16px;
    --input-height: 48px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f8f7ff; /* Polished light purple-gray */
    color: var(--text-main);
    min-height: 100vh;
    font-size: 14px;
}

/* 🏗️ POLISHED LAYOUT ARCHITECTURE */
.app-layout {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* Sidebar: Hidden on mobile, polished on desktop */
.sidebar {
    display: none !important;
}

@media (min-width: 1024px) {
    .sidebar {
        display: flex !important;
        width: 240px !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        background: #ffffff !important;
        border-right: 1px solid #e5e7eb !important;
        flex-direction: column !important;
        padding: 24px 0 !important;
        z-index: 100 !important;
        overflow-y: auto !important;
    }
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

@media (min-width: 1024px) {
    .main-wrapper {
        margin-left: 240px; /* Accounts for fixed sidebar */
        background: #f8f7ff;
    }
}

/* Header polishing */
.header {
    background: transparent;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 1024px) {
    .header {
        background: #ffffff;
        padding: 20px 32px;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 24px;
    }
    .header h1 {
        font-size: 28px !important;
        color: #1a1a2e !important;
    }
}

/* Mobile Bottom Nav */
.mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    justify-content: space-around;
    align-items: center;
}

@media (min-width: 1024px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Structural Overrides for Mobile */
@media screen and (max-width: 768px) {
    .main-wrapper {
        padding: 16px 16px 76px 16px;
        margin-left: 0 !important;
    }
}

/* 🚨 HARD OVERRIDE: Forcefully hide sidebar on mobile */
/* Cleanup old sidebar/content styles that are now handled by .app-layout */
/* 🎨 Sidebar Polish */
.sidebar-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: #7C3AED;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-bottom: 12px;
}

.sidebar-logo {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #7C3AED !important;
    letter-spacing: 0.5px !important;
    text-align: center;
    padding-left: 0 !important;
}

.sidebar-nav {
    flex: 1;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #4b5563;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: #f3f0ff;
    color: #7C3AED;
}

.nav-item.active {
    background-color: #ede9fe;
    color: #7C3AED;
}

.nav-item span:first-child {
    font-size: 18px;
}

/* Header button polish */
.header .btn-primary {
    background: #7C3AED !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25) !important;
    height: auto !important;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 20px !important;
    }
    .header .btn-primary {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 380px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header .btn-primary {
        width: 100%;
    }
}

/* Primary Action Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

@media (max-width: 1024px) {
    .desktop-only-submit { display: none !important; }
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    height: 42px;
}

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

/* Dashboard Grid Polish */
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .cards-grid {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 24px;
        padding: 0 32px 32px 32px;
    }
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: none;
    margin-bottom: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
}

/* Business Overview Stats */
.stats-grid-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    position: relative;
}

.stats-grid-mobile > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .stats-grid-mobile::after {
        content: "";
        position: absolute;
        top: 10%;
        bottom: 10%;
        left: 50%;
        width: 1px;
        background: #f3f4f6;
    }
}

.financial-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 8px !important;
}

.financial-value {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
}

/* Form Styling */
.form-section {
    margin-bottom: 32px;
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: block;
}

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

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select {
    width: 100%;
    height: var(--input-height);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 16px; /* Prevents iOS zoom */
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--white);
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Service Items Row (Flex) */
.items-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.item-field { flex: 1; }
.item-field.name { flex: 2.5; }
.item-field.qty { flex: 0.5; }
.item-field.price { flex: 1; }
.item-field.action { flex: 0.2; }

.btn-remove {
    height: 42px;
    width: 42px;
    border-radius: 8px;
    background-color: #fee2e2;
    color: #ef4444;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.btn-remove:hover {
    background-color: #fecaca;
}

.btn-add-item {
    margin-top: 16px;
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* Summary Box */
.summary-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
}

.summary-row.total {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

/* History Grid/List */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.invoice-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease;
}

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

.invoice-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #0f172a;
}

.invoice-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.invoice-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.invoice-amount {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}

/* Dashboard Specific Layouts */
.stats-grid-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#chartContainer {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#cashFlowChart {
    min-width: 300px;
}

.financial-summary-list {
    display: flex;
    flex-direction: column;
}

.financial-item {
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

/* Quick Action Buttons */
.btn-action-primary {
    width: 100%;
    background: #7C3AED;
    color: #ffffff;
    border-radius: 10px;
    padding: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
}
.btn-action-primary:hover {
    background: #6d28d9;
}

.btn-action-secondary {
    width: 100%;
    background: #f9fafb;
    color: #1a1a2e;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
}
.btn-action-secondary:hover {
    background: #f3f4f6;
}

.financial-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.financial-value {
    font-size: 24px;
    font-weight: 800;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .mobile-nav { display: none; }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    gap: 2px;
    flex: 1;
    height: 100%;
    min-width: 60px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item span:first-child {
    font-size: 20px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* Accordion Sections */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
    user-select: none;
}

.accordion-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accordion-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.form-section.collapsed .form-grid,
.form-section.collapsed .items-container,
.form-section.collapsed .helper-text,
.form-section.collapsed .btn-add-item {
    display: none !important;
}

.form-section.collapsed .accordion-icon {
    transform: rotate(-90deg);
}

/* Mobile Service Item Card */
@media (max-width: 640px) {
    .item-row {
        display: grid;
        grid-template-columns: 1fr;
        background: #f8fafc;
        border: 1px solid var(--border);
        padding: 16px;
        border-radius: var(--radius-md);
        gap: 16px;
        position: relative;
    }

    .item-field.name { grid-column: 1 / -1; }
    
    .item-field.qty-price-container {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .qty-selector {
        display: flex;
        align-items: center;
        background: white;
        border: 1.5px solid var(--border);
        border-radius: 10px;
        height: 44px;
        width: 120px;
    }

    .qty-btn {
        width: 40px;
        height: 100%;
        border: none;
        background: transparent;
        font-size: 18px;
        font-weight: 600;
        color: var(--primary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .item-qty-input {
        flex: 1;
        border: none !important;
        text-align: center;
        font-weight: 700;
        padding: 0 !important;
        height: 100% !important;
        box-shadow: none !important;
    }

    .item-field.price {
        flex: 1;
    }

    .item-field.action {
        position: absolute;
        top: 8px;
        right: 8px;
    }

    .btn-remove {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 14px;
    }
}

/* Sticky Bottom Action Bar */
.mobile-action-bar {
    display: none;
    position: fixed;
    bottom: 72px; /* Above mobile nav */
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 16px;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 999;
}

@media (max-width: 1024px) {
    .mobile-action-bar { display: flex; gap: 12px; }
}

/* Floating Add Item Button */
.fab-add-item {
    display: none;
    position: fixed;
    bottom: 160px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    border: none;
    font-size: 24px;
    z-index: 998;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 640px) {
    .fab-add-item { display: flex; }
    .btn-add-item { display: none; } /* Hide the normal one on mobile if using FAB */
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .grid-2col { 
        grid-template-columns: 1fr; 
        gap: 12px;
    }
}

.full-width {
    width: 100%;
}

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Floating Action Button (FAB) */
.fab-dashboard {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(124,58,237,0.4);
    border: none;
    font-size: 24px;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

@media (max-width: 768px) {
    .fab-dashboard { display: flex; }
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}

/* Responsive Sidebar legacy cleanup removed as we use mobile-first now */

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--white);
    width: 90%;
    max-width: 400px;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.modal-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.no-scroll {
    overflow: hidden;
}

/* Authentication Split-Screen System */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--white);
}

.auth-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--white);
}

.auth-panel-content {
    max-width: 480px;
}

.auth-panel-logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.auth-panel-tagline {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
}

.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: var(--bg-main);
}

.auth-card {
    background: var(--white);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    animation: authFadeUp 0.6s ease-out;
}

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

.auth-header {
    margin-bottom: 32px;
}

.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.error-message {
    background: #fef2f2;
    color: #ef4444;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.success-message {
    background: #f0fdf4;
    color: #166534;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

/* Mobile Auth Adjustments */
@media (max-width: 850px) {
    .auth-panel { display: none; }
    .auth-form-side { background-color: var(--white); }
    .auth-card { box-shadow: none; padding: 20px; }

}


/* Modern SaaS Input System */
.input-group {
    margin-bottom: 20px;
    width: 100%;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 14px;
    height: 48px;
    transition: all 0.2s ease;
    width: 100%;
}

.input-wrapper:hover {
    border-color: #d1d5db;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #111827;
    padding: 0 10px;
    height: 100%;
}

.input-wrapper .icon-left,
.input-wrapper .icon-right {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 18px;
    transition: color 0.2s;
}

.input-wrapper:focus-within .icon-left {
    color: var(--primary);
}

.input-wrapper .icon-right {
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 6px;
}

.input-wrapper .icon-right:hover {
    color: var(--primary);
    background-color: #f3f4f6;
}

.input-group:focus-within label {
    color: var(--primary);
}

.mobile-only-label {
    display: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .mobile-only-label { display: block; }
}

/* Sidebar Sub-items */
.nav-parent {
    display: flex;
    flex-direction: column;
}

.nav-sub-items {
    padding-left: 32px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-sub-item:hover {
    background-color: #edf2f7;
    color: var(--text-main);
}

.nav-sub-item.active {
    color: var(--primary);
    font-weight: 600;
    background-color: rgba(124, 58, 237, 0.05);
}

/* Manage Items Modal Table */
.template-items-table {
    width: 100%;
    border-collapse: collapse;
}

.template-items-table th, 
.template-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.template-items-table th {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.btn-manage-items {
    font-size: 11px;
    padding: 4px 8px;
    margin-left: 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    vertical-align: middle;
}

.btn-manage-items:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.modal-content-scroll {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: left;
}

.add-template-item-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.add-template-item-form input {
    flex: 1;
}

.modal-card.wide {
    max-width: 600px;
}

.btn-save {
    background: #16a34a;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #15803d;
}

.item-edit-input:focus {
    background: #f8fafc;
    outline: none;
    border-bottom: 2px solid var(--primary) !important;
}

.item-row.is-template {
    transition: opacity 0.3s ease;
    border-left: 3px solid #e2e8f0;
    padding-left: 12px;
}

.item-row.is-template:not(.has-price) {
    opacity: 0.5;
}

.item-row.is-template.has-price {
    opacity: 1;
    border-left-color: var(--primary);
}

.helper-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}


