/* ================================================================
   qSpiaggia Theme - Beach-Inspired Modern Design
   ================================================================ */

:root {
    --primary: #0077b6;
    --primary-dark: #005f8d;
    --primary-light: #00b4d8;
    --accent: #48cae4;
    --success: #06d6a0;
    --success-dark: #05b384;
    --danger: #ef476f;
    --danger-dark: #c5274d;
    --warning: #ffd166;
    --subscription: #118ab2;
    --bg: #f0f4f8;
    --card-bg: #ffffff;
    --text: #1d3557;
    --text-light: #457b9d;
    --text-muted: #8b9cb5;
    --border: #e1e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 2px 8px rgba(29,53,87,0.08);
    --shadow-md: 0 4px 16px rgba(29,53,87,0.12);
    --shadow-lg: 0 8px 32px rgba(29,53,87,0.16);
    --sand-light: #fef9ef;
    --sand: #f4e4c1;
    --sand-dark: #d4b896;
    --sea-gradient: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #48cae4 100%);
    --beach-gradient: linear-gradient(180deg, #48cae4 0%, #90e0ef 30%, #f4e4c1 60%, #d4b896 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* ================================================================
   Navbar
   ================================================================ */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 56px;
    background: var(--sea-gradient);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0,119,182,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.navbar-brand::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C9.5 2 7 4 7 7.5c0 .5.04 1 .12 1.5H5.5C4.67 9 4 9.67 4 10.5S4.67 12 5.5 12h13c.83 0 1.5-.67 1.5-1.5S19.33 9 18.5 9h-1.62c.08-.5.12-1 .12-1.5C17 4 14.5 2 12 2zm0 2c1.5 0 3 1.5 3 3.5 0 .5-.04 1-.12 1.5H9.12C9.04 8.5 9 8 9 7.5 9 5.5 10.5 4 12 4zM12 14l-1 8h2l-1-8z'/%3E%3C/svg%3E");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
}
.navbar-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}
.navbar-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.navbar-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}
.navbar-user {
    font-size: 0.8rem;
    opacity: 0.7;
    padding: 0 0.5rem;
}
.btn-logout {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-logout:hover {
    background: rgba(255,255,255,0.25);
}

/* ================================================================
   Container
   ================================================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ================================================================
   Page Header
   ================================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.page-header .breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.page-header .breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

/* ================================================================
   Zones Grid - Modern Cards with Pie Charts
   ================================================================ */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.zone-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}
