* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2C3E50;
    --primary-dark: #1a252f;
    --secondary: #8B7355;
    --accent: #C9A86C;
    --bg: #f8f9fa;
    --bg-light: #F8F6F3;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: #333;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 180px;
    background: var(--primary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 18px 12px;
    text-align: center;
    background: rgba(0,0,0,0.15);
}

.logo-link {
    display: inline-block;
}

.logo-img {
    width: 90px;
    height: auto;
}

.sidebar-footer {
    margin-top: auto;
    padding: 10px 12px;
    text-align: center;
    font-size: 10px;
    opacity: 0.35;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.nav-menu {
    list-style: none;
    padding: 12px 8px;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 2px;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-size: 12px;
    letter-spacing: 0.2px;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}

.nav-menu li a.active {
    background: var(--accent);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(201, 168, 108, 0.3);
}

.nav-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Content */
.content {
    flex: 1;
    margin-left: 180px;
    max-width: calc(100vw - 180px);
    overflow-x: hidden;
}

.top-bar {
    background: white;
    padding: 15px 30px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-content {
    padding: 25px 30px;
    overflow-x: hidden;
    max-width: 100%;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-card .label {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-card.accent .value {
    color: var(--accent);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background: var(--bg);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
}

td {
    border-bottom: 1px solid var(--gray-light);
    font-size: 14px;
}

tr:hover td {
    background: var(--bg-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

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

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

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

.btn-icon {
    padding: 8px;
    min-width: 36px;
    justify-content: center;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

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

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 13px;
}

select.form-control {
    cursor: pointer;
}

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

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

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-draft { background: var(--gray-light); color: var(--gray); }
.badge-offered { background: #dbeafe; color: #1d4ed8; }
.badge-confirmed { background: #d1fae5; color: #047857; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
.badge-cancelled { background: #ffedd5; color: #c2410c; }
.badge-expired { background: var(--gray-light); color: #6b7280; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-info { background: #dbeafe; color: #1d4ed8; }
.alert-success { background: #d1fae5; color: #047857; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-danger { background: #fee2e2; color: #b91c1c; }

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

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

/* Quote specific */
.quote-header-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.info-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.info-section p {
    margin: 4px 0;
    font-size: 14px;
}

/* Quote Banner */
.quote-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0;
}

.quote-banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #1a252f 100%);
}

.quote-banner-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.quote-banner-content {
    position: relative;
    padding: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    color: white;
}

.quote-banner-left {
    flex: 1;
    min-width: 280px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
}

.status-pill.status-confirmed { background: rgba(16, 185, 129, 0.9); }
.status-pill.status-offered { background: rgba(59, 130, 246, 0.9); }
.status-pill.status-rejected { background: rgba(239, 68, 68, 0.9); }
.status-pill.status-cancelled { background: rgba(107, 114, 128, 0.9); }

.quote-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.quote-subtitle {
    font-size: 17px;
    opacity: 0.8;
    margin: 0;
}

.quote-price-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 25px 35px;
    text-align: center;
    min-width: 200px;
}

.price-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.price-value {
    display: block;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.price-note {
    display: block;
    font-size: 12px;
    opacity: 0.6;
    margin-top: 5px;
}

/* Quick Info Strip */
.quick-info-strip {
    display: flex;
    flex-wrap: wrap;
    background: white;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.quick-info-item {
    flex: 1;
    min-width: 150px;
    padding: 18px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 1px solid var(--gray-light);
}

.quick-info-item:last-child {
    border-right: none;
}

.qi-icon {
    font-size: 22px;
}

.qi-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    display: block;
}

.qi-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-top: 2px;
}

/* Detail Cards */
.detail-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detail-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.detail-card-header {
    background: var(--bg-light);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--gray-light);
}

.dc-icon {
    font-size: 20px;
}

.detail-card-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.detail-card-body {
    padding: 18px 20px;
}

.dc-main {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 4px 0;
}

.dc-sub {
    font-size: 14px;
    color: var(--text);
    margin: 0 0 4px 0;
}

.dc-muted {
    font-size: 13px;
    color: var(--gray);
    margin: 4px 0;
}

.dc-small {
    font-size: 12px;
    color: var(--gray);
    margin: 8px 0 0 0;
}

.dc-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 10px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dc-contact:hover {
    background: var(--gray-light);
}

.dc-contact:last-child {
    margin-bottom: 0;
}

.status-select-form select {
    width: 100%;
    font-size: 15px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
}

/* Quote Notes Box */
.quote-notes-box {
    display: flex;
    gap: 15px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 25px;
}

.qnb-icon {
    font-size: 24px;
}

.qnb-content strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #92400e;
    margin-bottom: 5px;
}

.qnb-content p {
    margin: 0;
    color: #78350f;
    font-size: 14px;
    line-height: 1.5;
}

/* Section Divider */
.section-divider {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-light);
}

/* Quote Summary */
.quote-summary {
    max-width: 350px;
    margin-left: auto;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-light);
}

.summary-line:last-child {
    border-bottom: none;
}

.summary-line.discount {
    color: #dc2626;
}

.summary-line.total {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 15px;
    margin-top: 5px;
    border-top: 2px solid var(--primary);
    border-bottom: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 15px;
}

/* Page Footer */
.page-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
    text-align: right;
}

.text-danger {
    color: #dc2626 !important;
}

@media (max-width: 768px) {
    .quote-banner-content {
        padding: 25px;
    }
    
    .quote-title {
        font-size: 24px;
    }
    
    .price-value {
        font-size: 28px;
    }
    
    .quick-info-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
}

.quote-totals {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

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

.total-row:last-child {
    border-bottom: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 12px;
}

.total-row.discount {
    color: var(--secondary);
}

/* Action buttons in tables */
.actions {
    display: flex;
    gap: 5px;
}

/* Category types */
.type-drink { color: #3b82f6; }
.type-food { color: #10b981; }
.type-service { color: #8b5cf6; }
.type-equipment { color: #f59e0b; }

/* Allergen checkboxes */
.allergen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    padding: 15px;
    background: var(--bg);
    border-radius: 8px;
}

.allergen-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.allergen-item:hover {
    border-color: var(--primary);
}

.allergen-item.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.allergen-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-header .logo-img {
        width: 40px;
    }
    
    .nav-menu li a {
        justify-content: center;
        padding: 12px 8px;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-icon {
        margin: 0;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .content {
        margin-left: 60px;
        max-width: calc(100vw - 60px);
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .quote-header-info {
        grid-template-columns: 1fr;
    }
}

/* Tabs */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--gray-light);
    overflow-x: auto;
}

.tabs-sm {
    padding: 10px 15px;
    gap: 5px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tabs-sm .tab {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 15px;
}

.tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tab-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.tab.active .tab-count {
    background: rgba(255,255,255,0.2);
}

/* Search box */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 14px;
}

/* Product list in quote editor */
.product-list {
    padding: 10px !important;
}

.product-item {
    margin-bottom: 8px;
}

.product-select-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    background: white;
    transition: all 0.2s;
}

.product-select-item:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

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

.product-info .name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info .meta {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--gray);
}

.empty-state p {
    margin-bottom: 15px;
}

/* Items Editor Layout */
.items-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: calc(100vh - 180px);
}

.products-panel,
.items-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-light);
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.products-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s;
}

.product-item:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

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

.product-info .name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info .meta {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

/* Items list */
.items-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.quote-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.item-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.item-info .name {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}

.item-info .meta {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

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

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--gray-light);
    background: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.qty-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.qty-btn:hover {
    background: var(--gray-light);
}

.qty-input {
    width: 50px;
    height: 32px;
    border: 1px solid var(--gray-light);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary);
}

.item-unit-price {
    font-size: 12px;
    color: var(--gray);
    margin-left: 10px;
}

.item-total {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}

/* Items Summary */
.items-summary {
    padding: 15px 20px;
    background: var(--bg);
    border-top: 1px solid var(--gray-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.summary-row.discount {
    color: var(--secondary);
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid var(--primary);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray);
    color: white;
}

.modal-body {
    padding: 20px;
}

.modal-product-info {
    background: var(--bg-light);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 15px;
}

.modal-total {
    background: var(--primary);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    margin-top: 15px;
}

.modal-total strong {
    font-size: 18px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-light);
    background: var(--bg);
}

/* Section title */
.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 6px;
}

.btn-ghost:hover {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 900px) {
    .items-editor {
        grid-template-columns: 1fr;
    }
}

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

/* Product item in quote */
.product-select-item {
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-select-item:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.product-select-item .name {
    font-weight: 500;
}

.product-select-item .meta {
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
}

/* Text helpers */
.text-muted { color: var(--gray); }
.text-small { font-size: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 600; }

/* Spacing */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

/* ===== SPLIT VIEW (Items Editor) ===== */
.split-view {
    display: flex;
    gap: 15px;
    height: calc(100vh - 140px);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.split-left {
    flex: 1 1 0;
    min-width: 0;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.split-right {
    flex: 1 1 0;
    min-width: 0;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.split-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.split-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
}

.search-input {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-size: 13px;
}

.search-input-sm {
    padding: 6px 10px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-size: 12px;
    width: 150px;
}

.tabs-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--gray-light);
    background: var(--bg-light);
    overflow: hidden;
}

.tabs-wrap .tab {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
    background: white;
    cursor: pointer;
}

.tabs-wrap .tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.split-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Category divider v položkách nabídky */
.category-divider {
    background: var(--accent);
    color: white;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px -10px;
    margin-top: 5px;
}

.category-divider:first-child {
    margin-top: -10px;
}

/* Items tabs - záložky kategorií v nabídce */
.items-tabs {
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 0;
    margin-bottom: 0;
}

.items-tabs .tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 8px 12px;
    font-size: 11px;
}

.items-tabs .tab:hover {
    background: var(--bg);
}

.items-tabs .tab.active {
    background: transparent;
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.split-footer {
    padding: 15px 20px;
    border-top: 2px solid var(--primary);
    background: var(--bg-light);
}

.split-footer.compact {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 15px;
}

.split-footer.compact .discount-note {
    font-size: 12px;
    color: var(--gray);
    margin-right: auto;
}

.split-footer.compact .total-label {
    font-size: 13px;
    color: var(--gray);
}

.split-footer.compact .total-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* Product rows */
.prod-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-light);
}

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

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

