/* =============================================
   ALJONA ADMIN - STYLES
   Mobile-first responsive design
   ============================================= */

/* =============================================
   CSS VARIABLES (rozšíření z main.css)
   ============================================= */
:root {
    /* Admin specific */
    --sidebar-width: 260px;
    --sidebar-collapsed: 60px;
    --header-height: 60px;
    --color-sidebar-bg: #2D3748;
    --color-sidebar-text: #A0AEC0;
    --color-sidebar-active: var(--color-accent);
    --color-card-bg: var(--color-white);
}

/* =============================================
   ADMIN LAYOUT
   ============================================= */
.admin-layout {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--color-bg);
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: var(--color-sidebar-bg);
    color: var(--color-sidebar-text);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-white);
    font-style: italic;
}

.sidebar-logo span {
    display: block;
    font-size: 0.65rem;
    font-style: normal;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-sidebar-text);
    margin-top: 2px;
}

.sidebar-close {
    display: block;
    background: none;
    border: none;
    color: var(--color-sidebar-text);
    padding: var(--space-xs);
    cursor: pointer;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
}

.nav-section {
    margin-bottom: var(--space-md);
}

.nav-section-title {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-sidebar-text);
    opacity: 0.6;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--color-sidebar-text);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--color-white);
}

.nav-item.active {
    background: rgba(74, 124, 155, 0.2);
    color: var(--color-accent);
    border-right: 3px solid var(--color-accent);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item-badge {
    margin-left: auto;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.sidebar-user-name {
    font-size: 0.9rem;
    color: var(--color-white);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--color-sidebar-text);
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* =============================================
   ADMIN MAIN CONTENT
   ============================================= */
.admin-main {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--header-height);
}

/* Admin Header */
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-primary-light);
    display: flex;
    align-items: center;
    padding: 0 var(--space-md);
    z-index: 90;
    gap: var(--space-md);
}

.menu-toggle {
    background: none;
    border: none;
    padding: var(--space-xs);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-header-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary-dark);
    flex: 1;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Admin Content */
.admin-content {
    padding: var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary-dark);
    margin: 0;
}

.card-body {
    padding: var(--space-md);
}

.card-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-primary-light);
    background: var(--color-bg);
}

/* =============================================
   STATS CARDS
   ============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue { background: rgba(74, 124, 155, 0.15); color: var(--color-accent); }
.stat-icon.green { background: rgba(107, 155, 122, 0.15); color: var(--color-success); }
.stat-icon.orange { background: rgba(212, 165, 116, 0.15); color: var(--color-warning); }
.stat-icon.pink { background: rgba(196, 164, 132, 0.15); color: var(--color-primary); }

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 4px;
}

.stat-change.positive { color: var(--color-success); }
.stat-change.negative { color: var(--color-error); }

/* =============================================
   FORMS
   ============================================= */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.form-label.required::after {
    content: ' *';
    color: var(--color-error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(74, 124, 155, 0.15);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--color-error);
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 4px;
}

/* Form Row */
.form-row {
    display: grid;
    gap: var(--space-md);
}

.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--color-text);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    width: 44px;
    height: 24px;
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
    position: relative;
    transition: background var(--transition-fast);
}

.switch-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--color-white);
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.switch input:checked + .switch-slider {
    background: var(--color-accent);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

.switch-label {
    font-size: 0.9rem;
    color: var(--color-text);
}

/* =============================================
   TABLES
   ============================================= */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: var(--space-sm);
    text-align: left;
    border-bottom: 1px solid var(--color-primary-light);
}

.admin-table th {
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--color-bg);
}

.admin-table tbody tr:hover {
    background: var(--color-bg);
}

.admin-table .actions {
    display: flex;
    gap: var(--space-xs);
}

/* Table on Mobile - Stack */
.table-stack {
    display: none;
}