.zone-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.zone-card-header {
    padding: 1rem 1.25rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.zone-card-color {
    width: 6px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: var(--radius) 0 0 var(--radius);
}
.zone-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    padding-left: 0.75rem;
}
.zone-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem 1.25rem;
}
.zone-card-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.zone-card-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.zone-card-stats .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}
.zone-card-stats .stat-sub {
    font-size: 0.85rem;
    color: var(--text-light);
}
.zone-pie {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}
.zone-pie circle {
    transition: stroke-dasharray 0.6s ease;
}
.zone-card-footer {
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.zone-card-footer .occupancy-label {
    color: var(--text-muted);
}
.zone-card-footer .occupancy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}
.occupancy-low { background: #d8f5e3; color: #0a6d3b; }
.occupancy-mid { background: #fff3cd; color: #856404; }
.occupancy-high { background: #fddede; color: #a12f2f; }

/* Summary bar */
.zones-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.summary-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 200px;
}
.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.summary-icon.total { background: #e8f4fd; color: var(--primary); }
.summary-icon.free { background: #d8f5e3; color: var(--success); }
.summary-icon.occupied { background: #fddede; color: var(--danger); }
.summary-data .summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}
.summary-data .summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================================================
   Beach Map - Sales Page with Umbrella Icons
   ================================================================ */
.beach-page {
    position: relative;
    min-height: calc(100vh - 56px - 3rem);
}
.beach-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.beach-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.beach-zone-name {
    color: var(--primary);
}
.beach-back-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.beach-back-link:hover {
    text-decoration: underline;
}

.beach-legend {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
}
.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
}
.legend-dot.free { background: var(--success); }
.legend-dot.occupied { background: var(--danger); }
.legend-dot.subscription { background: var(--subscription); }

.beach-map {
    background: linear-gradient(180deg, var(--sand) 0%, var(--sand-light) 60%, #e8f6ff 100%);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--sand-dark);
    position: relative;
    overflow: hidden;
}
.beach-map::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--sea-gradient);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Sea strip at bottom of zone map */
.beach-sea-strip {
    margin: 0.75rem -1.5rem 0;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
}
.beach-sea-shore {
    height: 16px;
    background: linear-gradient(180deg, var(--sand-dark) 0%, #b8a080 50%, #a08968 100%);
    position: relative;
}
.beach-sea-shore::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #e0f7fa 20%, #b2ebf2 50%, #e0f7fa 80%, transparent 100%);
    opacity: 0.6;
}
.beach-sea-water {
    height: 80px;
    background: linear-gradient(180deg, #80deea 0%, #4dd0e1 20%, #26c6da 40%, #00acc1 60%, #0097a7 80%, #00838f 90%, #006064 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.beach-sea-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.beach-sea-waves .wave {
    transform-origin: center;
}
.beach-sea-waves .wave-back {
    animation: wave-drift-slow 8s ease-in-out infinite;
}
.beach-sea-waves .wave-mid {
    animation: wave-drift-medium 6s ease-in-out infinite 0.5s;
}
.beach-sea-waves .wave-front {
    animation: wave-drift-fast 5s ease-in-out infinite 1s;
}
@keyframes wave-drift-slow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-15px); }
}
@keyframes wave-drift-medium {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}
@keyframes wave-drift-fast {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-25px); }
}
.beach-sea-label {
    font-size: 18px;
    font-weight: 800;
    color: rgba(255,255,255,0.3);
    letter-spacing: 10px;
    user-select: none;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Row layout */
.beach-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px dashed rgba(180,160,130,0.3);
}
.beach-row:last-of-type {
    border-bottom: none;
}
.row-label {
    width: 70px;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: right;
    padding-right: 0.75rem;
}
.row-spots {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Spot (umbrella) styles */
.spot {
    width: 56px;
    height: 64px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    background: var(--card-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.spot:hover {
    transform: scale(1.1);
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.spot-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 2px;
}
.spot-number {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.spot.free {
    border-color: var(--success);
    background: linear-gradient(180deg, #d8f5e3 0%, #edfcf2 100%);
    color: #0a6d3b;
}
.spot.free .spot-icon { filter: hue-rotate(100deg) saturate(0.8) brightness(0.9); }

.spot.occupied {
    border-color: var(--danger);
    background: linear-gradient(180deg, #fddede 0%, #fff0f0 100%);
    color: #a12f2f;
}
.spot.occupied .spot-icon { filter: hue-rotate(330deg) saturate(1.2) brightness(0.85); }

.spot.subscription {
    border-color: var(--subscription);
    background: linear-gradient(180deg, #d0ecf9 0%, #e8f6ff 100%);
    color: #0a5e82;
}
.spot.subscription .spot-icon { filter: hue-rotate(190deg) saturate(0.8); }

/* Spot tooltip */
.spot-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}
.spot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text);
}
.spot:hover .spot-tooltip {
    opacity: 1;
}

/* ================================================================
   Sale Dialog - Modern Slide-in Panel
   ================================================================ */
.sale-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(29,53,87,0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s;
    display: none;
}
.sale-dialog-overlay.active { display: block; opacity: 1; }

.sale-dialog {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    padding: 0;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.sale-dialog.active {
    transform: translateX(0);
}
.sale-dialog-header {
    padding: 0.75rem 1rem;
    background: var(--sea-gradient);
    color: #fff;
    flex-shrink: 0;
}
.sale-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sale-dialog-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.sale-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}
.sale-close-btn:hover { color: #fff; }
.sale-dialog-header .spot-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255,255,255,0.2);
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}
.sale-dialog-body {
    padding: 0.75rem 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Pricing Info in Sale Dialog */
.pricing-info {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    border: 1px solid var(--border);
}
.pricing-info.loading {
    justify-content: center;
    color: var(--text-muted);
}
.pricing-info.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.4rem 0.6rem;
    gap: 0.3rem;
}
.pricing-info.warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.pricing-info.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.pricing-spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pricing-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}
.pricing-detail + .pricing-detail {
    border-top: 1px solid #e5e7eb;
}
.pricing-detail.total {
    border-top: 2px solid #16a34a;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}
.pricing-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.pricing-value {
    font-weight: 600;
    color: var(--text);
}
.pricing-detail.total .pricing-value {
    color: #16a34a;
    font-size: 1.1rem;
}

/* Compact pricing tags row */
.pricing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}
.pricing-tag {
    background: #dcfce7;
    color: #166534;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
}
.pricing-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: #16a34a;
    text-align: right;
}
.pricing-price.muted {
    font-weight: 500;
    font-size: 0.82rem;
    color: #64748b;
}

/* Collapsible Panels in Sale Dialog */
.sale-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.sale-panel-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    background: var(--bg);
    user-select: none;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
}
.sale-panel-header:active { background: #e8eef4; }
.sale-panel-title {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.sale-panel-chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}
.sale-panel.collapsed .sale-panel-chevron {
    transform: rotate(-90deg);
}
.sale-panel-body {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border);
}
.sale-panel.collapsed .sale-panel-body {
    display: none;
}
.sale-panel-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sale-panel-count {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--primary);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sale-dialog-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    background: var(--card-bg);
}