.prod-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prod-meta {
    font-size: 11px;
    color: var(--gray);
}

.btn-add {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--success);
    color: white;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-add:hover { background: #059669; }

.no-results {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 13px;
}

/* Item cards */
.item-card {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

.item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}

.btn-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    font-size: 14px;
}

.btn-remove:hover { color: var(--danger); }

.item-allergens {
    font-size: 11px;
    color: var(--secondary);
    margin-bottom: 10px;
}

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

.qty-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-light);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.qty-btn:hover { background: var(--gray-light); }

.qty-num {
    width: 45px;
    height: 28px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
}

.item-unit {
    font-size: 12px;
    color: var(--gray);
    margin-left: 8px;
}

.item-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.items-count {
    font-size: 13px;
    color: var(--gray);
}

.empty-msg {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-msg span {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.4;
}

/* Summary rows */
.sum-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.sum-row.discount { color: #dc2626; }

.sum-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--gray-light);
}

/* ===== QUOTE HEADER CARD ===== */
.quote-header-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    color: white;
}

.qh-top {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.qh-left {
    flex: 1;
    min-width: 280px;
}

.qh-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

.status-dot.status-draft { background: #fbbf24; }
.status-dot.status-offered { background: #3b82f6; }
.status-dot.status-confirmed { background: #10b981; }
.status-dot.status-rejected { background: #ef4444; }
.status-dot.status-cancelled { background: #6b7280; }

.status-select {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.status-select option { color: #333; }

.qh-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.qh-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    opacity: 0.85;
}

.qh-price {
    text-align: right;
}

.qh-price-value {
    font-size: 28px;
    font-weight: 800;
}

.qh-price-note {
    font-size: 12px;
    opacity: 0.7;
}

.qh-bottom {
    background: rgba(0,0,0,0.15);
    padding: 15px 25px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.qh-info {
    min-width: 120px;
}

.qh-info-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    margin-bottom: 2px;
}

.qh-info-value {
    font-size: 14px;
    font-weight: 600;
}

.qh-info-sub {
    font-size: 12px;
    opacity: 0.7;
}

.qh-info-action {
    margin-left: auto;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.note-bar {
    background: #fef3c7;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 15px;
}

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

.items-table th,
.items-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-light);
    font-size: 13px;
}

.items-table th {
    background: var(--bg-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--gray);
}

.allergen-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.items-footer {
    padding: 20px;
    background: var(--bg-light);
}

.items-sum {
    max-width: 280px;
    margin-left: auto;
}

.sum-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.sum-line.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid var(--primary);
}

.page-actions {
    margin-top: 20px;
    text-align: right;
}

/* Stats row */
.stats-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 180px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card.stat-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.stat-card.stat-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: white;
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.stat-success .stat-icon,
.stat-card.stat-accent .stat-icon {
    background: rgba(255,255,255,0.2);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-card.stat-success .stat-value,
.stat-card.stat-accent .stat-value {
    color: white;
}

.stat-label {
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
}

.stat-card.stat-success .stat-label,
.stat-card.stat-accent .stat-label {
    color: rgba(255,255,255,0.8);
}

/* Customer styles */
.customer-link {
    color: var(--primary);
    text-decoration: none;
}

.customer-link:hover {
    color: var(--accent);
}

.customer-row.inactive {
    opacity: 0.5;
}

/* Modal improvements */
.modal-info {
    background: var(--bg-light);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 15px;
}

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

.modal-fields .field {
    flex: 1;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--gray);
}

.field.full {
    margin-bottom: 15px;
}

.modal-sum {
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    margin-top: 15px;
}

.modal-sum strong {
    font-size: 18px;
}