/* =============================================
   BADGES & STATUS
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-pending { background: rgba(212, 165, 116, 0.2); color: #B8860B; }
.badge-confirmed { background: rgba(74, 124, 155, 0.2); color: var(--color-accent); }
.badge-completed { background: rgba(107, 155, 122, 0.2); color: var(--color-success); }
.badge-cancelled { background: rgba(196, 116, 116, 0.2); color: var(--color-error); }
.badge-active { background: rgba(107, 155, 122, 0.2); color: var(--color-success); }
.badge-inactive { background: rgba(122, 122, 122, 0.2); color: var(--color-text-light); }
.badge-info { background: rgba(74, 124, 155, 0.2); color: var(--color-accent); }
.badge-success { background: rgba(40, 167, 69, 0.15); color: #28A745; }
.badge-warning { background: rgba(255, 193, 7, 0.2); color: #856404; }
.badge-outline { 
    background: transparent; 
    border: 1px solid var(--color-primary-light); 
    color: var(--color-text); 
    font-size: 12px;
    padding: 3px 8px;
    margin: 2px;
    display: inline-block;
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 900px; max-height: 90vh; max-height: 90dvh; }
.modal-body { max-height: 70vh; max-height: 70dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Wizard options */
.wizard-option {
    display: block;
    padding: 16px;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.wizard-option:hover {
    border-color: var(--color-primary-light);
    background: var(--color-bg);
}
.wizard-option.selected {
    border-color: var(--color-accent);
    background: rgba(74, 124, 155, 0.1);
}
.modal-xl { max-width: 900px; }
.modal-full { max-width: 95vw; }

.modal-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--color-white);
    z-index: 1;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-primary-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    padding: var(--space-xs);
    color: var(--color-text-light);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: var(--space-md);
}

.modal-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-primary-light);
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    flex-wrap: wrap;
    position: sticky;
    bottom: 0;
    background: var(--color-white);
}

/* =============================================
   CALENDAR
   ============================================= */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.calendar-nav button {
    background: none;
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.calendar-nav button:hover {
    background: var(--color-primary-light);
}

.calendar-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary-dark);
}

.calendar-grid {
    width: 100%;
}

/* Calendar Page Special */
#page-calendar .card {
    background: white;
}

#page-calendar .card-body {
    padding: 0;
}

#page-calendar .card-header {
    background: white;
    border-bottom: 1px solid var(--color-border);
}

/* Calendar header mobile */
@media (max-width: 600px) {
    #page-calendar .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }
    
    #page-calendar .card-header > div {
        justify-content: center;
    }
    
    #page-calendar .card-header .calendar-nav {
        justify-content: center;
    }
    
    #page-calendar .card-header .btn-group .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    #page-calendar .card-header .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .calendar-title {
        font-size: 1rem;
    }
    
    .cal-btn-text {
        display: none;
    }
    
    .cal-new-booking-btn {
        padding: 8px 12px !important;
        font-size: 16px !important;
    }
}

.calendar-day-header {
    background: var(--color-bg);
    padding: var(--space-sm);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-light);
}

.calendar-day {
    background: var(--color-white);
    min-height: 80px;
    padding: var(--space-xs);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.calendar-day:hover {
    background: var(--color-bg);
}

.calendar-day.other-month {
    background: var(--color-bg);
    opacity: 0.5;
}

.calendar-day.today {
    background: rgba(74, 124, 155, 0.1);
}

.calendar-day-number {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
}

.calendar-day.today .calendar-day-number {
    color: var(--color-accent);
    font-weight: 700;
}

.calendar-event {
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-event.pending { background: rgba(212, 165, 116, 0.3); color: #8B6914; }
.calendar-event.confirmed { background: rgba(74, 124, 155, 0.3); color: var(--color-accent-dark); }
.calendar-event.completed { background: rgba(107, 155, 122, 0.3); color: #4A7A5A; }

/* =============================================
   BODY MAP (SVG Interactive)
   ============================================= */
.body-map-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.body-map-wrapper {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.body-map-view {
    text-align: center;
}

.body-map-view h4 {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.body-map {
    position: relative;
    width: 180px;
    height: auto;
}

.body-map svg {
    width: 100%;
    height: auto;
}

.body-map .body-outline {
    fill: var(--color-primary-lighter);
    stroke: var(--color-primary);
    stroke-width: 1;
}

.body-map .body-zone {
    fill: transparent;
    stroke: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.body-map .body-zone:hover {
    fill: rgba(74, 124, 155, 0.2);
}

.body-map .body-zone.active {
    fill: rgba(74, 124, 155, 0.4);
    stroke: var(--color-accent);
    stroke-width: 2;
}

.body-map .body-zone.has-notes {
    fill: rgba(107, 155, 122, 0.3);
}

.body-map .body-zone.has-notes.active {
    fill: rgba(107, 155, 122, 0.5);
    stroke: var(--color-success);
}

/* Body Zone Labels */
.body-zone-label {
    position: absolute;
    font-size: 0.7rem;
    color: var(--color-text-light);
    pointer-events: none;
    white-space: nowrap;
}

/* Notes Panel */
.body-notes-panel {
    flex: 1;
    min-width: 250px;
}

.body-note-item {
    padding: var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    border-left: 3px solid var(--color-accent);
}

.body-note-item h5 {
    font-size: 0.9rem;
    color: var(--color-primary-dark);
    margin-bottom: 4px;
}

.body-note-item p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0;
}

.body-note-item .note-date {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* =============================================
   LOADING & EMPTY STATES
   ============================================= */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-primary-light);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-light);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

/* =============================================
   TABS
   ============================================= */
.tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--color-primary-light);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =============================================
   SEARCH & FILTERS
   ============================================= */
.search-bar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper svg {
    position: absolute;
    left: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-light);
}

.search-input-wrapper input {
    padding-left: 40px;
}

.filter-group {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-white);
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--color-accent);
}

.filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

/* =============================================
   QUICK ACTIONS (FAB)
   ============================================= */
.fab {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    z-index: 80;
}

.fab:hover {
    background: var(--color-accent-dark);
    transform: scale(1.1);
}

.fab svg {
    width: 24px;
    height: 24px;
}

/* =============================================
   RESPONSIVE - TABLET
   ============================================= */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .form-row.cols-2,
    .form-row.cols-3,
    .form-row.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .body-map {
        width: 200px;
    }
}