/* Packages Section (radio buttons) */
.packages-section {
    margin-bottom: 0.5rem;
}
.packages-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.packages-section h3 .required-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 0.35rem;
}
.package-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.3rem;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--card-bg);
    -webkit-tap-highlight-color: transparent;
}
.package-option:hover {
    border-color: var(--primary-light);
    background: #f0f9ff;
}
.package-option.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 1px var(--primary);
}
.package-option input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.package-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.package-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

/* Accessories Section */
.accessories-section {
    margin-bottom: 0.5rem;
}
.accessories-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.accessory-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--card-bg);
}
.accessory-item:hover {
    border-color: var(--primary-light);
    background: #f0f9ff;
}
.accessory-item.checked {
    border-color: var(--primary);
    background: #eff6ff;
}
.accessory-item.required {
    border-color: var(--primary);
    background: #eff6ff;
    opacity: 0.85;
}
.accessory-item input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.accessory-item-info {
    flex: 1;
    min-width: 0;
}
.accessory-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.accessory-item-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 0.35rem;
}
.accessory-item-tag.required {
    background: #fee2e2;
    color: #991b1b;
}
.accessory-item-tag.package {
    background: #e0e7ff;
    color: #3730a3;
}
.accessory-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}
.accessory-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}
.accessory-qty button {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.accessory-qty button:hover {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}
.accessory-qty span {
    width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Payment Buttons (Contanti / Carte) */
.payment-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.payment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--card-bg);
    color: var(--text);
}
.payment-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.payment-btn.cash {
    border-color: #16a34a;
    color: #166534;
}
.payment-btn.cash:hover {
    background: #f0fdf4;
}
.payment-btn.cash.selected {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}
.payment-btn.card {
    border-color: var(--primary);
    color: var(--primary-dark);
}
.payment-btn.card:hover {
    background: #f0f9ff;
}
.payment-btn.card.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,119,182,0.3);
}

