/**
 * AppointmentDesk — Standalone Cockpit
 * Full-screen, touch-friendly layout for iPad/tablet use.
 */

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

body.adesk-cockpit-standalone {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f1f5f9;
    color: #1d2327;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#adesk-cockpit-app {
    min-height: 100vh;
}

/* === Top Bar === */
.adesk-cp-topbar {
    background: linear-gradient(135deg, #1d2327 0%, #2563eb 50%, #7c3aed 100%);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.adesk-cp-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adesk-cp-topbar-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.adesk-cp-topbar-date {
    font-size: 13px;
    opacity: 0.8;
}

.adesk-cp-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.adesk-cp-filter {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    min-height: 44px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.adesk-cp-filter option {
    background: #1d2327;
    color: #fff;
}

.adesk-cp-filter:focus {
    outline: none;
    border-color: rgba(255,255,255,0.6);
}

.adesk-cp-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0;
}

.adesk-cp-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.adesk-cp-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.adesk-cp-toggle-active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* === Stats Bar === */
.adesk-cp-stats {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    overflow-x: auto;
}

.adesk-cp-stat {
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    flex: 1;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.adesk-cp-stat-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #1d2327;
}

.adesk-cp-stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.adesk-cp-stat-confirmed .adesk-cp-stat-num { color: #059669; }
.adesk-cp-stat-pending .adesk-cp-stat-num { color: #d97706; }
.adesk-cp-stat-completed .adesk-cp-stat-num { color: #2563eb; }
.adesk-cp-stat-cancelled .adesk-cp-stat-num { color: #dc2626; }

/* === Main Layout === */
.adesk-cp-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    padding: 0 20px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* === Cards === */
.adesk-cp-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.adesk-cp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.adesk-cp-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 6px;
}

.adesk-cp-card-title .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #64748b;
}

.adesk-cp-card-meta {
    font-size: 12px;
    color: #94a3b8;
}

/* === Timeline === */
.adesk-cp-timeline {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.adesk-cp-apt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 52px;
}

.adesk-cp-apt:hover {
    background: #f8fafc;
}

.adesk-cp-apt-past {
    opacity: 0.5;
}

.adesk-cp-apt-current {
    background: #eff6ff;
    border-left: 3px solid #2563eb;
}

.adesk-cp-apt-time {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    min-width: 48px;
    text-align: center;
    flex-shrink: 0;
}

.adesk-cp-apt-bar {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.adesk-cp-apt-info {
    flex: 1;
    min-width: 0;
}

.adesk-cp-apt-customer {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adesk-cp-apt-service {
    font-size: 12px;
    color: #64748b;
}

.adesk-cp-apt-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* === Status Badges === */
.adesk-cp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.adesk-cp-badge-confirmed { background: #dcfce7; color: #166534; }
.adesk-cp-badge-pending { background: #fef3c7; color: #92400e; }
.adesk-cp-badge-completed { background: #dbeafe; color: #1e40af; }
.adesk-cp-badge-cancelled { background: #fee2e2; color: #991b1b; }
.adesk-cp-badge-declined { background: #fce4ec; color: #880e4f; }

/* === Check-in Button === */
.adesk-cp-checkin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0;
}

.adesk-cp-checkin-btn:hover {
    background: #dcfce7;
    border-color: #86efac;
}

.adesk-cp-checkin-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.adesk-cp-checkin-badge {
    font-size: 11px;
    color: #16a34a;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

/* === Next Up === */
.adesk-cp-nextup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.adesk-cp-nextup-item:last-child {
    border-bottom: none;
}

.adesk-cp-nextup-time {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    min-width: 44px;
}

.adesk-cp-nextup-info {
    flex: 1;
    min-width: 0;
}

.adesk-cp-nextup-name {
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
}

.adesk-cp-nextup-service {
    font-size: 11px;
    color: #94a3b8;
}

/* === Quick Book Button === */
.adesk-cp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    min-height: 44px;
}

.adesk-cp-btn-primary {
    background: #2563eb;
    color: #fff;
}

.adesk-cp-btn-primary:hover {
    background: #1d4ed8;
}

.adesk-cp-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

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

.adesk-cp-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 36px;
}

.adesk-cp-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

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

.adesk-cp-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.adesk-cp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.adesk-cp-modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d2327;
}

.adesk-cp-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0;
}

.adesk-cp-modal-close:hover {
    background: #f1f5f9;
    color: #1d2327;
}

.adesk-cp-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.adesk-cp-modal-body {
    padding: 20px;
}

.adesk-cp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
}

/* === Form Elements === */
.adesk-cp-field {
    margin-bottom: 16px;
}

.adesk-cp-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.adesk-cp-field input,
.adesk-cp-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    min-height: 44px;
    background: #fff;
    color: #1d2327;
    transition: border-color 0.15s;
}

.adesk-cp-field input:focus,
.adesk-cp-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.adesk-cp-field-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* === Customer Autocomplete === */
.adesk-cp-autocomplete {
    position: relative;
}

.adesk-cp-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.adesk-cp-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.adesk-cp-autocomplete-item:hover {
    background: #eff6ff;
}

.adesk-cp-autocomplete-item:last-child {
    border-bottom: none;
}

/* === Empty State === */
.adesk-cp-empty {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
}

.adesk-cp-empty .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.adesk-cp-empty-text {
    font-size: 14px;
}

/* === Loading === */
.adesk-cp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
}

.adesk-cp-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: adesk-cp-spin 0.6s linear infinite;
}

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

/* === Toast === */
.adesk-cp-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1d2327;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: adesk-cp-slide-in 0.3s ease;
}

.adesk-cp-toast-success { background: #059669; }
.adesk-cp-toast-error { background: #dc2626; }

@keyframes adesk-cp-slide-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* === Dark Mode === */
.adesk-cockpit-dark {
    background: #0f172a;
    color: #e2e8f0;
}

.adesk-cockpit-dark .adesk-cp-stat,
.adesk-cockpit-dark .adesk-cp-card {
    background: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.adesk-cockpit-dark .adesk-cp-stat-num { color: #e2e8f0; }
.adesk-cockpit-dark .adesk-cp-stat-confirmed .adesk-cp-stat-num { color: #34d399; }
.adesk-cockpit-dark .adesk-cp-stat-pending .adesk-cp-stat-num { color: #fbbf24; }
.adesk-cockpit-dark .adesk-cp-stat-completed .adesk-cp-stat-num { color: #60a5fa; }
.adesk-cockpit-dark .adesk-cp-stat-cancelled .adesk-cp-stat-num { color: #f87171; }

.adesk-cockpit-dark .adesk-cp-stat-label { color: #94a3b8; }

.adesk-cockpit-dark .adesk-cp-card-header { border-bottom-color: #334155; }
.adesk-cockpit-dark .adesk-cp-card-title { color: #e2e8f0; }
.adesk-cockpit-dark .adesk-cp-card-title .dashicons { color: #94a3b8; }
.adesk-cockpit-dark .adesk-cp-card-meta { color: #64748b; }

.adesk-cockpit-dark .adesk-cp-apt:hover { background: #334155; }
.adesk-cockpit-dark .adesk-cp-apt-current { background: #1e3a5f; border-left-color: #60a5fa; }
.adesk-cockpit-dark .adesk-cp-apt-time { color: #cbd5e1; }
.adesk-cockpit-dark .adesk-cp-apt-customer { color: #e2e8f0; }
.adesk-cockpit-dark .adesk-cp-apt-service { color: #94a3b8; }

.adesk-cockpit-dark .adesk-cp-nextup-item { border-bottom-color: #334155; }
.adesk-cockpit-dark .adesk-cp-nextup-time { color: #60a5fa; }
.adesk-cockpit-dark .adesk-cp-nextup-name { color: #e2e8f0; }
.adesk-cockpit-dark .adesk-cp-nextup-service { color: #64748b; }

.adesk-cockpit-dark .adesk-cp-badge-confirmed { background: #064e3b; color: #6ee7b7; }
.adesk-cockpit-dark .adesk-cp-badge-pending { background: #451a03; color: #fcd34d; }
.adesk-cockpit-dark .adesk-cp-badge-completed { background: #1e3a5f; color: #93c5fd; }
.adesk-cockpit-dark .adesk-cp-badge-cancelled { background: #450a0a; color: #fca5a5; }

.adesk-cockpit-dark .adesk-cp-checkin-btn {
    background: #064e3b;
    border-color: #065f46;
    color: #34d399;
}

.adesk-cockpit-dark .adesk-cp-checkin-badge {
    background: #064e3b;
    color: #34d399;
}

.adesk-cockpit-dark .adesk-cp-field input,
.adesk-cockpit-dark .adesk-cp-field select {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.adesk-cockpit-dark .adesk-cp-field input:focus,
.adesk-cockpit-dark .adesk-cp-field select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96,165,250,0.15);
}

.adesk-cockpit-dark .adesk-cp-field label { color: #cbd5e1; }

.adesk-cockpit-dark .adesk-cp-modal {
    background: #1e293b;
}

.adesk-cockpit-dark .adesk-cp-modal-header { border-bottom-color: #334155; }
.adesk-cockpit-dark .adesk-cp-modal-title { color: #e2e8f0; }
.adesk-cockpit-dark .adesk-cp-modal-footer { border-top-color: #334155; }

.adesk-cockpit-dark .adesk-cp-btn-secondary {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

.adesk-cockpit-dark .adesk-cp-btn-secondary:hover {
    background: #475569;
}

.adesk-cockpit-dark .adesk-cp-autocomplete-results {
    background: #1e293b;
    border-color: #334155;
}

.adesk-cockpit-dark .adesk-cp-autocomplete-item {
    border-bottom-color: #334155;
}

.adesk-cockpit-dark .adesk-cp-autocomplete-item:hover {
    background: #334155;
}

.adesk-cockpit-dark .adesk-cp-toast {
    background: #334155;
}

.adesk-cockpit-dark .adesk-cp-empty { color: #64748b; }

/* === View Switcher === */
.adesk-cp-view-switch {
    display: inline-flex;
    gap: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 2px;
}

.adesk-cp-view-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    border-radius: 6px;
    transition: all 0.15s;
    min-height: 36px;
}

.adesk-cp-view-btn:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
}

.adesk-cp-view-btn.active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-weight: 600;
}

/* === Date Navigation === */
.adesk-cp-date-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.adesk-cp-date-input {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    min-height: 36px;
    max-width: 150px;
}

.adesk-cp-date-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.6);
}

.adesk-cp-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* === Week View === */
.adesk-cp-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 0 20px 20px;
}

.adesk-cp-week-day {
    background: #fff;
    border-radius: 12px;
    min-height: 200px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.adesk-cp-week-day-today {
    border: 2px solid #2563eb;
}

.adesk-cp-week-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.15s;
}

.adesk-cp-week-day-header:hover {
    background: #eff6ff;
}

.adesk-cp-week-day-today .adesk-cp-week-day-header {
    background: #eff6ff;
}

.adesk-cp-week-day-name {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}

.adesk-cp-week-day-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 0 6px;
}

.adesk-cp-week-day-empty {
    padding: 16px;
    text-align: center;
    color: #cbd5e1;
    font-size: 13px;
}

.adesk-cp-week-day-list {
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.adesk-cp-week-apt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
    min-height: 32px;
}

.adesk-cp-week-apt:hover {
    background: #f0f6ff;
}

.adesk-cp-week-apt-time {
    font-weight: 600;
    color: #1d2327;
    min-width: 40px;
    flex-shrink: 0;
}

.adesk-cp-week-apt-bar {
    width: 3px;
    height: 18px;
    border-radius: 2px;
    flex-shrink: 0;
}

.adesk-cp-week-apt-name {
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === Month View === */
.adesk-cp-month {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin: 0 20px 20px;
}

.adesk-cp-month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.adesk-cp-month-weekday {
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.adesk-cp-month-cell {
    padding: 10px;
    min-height: 70px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.adesk-cp-month-cell:nth-child(7n) {
    border-right: none;
}

.adesk-cp-month-cell:hover {
    background: #f8fafc;
}

.adesk-cp-month-cell-other {
    opacity: 0.3;
}

.adesk-cp-month-cell-today {
    background: #eff6ff;
}

.adesk-cp-month-cell-today:hover {
    background: #dbeafe;
}

.adesk-cp-month-cell-has-apts {
    background: #fefce8;
}

.adesk-cp-month-cell-has-apts:hover {
    background: #fef9c3;
}

.adesk-cp-month-cell-today.adesk-cp-month-cell-has-apts {
    background: #dbeafe;
}

.adesk-cp-month-cell-day {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.adesk-cp-month-cell-today .adesk-cp-month-cell-day {
    color: #2563eb;
    font-weight: 700;
}

.adesk-cp-month-cell-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 0 6px;
}

/* === Dark Mode additions for week/month === */
.adesk-cockpit-dark .adesk-cp-week-day {
    background: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.adesk-cockpit-dark .adesk-cp-week-day-today {
    border-color: #60a5fa;
}

.adesk-cockpit-dark .adesk-cp-week-day-header {
    background: #334155;
    border-bottom-color: #475569;
}

.adesk-cockpit-dark .adesk-cp-week-day-today .adesk-cp-week-day-header {
    background: #1e3a5f;
}

.adesk-cockpit-dark .adesk-cp-week-day-name { color: #e2e8f0; }
.adesk-cockpit-dark .adesk-cp-week-day-empty { color: #475569; }
.adesk-cockpit-dark .adesk-cp-week-apt:hover { background: #334155; }
.adesk-cockpit-dark .adesk-cp-week-apt-time { color: #cbd5e1; }
.adesk-cockpit-dark .adesk-cp-week-apt-name { color: #e2e8f0; }

.adesk-cockpit-dark .adesk-cp-month {
    background: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.adesk-cockpit-dark .adesk-cp-month-header {
    background: #334155;
    border-bottom-color: #475569;
}

.adesk-cockpit-dark .adesk-cp-month-weekday { color: #94a3b8; }

.adesk-cockpit-dark .adesk-cp-month-grid {
    border-color: #334155;
}

.adesk-cockpit-dark .adesk-cp-month-cell {
    border-right-color: #334155;
    border-bottom-color: #334155;
}

.adesk-cockpit-dark .adesk-cp-month-cell:hover { background: #334155; }
.adesk-cockpit-dark .adesk-cp-month-cell-today { background: #1e3a5f; }
.adesk-cockpit-dark .adesk-cp-month-cell-today:hover { background: #1e3a5f; }
.adesk-cockpit-dark .adesk-cp-month-cell-has-apts { background: #422006; }
.adesk-cockpit-dark .adesk-cp-month-cell-has-apts:hover { background: #451a03; }
.adesk-cockpit-dark .adesk-cp-month-cell-today.adesk-cp-month-cell-has-apts { background: #1e3a5f; }
.adesk-cockpit-dark .adesk-cp-month-cell-day { color: #cbd5e1; }
.adesk-cockpit-dark .adesk-cp-month-cell-today .adesk-cp-month-cell-day { color: #60a5fa; }

/* === Responsive === */
@media (max-width: 900px) {
    .adesk-cp-layout {
        grid-template-columns: 1fr;
    }

    .adesk-cp-topbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .adesk-cp-topbar-left {
        width: 100%;
    }

    .adesk-cp-stats {
        padding: 12px 16px;
        gap: 8px;
    }

    .adesk-cp-stat {
        padding: 10px 12px;
        min-width: 80px;
    }

    .adesk-cp-stat-num {
        font-size: 22px;
    }

    .adesk-cp-layout {
        padding: 0 12px 12px;
    }

    .adesk-cp-week {
        grid-template-columns: 1fr;
        padding: 0 12px 12px;
    }

    .adesk-cp-week-day {
        min-height: auto;
    }

    .adesk-cp-month {
        margin: 0 12px 12px;
    }

    .adesk-cp-month-cell {
        min-height: 44px;
        padding: 6px;
    }

    .adesk-cp-month-cell-day {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .adesk-cp-topbar {
        padding: 10px 12px;
    }

    .adesk-cp-topbar-title {
        font-size: 16px;
    }

    .adesk-cp-stats {
        flex-wrap: wrap;
    }

    .adesk-cp-stat {
        flex: 1 1 45%;
    }
}

/* ============================================
   QUEUE PANEL
   ============================================ */

.adesk-queue-panel {
    background: var(--adesk-card-bg, #fff);
    border: 1px solid var(--adesk-border, #e2e8f0);
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
}

.adesk-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.adesk-queue-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.adesk-queue-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.adesk-queue-stats strong {
    font-weight: 700;
}

.adesk-queue-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 200px;
}

.adesk-queue-staff {
    border-right: 1px solid var(--adesk-border, #e2e8f0);
    padding: 12px;
}

.adesk-queue-staff h4,
.adesk-queue-waiting h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--adesk-text-muted, #64748b);
    margin: 0 0 10px 0;
}

.adesk-queue-counter {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--adesk-border, #e2e8f0);
    transition: all 0.2s;
}

.adesk-queue-counter-available {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.adesk-queue-counter-busy {
    background: #fef3c7;
    border-color: #fde68a;
}

.adesk-queue-counter-paused {
    background: #f1f5f9;
    border-color: #e2e8f0;
    opacity: 0.7;
}

.adesk-queue-counter-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.adesk-queue-counter-ticket {
    font-size: 20px;
    font-weight: 700;
    color: #6366f1;
    line-height: 1.2;
}

.adesk-queue-counter-customer {
    font-size: 12px;
    color: var(--adesk-text-muted, #64748b);
    margin-bottom: 6px;
}

.adesk-queue-counter-status {
    font-size: 11px;
    font-style: italic;
    color: var(--adesk-text-muted, #94a3b8);
    margin-bottom: 6px;
}

.adesk-queue-counter-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.adesk-queue-counter-actions button {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s;
}

.adesk-queue-btn-confirm {
    background: #10b981;
    color: #fff;
    border-color: #059669;
}

.adesk-queue-btn-confirm:hover { background: #059669; }

.adesk-queue-btn-complete {
    background: #6366f1;
    color: #fff;
    border-color: #4f46e5;
}

.adesk-queue-btn-complete:hover { background: #4f46e5; }

.adesk-queue-btn-skip {
    background: #f59e0b;
    color: #fff;
    border-color: #d97706;
}

.adesk-queue-btn-skip:hover { background: #d97706; }

.adesk-queue-btn-decline {
    background: #ef4444;
    color: #fff;
    border-color: #dc2626;
}

.adesk-queue-btn-decline:hover { background: #dc2626; }

.adesk-queue-btn-next {
    background: #6366f1;
    color: #fff;
    border-color: #4f46e5;
    font-size: 12px;
    padding: 6px 14px;
}

.adesk-queue-btn-next:hover { background: #4f46e5; }

.adesk-queue-btn-available {
    background: #10b981;
    color: #fff;
    border-color: #059669;
}

.adesk-queue-btn-available:hover { background: #059669; }

.adesk-queue-btn-pause {
    background: #94a3b8;
    color: #fff;
    border-color: #64748b;
}

.adesk-queue-btn-pause:hover { background: #64748b; }

/* Waiting queue list */
.adesk-queue-waiting {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.adesk-queue-ticket {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--adesk-border, #f1f5f9);
    transition: background 0.15s;
}

.adesk-queue-ticket:hover {
    background: #f8fafc;
}

.adesk-queue-ticket:last-child {
    border-bottom: none;
}

.adesk-queue-ticket-number {
    font-weight: 700;
    font-size: 15px;
    color: #6366f1;
    min-width: 60px;
}

.adesk-queue-ticket-name {
    flex: 1;
    font-size: 13px;
    color: var(--adesk-text, #1e293b);
}

.adesk-queue-ticket-wait {
    font-size: 12px;
    color: var(--adesk-text-muted, #94a3b8);
    white-space: nowrap;
}

.adesk-queue-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--adesk-text-muted, #94a3b8);
    font-size: 14px;
}

.adesk-queue-pull-section {
    padding: 10px 16px;
    border-top: 1px solid var(--adesk-border, #e2e8f0);
    text-align: center;
}

.adesk-queue-pull-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.adesk-queue-pull-btn:hover {
    background: #4f46e5;
}

/* Dark mode overrides */
[data-theme="dark"] .adesk-queue-panel {
    background: var(--adesk-card-bg, #1e293b);
}

[data-theme="dark"] .adesk-queue-counter-available {
    background: #064e3b;
    border-color: #065f46;
}

[data-theme="dark"] .adesk-queue-counter-busy {
    background: #451a03;
    border-color: #78350f;
}

[data-theme="dark"] .adesk-queue-counter-paused {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .adesk-queue-ticket:hover {
    background: #334155;
}

/* Responsive */
@media (max-width: 768px) {
    .adesk-queue-body {
        grid-template-columns: 1fr;
    }
    .adesk-queue-staff {
        border-right: none;
        border-bottom: 1px solid var(--adesk-border, #e2e8f0);
    }
}