/* =============================================
   RESPONSIVE - DESKTOP
   ============================================= */
@media (min-width: 1024px) {
    .admin-sidebar {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: none;
    }
    
    .admin-main {
        margin-left: var(--sidebar-width);
    }
    
    .admin-header {
        left: var(--sidebar-width);
    }
    
    .menu-toggle {
        display: none;
    }
    
    .admin-content {
        padding: var(--space-lg);
    }
    
    .form-row.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row.cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Show full table on desktop */
    .table-responsive {
        overflow-x: visible;
    }
    
    .body-map-container {
        flex-direction: row;
    }
    
    .body-map {
        width: 220px;
    }
}

/* =============================================
   RESPONSIVE - MOBILE (admin header)
   ============================================= */
@media (max-width: 600px) {
    .admin-header {
        gap: var(--space-xs);
        padding: 0 var(--space-sm);
    }
    
    .admin-header-title {
        font-size: 1rem;
    }
    
    .admin-header-actions {
        gap: var(--space-xs);
    }
    
    .admin-header-actions .btn-sm {
        padding: var(--space-xs);
    }
    
    .admin-header-actions .btn-sm svg {
        width: 18px;
        height: 18px;
    }
    
    /* Hide button text labels, show only icons */
    .admin-header-actions .btn-label {
        display: none;
    }
}

/* Page content switching */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
}


/* Modal tabs */
.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 24px;
    border-bottom: 1px solid var(--color-primary-light);
    background: var(--color-bg);
}

.modal-tabs .tab-btn {
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-light);
    transition: all 0.2s;
}

.modal-tabs .tab-btn:hover {
    color: var(--color-text);
}

.modal-tabs .tab-btn.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Body map */
.body-map {
    max-width: 180px;
    margin: 0 auto;
}

.body-map svg {
    width: 100%;
    height: auto;
}

.body-outline {
    fill: none;
    stroke: var(--color-primary-light);
    stroke-width: 1;
}

.body-zone {
    fill: rgba(196, 164, 132, 0.1);
    stroke: var(--color-primary-light);
    stroke-width: 0.5;
    cursor: pointer;
    transition: all 0.2s;
}

.body-zone:hover {
    fill: rgba(196, 164, 132, 0.3);
}

.body-zone.active {
    fill: rgba(74, 124, 155, 0.4);
    stroke: var(--color-accent);
    stroke-width: 1.5;
}

.body-zone.has-notes {
    fill: rgba(196, 164, 132, 0.5);
}

.body-zone.has-notes.active {
    fill: rgba(74, 124, 155, 0.5);
}

.body-notes-panel {
    background: var(--color-bg);
    padding: 16px;
    border-radius: 8px;
    min-height: 200px;
}

/* Form cols-3 */
.form-row.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Stats grid for credits */
.stats-grid .stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--color-bg);
    border-radius: 12px;
}

/* Badge for status */
.badge-pending { background: rgba(196, 164, 132, 0.3); color: #8B7355; }
.badge-confirmed { background: rgba(74, 124, 155, 0.2); color: var(--color-accent); }
.badge-completed { background: rgba(107, 155, 122, 0.2); color: var(--color-success); }
.badge-cancelled { background: rgba(122, 122, 122, 0.2); color: var(--color-text-light); }


/* =============================================
   SCHEDULE PAGE STYLES
   ============================================= */
.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .schedule-grid {
        grid-template-columns: 1fr;
    }
}

.business-hours-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

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