/* Prepaid Card Section */
.prepaid-section {
    margin-bottom: 1rem;
}
.prepaid-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.prepaid-input-row input {
    flex: 1;
}
.prepaid-input-row .btn {
    white-space: nowrap;
    flex-shrink: 0;
}
.prepaid-result {
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.prepaid-result.valid {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.prepaid-result.invalid {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Sale Total Breakdown */
.sale-total-breakdown {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}
.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--text-light);
}
.total-line + .total-line {
    border-top: 1px solid #e5e7eb;
}
.total-line.discount {
    color: var(--success-dark);
}
.total-line.final {
    border-top: 2px solid var(--primary);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.total-line .label { font-weight: 500; }
.total-line .value { font-weight: 600; }
.total-line.final .value {
    color: var(--primary-dark);
    font-size: 1.15rem;
}

/* Customer Discount Badge */
.customer-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #dcfce7;
    color: #166534;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Add Accessory Mini-Dialog (for SaleDetail) */
.add-accessory-dialog {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    margin-top: 0.75rem;
    max-width: 500px;
}
.add-accessory-dialog h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

/* ================================================================
   Sale Detail - Card Layout
   ================================================================ */
.sale-detail-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    max-width: 700px;
}
.sale-detail-header {
    padding: 1.25rem 1.5rem;
    background: var(--sea-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sale-detail-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}
.sale-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.sale-status-badge.active {
    background: rgba(6,214,160,0.2);
    color: #d8f5e3;
}
.sale-status-badge.closed {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
}
.sale-detail-body {
    padding: 1.5rem;
}
.sale-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sale-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.sale-info-item .info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sale-info-item .info-value {
    font-size: 1rem;
    font-weight: 600;
}
.sale-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #f0faf5;
    border-top: 2px solid var(--success);
}
.sale-total-row .total-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}
.sale-total-row .total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--success-dark);
}

/* ================================================================
   Forms
   ================================================================ */
.form-group {
    margin-bottom: 1.15rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: #fff;
    transition: all 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}
.customer-result {
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    transition: background 0.15s;
}
.customer-result:hover {
    background: #f0f7ff;
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
    padding: 0.55rem 1.15rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,119,182,0.25);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0,119,182,0.35);
}
.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 2px 8px rgba(6,214,160,0.25);
}
.btn-success:hover {
    background: var(--success-dark);
}
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: var(--danger-dark);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f7ff;
}
.btn-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    margin-left: 0.35rem;
    vertical-align: middle;
}
.btn-icon-sm:hover {
    background: var(--bg);
    color: var(--primary);
}
.btn-danger-icon {
    color: var(--danger);
}
.btn-danger-icon:hover {
    background: #fef2f2;
    color: var(--danger-dark);
}

/* ================================================================
   Tables
   ================================================================ */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th,
.table td {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table tbody tr:hover {
    background: #f8fafc;
}

/* ================================================================
   Alert
   ================================================================ */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ================================================================
   Login
   ================================================================ */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--beach-gradient);
    position: relative;
    overflow: hidden;
}
.login-body::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 Q300,20 600,60 Q900,100 1200,60 L1200,120 L0,120 Z' fill='%23f4e4c1'/%3E%3C/svg%3E") repeat-x bottom;
    background-size: 1200px 120px;
    opacity: 0.5;
}
.login-container { width: 100%; max-width: 400px; position: relative; z-index: 1; }
.login-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
.login-box h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
}
.login-box h2 {
    text-align: center;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ================================================================
   Season / Workstation cards
   ================================================================ */
.season-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.15rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.season-card h3 { margin-bottom: 0.25rem; }

/* ================================================================
   Loading spinner
   ================================================================ */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    gap: 0.75rem;
    font-size: 0.9rem;
}
.loading-spinner::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================================
   Empty state
   ================================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.empty-state p {
    font-size: 0.95rem;
}

/* ================================================================
   Daily Report
   ================================================================ */
.report-page {
    max-width: 1200px;
    margin: 0 auto;
}
.report-date-picker {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.report-date-input {
    width: 160px;
    text-align: center;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
}
.btn-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

/* Summary Cards */
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.report-summary-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.report-summary-card.complimentary {
    border-left: 4px solid #f59e0b;
}
.report-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.report-summary-icon.total { background: #e8f4fd; color: var(--primary); }
.report-summary-icon.revenue { background: #d8f5e3; color: var(--success); }
.report-summary-icon.discount { background: #fef3c7; color: #d97706; }
.report-summary-icon.comp { background: #fef3c7; color: #f59e0b; }
.report-summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}
.report-summary-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.report-summary-sub {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Report Sections */
.report-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.report-section-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.report-section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.report-section-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}
.report-table-wrapper {
    overflow-x: auto;
}
.report-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Breakdown rows */
.breakdown-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.breakdown-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-right: 1rem;
}
.breakdown-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark);
    min-width: 90px;
    text-align: right;
}
.breakdown-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-paid { background: #d8f5e3; color: #0a6d3b; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-comp { background: #fef3c7; color: #b45309; }

/* Complimentary row highlight */
.row-complimentary {
    background: #fffbeb !important;
}
.row-complimentary:hover {
    background: #fef3c7 !important;
}

/* Table text-right */
.text-right { text-align: right; }

/* ================================================================
   Filling Zone (zona a consumo) - Sales UI
   ================================================================ */
.filling-zone {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.filling-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filling-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #ffcc80;
}

.filling-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

.filling-capacity {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
}

.filling-capacity-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #37474f;
    margin-bottom: 0.5rem;
}

.filling-capacity-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.filling-capacity-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.filling-capacity-fill.bar-low { background: #4caf50; }
.filling-capacity-fill.bar-mid { background: #ff9800; }
.filling-capacity-fill.bar-high { background: #f44336; }

.filling-pricing-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #1e40af;
    flex-wrap: wrap;
}

.filling-base-price {
    font-weight: 700;
    margin-left: auto;
}

.filling-accessory-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
}

.filling-acc-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #92400e;
}

.filling-acc-unit-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a237e;
}

.filling-qty-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filling-qty-section > label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #37474f;
    min-width: 70px;
}

.filling-qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.filling-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    color: #37474f;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.filling-qty-btn:hover { background: #e2e8f0; }
.filling-qty-btn:active { background: #cbd5e1; }

.filling-qty-value {
    width: 50px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a237e;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    padding: 0.4rem 0;
}

.filling-qty-max {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
}

.filling-accessories > label,
.filling-customer > label,
.filling-payment > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #37474f;
    margin-bottom: 0.5rem;
}

.filling-acc-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.85rem;
}

.filling-acc-item:hover { background: #f8fafc; }
.filling-acc-item.checked { background: #eff6ff; border-color: #93c5fd; }
.filling-acc-item.required { opacity: 0.7; cursor: default; }

.filling-acc-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1a237e;
    flex-shrink: 0;
}

.filling-acc-name {
    flex: 1;
    font-weight: 500;
}

.filling-acc-price {
    font-weight: 700;
    color: #1a237e;
    white-space: nowrap;
}

.filling-customer {
    position: relative;
}

.filling-customer .form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
}

.filling-customer-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
}