/* =============================================
   CALENDAR - ENHANCED VIEWS
   ============================================= */

/* Month View */
.calendar-month {
    width: 100%;
    background: white;
}

.calendar-month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--color-bg);
}

.calendar-month-header .calendar-day-header {
    padding: 14px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-border);
}

.calendar-month-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-month-body .calendar-day {
    background: white;
    min-height: 120px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.calendar-month-body .calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-month-body .calendar-day:hover {
    background: rgba(74, 124, 155, 0.05);
}

.calendar-month-body .calendar-day.other-month {
    background: var(--color-bg);
    opacity: 0.6;
}

.calendar-month-body .calendar-day.today {
    background: rgba(74, 124, 155, 0.08);
}

.calendar-month-body .calendar-day-number {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.calendar-month-body .calendar-day.today .calendar-day-number {
    color: var(--color-accent);
}

/* Past days - nelze kliknout */
.calendar-month-body .calendar-day.past {
    background: #f5f5f5;
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-month-body .calendar-day.past:hover {
    background: #f5f5f5;
}

/* Closed days */
.calendar-month-body .calendar-day.closed {
    background: #fff5f5;
}

.calendar-month-body .calendar-day.closed:hover {
    background: #ffecec;
}

.closed-label {
    font-size: 10px;
    color: #dc3545;
    opacity: 0.7;
    margin-top: 2px;
}

.cal-close-toggle {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    padding: 0;
    z-index: 2;
}

.calendar-day:hover .cal-close-toggle {
    opacity: 0.6;
}

.calendar-day:hover .cal-close-toggle:hover {
    opacity: 1;
    background: rgba(0,0,0,0.08);
}

.calendar-day.closed .cal-close-toggle {
    opacity: 0.8;
}

.calendar-day .calendar-day-number {
    position: relative;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.calendar-event {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event.more {
    background: var(--color-bg);
    color: var(--color-text-light);
    text-align: center;
}

.calendar-day-summary {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    font-size: 10px;
}

.calendar-day-summary span {
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.calendar-day-summary .pending { background: #FFF3CD; color: #856404; }
.calendar-day-summary .confirmed { background: #D4EDDA; color: #155724; }
.calendar-day-summary .completed { background: #E2E3E5; color: #383D41; }

/* Client name in event chip */
.cal-ev-name {
    color: inherit;
    opacity: 0.7;
    font-size: 10px;
    margin-left: 2px;
}

/* Day revenue */
.calendar-day-revenue {
    float: right;
    font-size: 10px;
    font-weight: 400;
    color: #888;
    opacity: 0.8;
}

/* ===== Calendar Hover Popup ===== */
.calendar-popup {
    position: fixed;
    z-index: 9999;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.08);
    opacity: 0;
    transform: translateY(4px) scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}
.calendar-popup.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.cal-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
}
.cal-popup-header strong {
    text-transform: capitalize;
}
.cal-popup-header span {
    font-size: 11px;
    color: var(--color-text-light);
    background: var(--color-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

.cal-popup-body {
    padding: 6px 8px;
}

.cal-popup-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s;
}
.cal-popup-item:hover {
    background: var(--color-bg);
}
.cal-popup-item.confirmed {
    border-left: 3px solid var(--color-accent);
}
.cal-popup-item.pending {
    border-left: 3px solid #FFB300;
}
.cal-popup-item.completed {
    border-left: 3px solid #66BB6A;
    opacity: 0.7;
}

.cal-popup-time {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-accent);
    min-width: 44px;
    flex-shrink: 0;
}

.cal-popup-info {
    flex: 1;
    min-width: 0;
}
.cal-popup-client {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
}
.cal-popup-guest {
    font-size: 10px;
    font-weight: 600;
    background: #FFF3E0;
    color: #E65100;
    padding: 1px 5px;
    border-radius: 6px;
    vertical-align: middle;
}
.cal-popup-service {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 1px;
}

.cal-popup-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-light);
    text-align: right;
}
.cal-popup-footer strong {
    color: var(--color-accent);
}

.cal-popup-arrow {
    font-size: 18px;
    color: var(--color-text-light);
    margin-left: auto;
    padding-left: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}
.cal-popup-item:hover .cal-popup-arrow {
    opacity: 1;
}

/* Touch devices: disable calendar day hover effects */
@media (hover: none) and (pointer: coarse) {
    .calendar-month-body .calendar-day:hover {
        transform: none;
        box-shadow: none;
    }
    .cal-popup-arrow {
        opacity: 1;
    }
}

.cal-popup-add {
    padding: 10px 16px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    cursor: pointer;
    transition: background 0.15s;
}
.cal-popup-add:hover {
    background: var(--color-bg);
}

/* Week View */
.calendar-week {
    width: 100%;
    background: white;
}

.calendar-week-header {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
}

.calendar-time-gutter {
    padding: 2px 8px 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-light);
    text-align: right;
    border-right: 1px solid var(--color-border);
    background: var(--color-bg);
    line-height: 28px;
    white-space: nowrap;
    overflow: visible;
}

.calendar-week-day-header {
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
    border-right: 1px solid var(--color-border);
}

.calendar-week-day-header:last-child {
    border-right: none;
}

.calendar-week-day-header:hover {
    background: rgba(74, 124, 155, 0.1);
}

.calendar-week-day-header.today {
    background: rgba(74, 124, 155, 0.15);
}

.calendar-week-day-header .day-name {
    display: block;
    font-size: 11px;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.calendar-week-day-header .day-number {
    display: block;
    font-size: 20px;
    font-weight: 600;
}

.calendar-week-day-header.today .day-number {
    color: var(--color-accent);
}

.calendar-week-day-header.past {
    opacity: 0.5;
}

.calendar-week-day-header.closed {
    background: #fff5f5;
}

.calendar-week-day-header .closed-indicator {
    display: block;
    font-size: 10px;
    color: #dc3545;
    margin-top: 2px;
}

.calendar-week-body {
    max-height: 900px;
    overflow-y: auto;
}

.calendar-week-row {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    height: 28px;
    min-height: 28px;
}

.calendar-week-row.hour-start {
    border-top: 1px solid var(--color-border);
}

.calendar-week-cell {
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    height: 28px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    background: white;
}

.calendar-week-cell.hour-start {
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.calendar-week-cell:last-child {
    border-right: none;
}

/* Hover time tooltip na prázdných slotech */
.calendar-week-cell:not(.has-booking):not(.occupied):not(.past)::after {
    content: attr(data-time);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--color-accent);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    font-weight: 600;
    white-space: nowrap;
    z-index: 2;
}

.calendar-week-cell:not(.has-booking):not(.occupied):not(.past):hover::after {
    opacity: 1;
}

.calendar-week-cell:not(.has-booking):not(.occupied):hover {
    background: rgba(74, 124, 155, 0.12);
}

.calendar-week-cell.today {
    background: rgba(74, 124, 155, 0.05);
}

.calendar-week-cell.occupied {
    background: repeating-linear-gradient(
        -45deg,
        rgba(74, 124, 155, 0.03),
        rgba(74, 124, 155, 0.03) 3px,
        transparent 3px,
        transparent 6px
    );
    cursor: default;
}

/* Past slots - nelze kliknout */
.calendar-week-cell.past {
    background: #f8f8f8;
    cursor: not-allowed;
}

.calendar-week-cell.past:hover {
    background: #f8f8f8;
}

/* Outside business hours - šedé, ale klikatelné pro admina */
.calendar-week-cell.outside-hours {
    background: #f5f5f5;
}

.calendar-week-cell.outside-hours:hover {
    background: #ebebeb;
}

.calendar-week-cell.has-booking {
    padding: 0;
    overflow: visible;
    position: relative;
}

.calendar-booking {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.1s, box-shadow 0.1s;
    position: absolute;
    left: 2px;
    right: 2px;
    top: 0;
    z-index: 5;
}

.calendar-booking:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 20;
}

.calendar-booking.pending {
    background: linear-gradient(135deg, #FFF3CD 0%, #FFE8A1 100%);
    border-left: 3px solid #FFC107;
    color: #664d03;
}

.calendar-booking.confirmed {
    background: linear-gradient(135deg, #D4EDDA 0%, #B8DFC3 100%);
    border-left: 3px solid #28A745;
    color: #0f5132;
}

.calendar-booking.completed {
    background: linear-gradient(135deg, #E2E3E5 0%, #CFD0D2 100%);
    border-left: 3px solid #6C757D;
    color: #41464b;
}

.calendar-booking.cancelled {
    background: linear-gradient(135deg, #F8D7DA 0%, #F1AEB5 100%);
    border-left: 3px solid #DC3545;
    opacity: 0.6;
    color: #842029;
}

.calendar-booking .booking-time {
    font-weight: 600;
    display: block;
    font-size: 10px;
    line-height: 1.2;
}

.calendar-booking .booking-client {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9px;
    line-height: 1.2;
}

.calendar-booking .booking-service {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 8px;
    line-height: 1.2;
    opacity: 0.8;
}

/* Day View */
.calendar-day-view {
    width: 100%;
    background: white;
    padding: 20px;
}

.calendar-day-info {
    padding: 16px 20px;
    background: var(--color-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.day-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.day-stats .stat {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    background: white;
}

.day-stats .stat.pending { background: #FFF3CD; color: #856404; }
.day-stats .stat.confirmed { background: #D4EDDA; color: #155724; }
.day-stats .stat.closed-day { background: #F8D7DA; color: #721c24; }
.day-stats .stat.open-hours { background: #D1ECF1; color: #0c5460; }

.calendar-day-grid {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.calendar-day-slot {
    display: grid;
    grid-template-columns: 80px 1fr;
    min-height: 35px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.15s;
}

.calendar-day-slot:last-child {
    border-bottom: none;
}

.calendar-day-slot.hour-start {
    border-bottom: 1px solid var(--color-border);
}

.calendar-day-slot:not(.has-booking):not(.occupied):hover {
    background: rgba(74, 124, 155, 0.08);
    cursor: pointer;
}

.calendar-day-slot:not(.has-booking):not(.occupied):hover .slot-empty {
    opacity: 1;
}

.calendar-day-slot.occupied {
    background: repeating-linear-gradient(
        -45deg,
        rgba(74, 124, 155, 0.03),
        rgba(74, 124, 155, 0.03) 3px,
        transparent 3px,
        transparent 6px
    );
}

/* Past slots */
.calendar-day-slot.past {
    background: #f8f8f8;
    cursor: not-allowed;
}

.calendar-day-slot.past:hover {
    background: #f8f8f8;
}

.calendar-day-slot.past .slot-empty {
    display: none;
}

/* Outside business hours */
.calendar-day-slot.outside-hours {
    background: #f5f5f5;
}

.calendar-day-slot.outside-hours:hover {
    background: #ebebeb;
}

.calendar-day-slot.outside-hours .slot-empty {
    color: #999;
}

.calendar-day-slot .slot-time {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-light);
    border-right: 1px solid var(--color-border);
    background: var(--color-bg);
    display: flex;
    align-items: flex-start;
}

.calendar-day-slot .slot-time .slot-time-quarter {
    font-size: 10px;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.15s;
}

.calendar-day-slot:hover .slot-time .slot-time-quarter {
    opacity: 0.6;
}

.calendar-day-slot .slot-content {
    padding: 4px 16px;
    display: flex;
    align-items: center;
    min-height: 35px;
    position: relative;
}

.calendar-day-slot.has-booking .slot-content {
    padding: 0;
}

.calendar-day-slot .slot-empty {
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.15s;
}

.day-booking {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    z-index: 5;
    overflow: hidden;
}

.day-booking:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 20;
}

.day-booking.pending {
    background: linear-gradient(135deg, #FFF3CD 0%, #FFE8A1 100%);
    border-left: 4px solid #FFC107;
}

.day-booking.confirmed {
    background: linear-gradient(135deg, #D4EDDA 0%, #B8DFC3 100%);
    border-left: 4px solid #28A745;
}

.day-booking.completed {
    background: linear-gradient(135deg, #E2E3E5 0%, #CFD0D2 100%);
    border-left: 4px solid #6C757D;
}

.day-booking .booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.day-booking .booking-header strong {
    font-size: 13px;
}

.day-booking .booking-details {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.day-booking .booking-details .client {
    font-weight: 500;
}

.day-booking .booking-details .service {
    color: var(--color-text-light);
}

/* Day slot with booking needs relative position */
.calendar-day-slot.has-booking .slot-content {
    position: relative;
}

/* Calendar Responsive */
@media (max-width: 900px) {
    .calendar-week-header,
    .calendar-week-row {
        grid-template-columns: 50px repeat(7, 1fr);
    }
    
    .calendar-time-gutter {
        font-size: 10px;
        padding: 8px 4px;
    }
    
    .calendar-week-day-header .day-name {
        font-size: 9px;
    }
    
    .calendar-week-day-header .day-number {
        font-size: 16px;
    }
    
    .calendar-booking .booking-client {
        display: none;
    }
    
    .calendar-day-slot {
        grid-template-columns: 60px 1fr;
    }
    
    .calendar-day-slot .slot-time {
        font-size: 11px;
        padding: 8px;
    }
}

@media (max-width: 600px) {
    .calendar-month-body .calendar-day {
        min-height: 70px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .calendar-events {
        display: none;
    }
    
    .calendar-day-summary {
        margin-top: 2px;
    }
    
    .calendar-day-summary span {
        padding: 2px 4px;
        font-size: 9px;
    }
}

/* =============================================
   VOUCHER PREVIEW
   ============================================= */
.voucher-preview {
    padding: 24px;
    background: #f5f0eb;
}

.voucher-card {
    max-width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.voucher-header-area {
    background: linear-gradient(135deg, #C4A484 0%, #A68B6A 100%);
    color: white;
    padding: 24px 32px;
    text-align: center;
}

.voucher-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 36px;
    font-weight: 600;
    letter-spacing: 3px;
}

.voucher-subtitle {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
    letter-spacing: 2px;
}

.voucher-body-area {
    padding: 32px;
    text-align: center;
}

.voucher-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    color: var(--color-primary);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.voucher-amount {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.voucher-for {
    font-size: 16px;
    color: #555;
    margin-bottom: 8px;
}

.voucher-message {
    font-style: italic;
    color: #777;
    font-size: 14px;
    max-width: 350px;
    margin: 8px auto;
    line-height: 1.5;
}

.voucher-from {
    font-size: 13px;
    color: #999;
    margin-top: 8px;
}

.voucher-footer-area {
    background: var(--color-bg);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
}

.voucher-code {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #A68B6A;
}

.voucher-valid {
    font-size: 12px;
    color: var(--color-text-light);
}

/* =============================================
   CREDITS SUMMARY GRID
   ============================================= */
.credits-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.credits-summary .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--color-border);
}

.credits-summary .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.credits-summary .stat-info {
    flex: 1;
    min-width: 0;
}

.credits-summary .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}

.credits-summary .stat-label {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 2px;
}

/* =============================================
   DASHBOARD RESPONSIVE
   ============================================= */

@media (max-width: 600px) {
    #weeklyOverview > div {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 4px !important;
    }
    #weeklyOverview > div > div {
        padding: 8px 4px !important;
    }
}

/* =============================================
   HEALTH PROFILE - Admin Client Detail
   ============================================= */
.ahp-pressure-opt {
    text-align: center;
    padding: 14px 10px;
    border-radius: 12px;
    border: 2px solid var(--color-primary-light);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}
.ahp-pressure-opt:hover {
    border-color: var(--color-accent);
    background: #FAFCFE;
}
.ahp-pressure-opt.active {
    border-color: var(--color-accent);
    background: var(--color-accent-light, #EBF4F0);
    box-shadow: 0 0 0 1px var(--color-accent);
}

.ahp-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--color-primary-light);
    background: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text);
    font-family: inherit;
}
.ahp-chip:hover {
    border-color: var(--color-accent);
}
.ahp-chip.active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: white;
}
.ahp-chip.ahp-chip-avoid.active {
    border-color: #E57373;
    background: #FFEBEE;
    color: #C62828;
}
.ahp-chip.ahp-chip-avoid:hover {
    border-color: #E57373;
}

.ahp-condition {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--color-primary-light);
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.ahp-condition:hover {
    border-color: #FFB74D;
}
.ahp-condition.active {
    border-color: #FFB74D;
    background: #FFF8E1;
    font-weight: 500;
}

/* =============================================
   TOGGLE SWITCH
   ============================================= */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 26px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-primary, #8B6F5C);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}
/* Stats page responsive */
#page-stats .stats-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 768px) {
    #page-stats .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    #page-stats .stats-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    #page-stats .stats-grid { grid-template-columns: 1fr !important; }
}
/* =============================================
   RESPONSIVE - TABLET PORTRAIT (768-1024px)
   ============================================= */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Sidebar: show as overlay on tablet, not push */
    .admin-sidebar.open {
        width: var(--sidebar-width);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    
    /* Content gets full width */
    .admin-main {
        margin-left: 0;
    }
    
    .admin-header {
        left: 0;
    }
    
    .admin-content {
        padding: var(--space-md);
    }
    
    /* Tables: tighter padding, allow wrap */
    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
        font-size: 0.82rem;
    }
    
    /* Modals: fit tablet screen */
    .modal-lg {
        max-width: calc(100vw - 32px);
    }
    .modal-xl {
        max-width: calc(100vw - 24px);
    }
    .modal-full {
        max-width: calc(100vw - 16px);
    }
    
    /* Modal overlay: less padding on tablet */
    .modal-overlay {
        padding: var(--space-sm);
    }
    
    /* Modal tabs: scroll horizontally if needed */
    .modal-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
        padding: 0 16px;
    }
    .modal-tabs::-webkit-scrollbar {
        display: none;
    }
    .modal-tabs .tab-btn {
        flex-shrink: 0;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Stats grid: 2 columns on tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Schedule: single column */
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    /* Body map: side by side but smaller */
    .body-map-container {
        flex-direction: column;
    }
    .body-map-wrapper {
        gap: var(--space-md);
    }
    .body-map {
        max-width: 160px;
    }
    
    /* Cards: breathing room */
    .card-body {
        padding: var(--space-sm) var(--space-md);
    }

    /* Search bar + sort: stack on narrow tablet */
    .search-bar {
        flex-wrap: wrap;
    }
    .search-bar select {
        width: 100% !important;
        min-width: 0;
    }
    
    /* Pressure grid: 2x2 on tablet */
    #adminPressureGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Health form chips: allow wrap nicely */
    .ahp-chip {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* =============================================
   RESPONSIVE - TABLET LANDSCAPE & SMALL LAPTOP (1024-1280px)
   ============================================= */
@media (min-width: 1024px) and (max-width: 1280px) {
    .admin-content {
        padding: var(--space-md);
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .modal-xl {
        max-width: calc(100vw - 80px);
    }
}

/* =============================================
   RESPONSIVE - MOBILE IMPROVEMENTS (<768px)
   ============================================= */
@media (max-width: 767px) {
    /* Modal: full-screen on mobile */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal,
    .modal-lg,
    .modal-xl,
    .modal-full {
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        margin: 0;
    }
    
    .modal-body {
        max-height: calc(100vh - 140px);
        max-height: calc(100dvh - 140px);
    }
    
    /* Modal tabs: horizontal scroll */
    .modal-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
        padding: 0 12px;
    }
    .modal-tabs::-webkit-scrollbar {
        display: none;
    }
    .modal-tabs .tab-btn {
        flex-shrink: 0;
        padding: 10px 10px;
        font-size: 12px;
    }
    
    /* Tables: compact on mobile */
    .admin-table th,
    .admin-table td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    /* Hide less important table columns on small screens */
    .admin-table .hide-mobile {
        display: none;
    }
    
    /* Search bar: stack vertically */
    .search-bar {
        flex-direction: column;
        gap: 8px;
    }
    .search-bar select {
        width: 100% !important;
    }
    
    /* Stats: single column */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Body map: smaller on mobile */
    .body-map {
        max-width: 140px;
    }
    .body-map-wrapper {
        gap: var(--space-sm);
    }
    
    /* Pressure grid: 2x2 on mobile */
    #adminPressureGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Card padding */
    .card-body {
        padding: var(--space-sm);
    }
    
    /* Admin header */
    .admin-header {
        height: 50px;
    }
    .admin-main {
        padding-top: 50px;
    }
    
    /* Buttons: touch-friendly sizing */
    .btn {
        min-height: 40px;
    }
    .btn-sm {
        min-height: 34px;
    }
}

/* =============================================
   TOUCH DEVICE IMPROVEMENTS
   ============================================= */
@media (hover: none) and (pointer: coarse) {
    /* Bigger touch targets */
    .nav-link {
        padding: 14px var(--space-md);
    }
    
    .admin-table tbody tr {
        min-height: 48px;
    }
    
    .admin-table td {
        padding: 10px 6px;
    }
    
    /* Remove hover effects that look stuck on touch */
    .admin-table tbody tr:hover {
        background: transparent;
    }
    .admin-table tbody tr:active {
        background: var(--color-bg);
    }
    
    /* Modal close bigger tap target */
    .modal-close {
        padding: 12px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Chips: bigger tap targets */
    .ahp-chip {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }
    
    .ahp-condition {
        min-height: 40px;
    }
    
    .ahp-pressure-opt {
        min-height: 60px;
    }
    
    /* Sort select: bigger */
    #clientSort {
        min-height: 40px;
        font-size: 14px !important;
    }
    
    /* Badges: prevent accidental overlap */
    .badge {
        margin: 1px;
    }

    /* Scrollable table wrapper visual hint */
    .table-responsive {
        position: relative;
    }
    .table-responsive::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, rgba(250,248,245,0.8), transparent);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    .table-responsive.has-scroll::after {
        opacity: 1;
    }
}

/* =============================================
   DASHBOARD 2-COL GRID (responsive)
   ============================================= */
.dashboard-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

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

/* =============================================
   SAFE AREA (notch devices / iPad rounded corners)
   ============================================= */
@supports (padding: env(safe-area-inset-bottom)) {
    .admin-sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .modal-footer {
        padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
    }
    
    .admin-header {
        padding-top: env(safe-area-inset-top);
    }
}