.filling-customer-results .customer-result {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.filling-customer-results .customer-result:hover {
    background: #f0f4ff;
}

.filling-pt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filling-pt-chip {
    padding: 0.45rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s;
}

.filling-pt-chip:hover { border-color: #93c5fd; background: #f0f4ff; }
.filling-pt-chip.active { background: #1a237e; color: #fff; border-color: #1a237e; }

.filling-total {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 1rem;
}

.filling-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: #37474f;
}

.filling-total-row.discount { color: #dc2626; }

.filling-total-row.total {
    border-top: 2px solid #86efac;
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    font-size: 1.1rem;
}

.filling-total-row.total strong {
    color: #166534;
    font-size: 1.25rem;
}

.filling-error {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid #fecaca;
}

/* ================================================================
   CashProxy Admin Page
   ================================================================ */
.cashproxy-page {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cashproxy-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

.cashproxy-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cp-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.cp-status.loading { background: #f8fafc; color: #64748b; }
.cp-status.online { background: #f0fdf4; color: #166534; }
.cp-status.offline { background: #fef2f2; color: #991b1b; }

.cp-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cp-status.loading .cp-status-dot { background: #94a3b8; }
.cp-status.online .cp-status-dot { background: #22c55e; animation: pulse-dot 2s infinite; }
.cp-status.offline .cp-status-dot { background: #ef4444; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.cp-url-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cp-url-row .form-control { flex: 1; }

.form-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.cp-test-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cp-test-buttons .btn { display: inline-flex; align-items: center; gap: 0.4rem; }

#cp-test-result {
    margin-top: 0.75rem;
    min-height: 1.5rem;
}

.cp-activation-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.filling-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filling-confirm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
}

/* ================================================================
   Spot Selected & Pickable States
   ================================================================ */
.spot.in-cart {
    border-color: var(--primary) !important;
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%) !important;
    color: var(--primary-dark) !important;
    box-shadow: 0 0 0 2px var(--primary), 0 2px 8px rgba(0,119,182,0.25);
    opacity: 0.5;
    cursor: not-allowed;
}
.spot.in-cart .spot-icon { filter: hue-rotate(200deg) saturate(1.2) brightness(0.9); }
.spot.in-cart::after {
    content: '\2713';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
}

/* Pickable state: pulsing border when in "add spot" mode */
.spot.free.pickable {
    animation: pickable-pulse 1.2s ease-in-out infinite;
    cursor: pointer;
}
.spot.free.pickable.in-cart {
    animation: none;
}
@keyframes pickable-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(6,214,160,0); }
    50% { box-shadow: 0 0 0 3px rgba(6,214,160,0.5); }
}

/* Spots list in sale dialog */
.spots-list-section {
    margin-bottom: 0;
}
.spots-list-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.spot-list-item {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.3rem;
    background: #f0f9ff;
    gap: 0.5rem;
}
.spot-list-label {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.spot-list-label small {
    color: var(--text-muted);
    font-weight: 400;
}
.spot-list-price {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.9rem;
}
.spot-list-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}
.spot-list-remove:hover { color: var(--danger-dark); }

.btn-add-spot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: none;
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}
.btn-add-spot:hover { background: #f0f9ff; }

/* Minimized dialog (when picking a spot from the map) */
.sale-dialog.minimized {
    opacity: 0.3;
    transform: translateX(90%);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Add-spot hint bar */
.add-spot-hint {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    animation: slide-up 0.25s ease;
}
.add-spot-hint .btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
}
.add-spot-hint .btn-outline:hover { background: rgba(255,255,255,0.15); }
@keyframes slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Print warning toast */
.print-warning-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 9999;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    max-width: 90vw;
    opacity: 0;
    transition: all 0.35s ease;
}
.print-warning-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 0.5rem; height: auto; padding: 0.75rem 1rem; }
    .navbar-links { flex-wrap: wrap; justify-content: center; }
    .sale-dialog { width: 100%; }
    .zones-grid { grid-template-columns: 1fr; }
    .zones-summary { flex-direction: column; }
    .sale-info-grid { grid-template-columns: 1fr; }
    .beach-row { flex-direction: column; align-items: flex-start; }
    .row-label { width: auto; text-align: left; padding-right: 0; padding-bottom: 0.25rem; }
    .spot { width: 48px; height: 56px; }
    .report-columns { grid-template-columns: 1fr; }
    .report-summary { grid-template-columns: 1fr 1fr; }
    .page-header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .filling-zone { padding: 1rem; }
    .filling-qty-section { flex-wrap: wrap; }
    .filling-actions { flex-direction: column; }
    .filling-confirm-btn { width: 100%; justify-content: center; }
    .payment-buttons { flex-direction: column; }
    .payment-btn { justify-content: center; }
    .add-spot-hint { flex-wrap: wrap; }
}
