﻿/* ============================================================
   Altemo — Cabinet Styles (Brandbook v2.0 — Light Theme)
   See: 04_Marketing/brandbook.md
   ============================================================ */

:root {
    --bg-dark: #FFFFFF;
    --bg-card: #F8FAFC;
    --bg-card-hover: #F1F5F9;
    --bg-sidebar: #F8FAFC;
    --bg-input: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --accent: #4F46E5;
    --accent-hover: #4338CA;
    --accent-glow: rgba(79, 70, 229, 0.15);
    --green: #059669;
    --red: #DC2626;
    --orange: #D97706;
    --blue: #2563EB;
    --border: #CBD5E1;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease;
    --gradient-primary: linear-gradient(135deg, #4F46E5, #7C3AED);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Golos Text', 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ============================================================
   AUTH SCREEN
   ============================================================ */

.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 50%, #FDF2F8 100%);
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow), 0 0 60px var(--accent-glow);
    border: 1px solid var(--border);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.auth-form h2 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.btn-sm {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.btn-copy {
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-copy:hover {
    opacity: 0.9;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.error-msg {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: var(--radius-sm);
    color: var(--red);
    font-size: 14px;
    text-align: center;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-logo {
    padding: 24px 20px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo span {
    -webkit-text-fill-color: initial;
    font-size: 24px;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-family: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent);
    color: white;
    font-weight: 500;
}

.nav-item.logout {
    color: var(--red);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-left h2 {
    font-size: 20px;
    font-weight: 600;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.owner-name {
    color: var(--text-secondary);
    font-size: 14px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.mode-btn {
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.mode-btn.active {
    background: var(--accent);
    color: white;
}

/* Content Area */
.content-area {
    padding: 24px 32px;
    flex: 1;
}

.section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #fff;
}

.stat-icon-circle.purple {
    background: linear-gradient(135deg, var(--accent), #8B5CF6);
}

.stat-icon-circle.blue {
    background: linear-gradient(135deg, var(--blue), #60A5FA);
}

.stat-icon-circle.green {
    background: linear-gradient(135deg, var(--green), #34D399);
}

.stat-icon-circle.orange {
    background: linear-gradient(135deg, var(--orange), #FBBF24);
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.accent-purple .stat-value {
    color: var(--accent);
}

.accent-blue .stat-value {
    color: var(--blue);
}

.accent-green .stat-value {
    color: var(--green);
}

.accent-orange .stat-value {
    color: var(--orange);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.card h3 {
    margin-bottom: 16px;
    font-size: 16px;
}

.hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.link-share {
    display: flex;
    gap: 8px;
}

.link-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: monospace;
}

/* QR Code Section */
.qr-section {
    display: flex;
    gap: 32px;
    margin-top: 20px;
    align-items: flex-start;
}

.qr-code-wrapper {
    text-align: center;
    flex-shrink: 0;
}

.qr-code-img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 8px;
    background: white;
    transition: var(--transition);
}

.qr-code-img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.qr-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    max-width: 200px;
}

.share-buttons {
    flex: 1;
}

.share-buttons h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

/* Compact icon-only share buttons */
.share-icons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: #fff;
}

.share-icon-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.share-icon-btn.share-whatsapp {
    background: #25D366;
}

.share-icon-btn.share-telegram {
    background: #0088cc;
}

.share-icon-btn.share-vk {
    background: #4680C2;
}

.share-icon-btn.share-ok {
    background: #EE8208;
}

.share-icon-btn.share-email {
    background: var(--accent);
}

.share-icon-btn.share-print {
    background: #64748B;
}

.share-icon {
    font-size: 18px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
}

.filters {
    display: flex;
    gap: 8px;
}

.filters input,
.filters select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.filters input:focus,
.filters select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Items List */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.item-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.item-info h4 {
    font-size: 15px;
    font-weight: 600;
}

.item-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.btn-icon:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.btn-icon.danger {
    color: var(--red);
    border-color: rgba(220, 38, 38, 0.3);
}

.btn-icon.danger:hover {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid;
}

.badge-pending {
    background: rgba(217, 119, 6, 0.12);
    color: #92400E;
    border-color: rgba(217, 119, 6, 0.3);
}

.badge-confirmed {
    background: rgba(5, 150, 105, 0.12);
    color: #065F46;
    border-color: rgba(5, 150, 105, 0.3);
}

.badge-cancelled {
    background: rgba(220, 38, 38, 0.12);
    color: #991B1B;
    border-color: rgba(220, 38, 38, 0.3);
}

.badge-past {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.3);
}

/* Calendar View */
.calendar-view {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(auto-fill, minmax(120px, 1fr));
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
}

.calendar-header div {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-row {
    display: grid;
    grid-template-columns: 80px repeat(auto-fill, minmax(120px, 1fr));
    border-bottom: 1px solid var(--border);
}

.calendar-row:last-child {
    border-bottom: none;
}

.calendar-time {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
}

.calendar-cell {
    padding: 8px;
    min-height: 60px;
    border-right: 1px solid var(--border);
}

.calendar-cell:last-child {
    border-right: none;
}

.calendar-slot {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 4px;
    background: rgba(79, 70, 229, 0.1);
    border-left: 3px solid var(--accent);
    color: var(--text-primary);
}

.calendar-slot.free {
    background: rgba(5, 150, 105, 0.1);
    border-left-color: var(--green);
    color: var(--green);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow);
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Feedback FAB */
.feedback-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    transition: var(--transition);
    z-index: 999;
    font-family: inherit;
    animation: pulse 2s infinite;
}

.feedback-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(79, 70, 229, 0.4);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(255, 107, 107, 0.6);
    }
}

.feedback-types {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.feedback-type-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-family: inherit;
    text-align: center;
}

.feedback-type-btn.active {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(79, 70, 229, 0.08);
}

.feedback-type-btn:hover {
    border-color: var(--accent);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Success toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--green);
    border-radius: var(--radius-sm);
    color: var(--green);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================
   SUPPORT TICKETS
   ============================================================ */

.support-filters {
    display: flex;
    gap: 6px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
}

/* Support Stats */
.support-stats {
    margin-bottom: 16px;
}

.support-stat-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.support-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.support-stat-badge.bug {
    background: rgba(255, 71, 87, 0.12);
    color: var(--red);
}

.support-stat-badge.idea {
    background: rgba(79, 70, 229, 0.12);
    color: var(--accent);
}

.support-stat-badge.inconvenient {
    background: rgba(255, 165, 2, 0.12);
    color: var(--orange);
}

.support-stat-badge.total {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

/* Ticket Cards */
.ticket-card {
    border-left: 4px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.ticket-card .item-info {
    width: 100%;
}

.ticket-card .item-actions {
    align-self: flex-end;
}

.ticket-card.ticket-open {
    border-left-color: var(--green);
}

.ticket-card.ticket-in_progress {
    border-left-color: var(--orange);
}

.ticket-card.ticket-resolved {
    border-left-color: var(--blue);
}

.ticket-card.ticket-closed {
    border-left-color: var(--text-muted);
    opacity: 0.7;
}

.ticket-card.ticket-wontfix {
    border-left-color: var(--red);
    opacity: 0.7;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.ticket-status {
    font-size: 12px;
    font-weight: 600;
}

.ticket-priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.priority-P1 {
    background: rgba(255, 71, 87, 0.2);
    color: var(--red);
}

.priority-P2 {
    background: rgba(255, 165, 2, 0.2);
    color: var(--orange);
}

.priority-P3 {
    background: rgba(255, 196, 0, 0.2);
    color: #b8860b;
}

.priority-P4 {
    background: rgba(0, 214, 143, 0.15);
    color: var(--green);
}

.priority-P5 {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.group-label {
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
}

.ticket-date {
    font-size: 12px;
    color: var(--text-muted);
}

.resolution-note {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(0, 214, 143, 0.08);
    border: 1px solid rgba(0, 214, 143, 0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
}

.response-indicator {
    font-size: 13px;
    font-weight: 500;
}

/* Ticket Group Cards */
.ticket-group {
    border-left: 4px solid var(--accent);
}

.ticket-group h4 {
    font-size: 14px;
    word-break: break-all;
}

.negative-warning {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(255, 71, 87, 0.12);
    color: var(--red);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .top-bar {
        padding: 12px 16px;
    }

    .content-area {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mode-toggle {
        display: none;
    }

    .link-share {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .feedback-fab {
        bottom: 16px;
        right: 16px;
        font-size: 13px;
        padding: 12px 18px;
    }
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */

.add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.add-row input,
.add-row select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-primary);
}

.add-row input {
    flex: 1;
    min-width: 180px;
}

.add-row select {
    min-width: 120px;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-confirmed {
    background: rgba(5, 150, 105, 0.1);
    color: var(--green);
}

.status-pending {
    background: rgba(217, 119, 6, 0.1);
    color: var(--orange);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent-glow);
    color: var(--accent);
    margin-left: 4px;
}

.btn-danger-sm {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.btn-danger-sm:hover {
    background: var(--red);
    color: white;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-size: 14px;
}

.hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.hint code {
    background: var(--bg-card-hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ============================================================
   NOTIFICATION CONTACTS
   ============================================================ */

.notify-link-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.notify-deeplink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.notify-deeplink:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.notify-contacts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.notify-contact-card {
    border: 1px solid var(--border);
    transition: var(--transition);
}

.notify-contact-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.notify-inactive {
    opacity: 0.55;
}

.notify-contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.notify-contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notify-username {
    font-size: 15px;
    color: var(--accent);
}

.notify-contact-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notify-contact-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.notify-role-row,
.notify-types-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.notify-label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 100px;
    padding-top: 4px;
}

.notify-role-select {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.notify-role-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notify-types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.notify-type-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.notify-type-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.notify-type-label input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #CBD5E1;
    border-radius: 22px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--green);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(18px);
}

/* ============================================================
   Schedule — Calendar-based UI
   ============================================================ */

.schedule-toolbar {
    margin-bottom: 20px;
}

.schedule-toolbar select {
    width: 100%;
    max-width: 360px;
}

.schedule-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.schedule-card h4 {
    margin: 0 0 16px;
}

/* Weekday Grid */
.schedule-week-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.weekday-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.weekday-row.active {
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.weekday-row.inactive {
    background: var(--bg-main);
    border: 1px solid var(--border);
    opacity: 0.7;
}

.weekday-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    cursor: pointer;
    font-weight: 500;
}

.weekday-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.weekday-label {
    font-size: 14px;
    color: var(--text-primary);
}

.weekday-times {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    transition: opacity 0.2s;
}

.weekday-times input[type="time"] {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    width: 110px;
}

.weekday-times span {
    color: var(--text-secondary);
}

.schedule-staff-tag {
    display: inline-block;
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
    font-weight: 500;
}

/* Mini Calendar */
.schedule-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.schedule-calendar-header h4 {
    margin: 0;
    font-size: 16px;
}

.schedule-calendar {
    user-select: none;
}

.cal-header,
.cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-header {
    margin-bottom: 4px;
}

.cal-cell {
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.cal-cell.cal-day-name {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

.cal-cell.empty {
    background: none;
}

.cal-cell.working {
    background: rgba(5, 150, 105, 0.12);
    color: var(--green);
}

.cal-cell.off {
    background: var(--bg-main);
    color: var(--text-muted);
}

.cal-cell.blocked {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    text-decoration: line-through;
}

.cal-cell.today {
    box-shadow: inset 0 0 0 2px var(--accent);
    font-weight: 700;
}

/* Legend */
.schedule-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.legend-dot.working {
    background: rgba(5, 150, 105, 0.5);
}

.legend-dot.off {
    background: var(--border);
}

.legend-dot.blocked {
    background: rgba(239, 68, 68, 0.5);
}

/* Responsive */
@media (max-width: 600px) {
    .weekday-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .weekday-check {
        min-width: auto;
    }

    .cal-cell {
        padding: 6px 2px;
        font-size: 11px;
    }
}

/* Clickable stat cards */
.stat-card.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card.clickable:active {
    transform: translateY(-1px);
}

/* VK / OK share buttons */
.share-btn.share-vk {
    border-color: #4C75A3;
    color: #4C75A3;
}

.share-btn.share-vk:hover {
    background: rgba(76, 117, 163, 0.1);
}

.share-btn.share-ok {
    border-color: #EE8208;
    color: #EE8208;
}

.share-btn.share-ok:hover {
    background: rgba(238, 130, 8, 0.1);
}

/* Staff Accordion */
.staff-accordion {
    cursor: pointer;
    transition: var(--transition);
}

.staff-accordion:hover {
    background: var(--bg-card-hover);
}

.accordion-arrow {
    display: inline-block;
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.accordion-arrow.open {
    transform: rotate(180deg);
}

.staff-accordion-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 16px 20px;
    margin-top: -8px;
    margin-bottom: 8px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 400px;
    }
}

.staff-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.staff-detail-info p {
    margin-bottom: 6px;
    font-size: 14px;
}

.staff-services-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.staff-service-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    cursor: pointer;
}

.staff-service-check input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.staff-services-checklist {
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.staff-svc-group-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin: 8px 0 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border);
}

.staff-svc-group-header:first-child {
    margin-top: 0;
}

.staff-svc-item {
    font-size: 13px;
    padding: 2px 0;
    color: var(--text);
}

.staff-panel-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .staff-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Past bookings */
.booking-past {
    opacity: 0.65;
    border-left: 3px solid var(--text-muted);
}

.badge-past {
    background: var(--text-muted);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.badge-attended {
    background: var(--green);
    color: #fff;
}

.badge-no_show {
    background: var(--red);
    color: #fff;
}

/* Attendance action buttons */
.btn-attend {
    background: #f0fdf4;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-attend:hover {
    background: var(--green);
    color: #fff;
}

.btn-noshow {
    background: #fef2f2;
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-noshow:hover {
    background: var(--red);
    color: #fff;
}

/* Service group headers */
.service-group-header {
    font-weight: 600;
    font-size: 13px;
    color: var(--accent);
    padding: 12px 16px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-glow);
    margin-top: 8px;
}

/* Reviews */
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.reviews-avg {
    font-size: 24px;
    font-weight: 700;
}

.reviews-count {
    color: var(--text-muted);
    font-size: 14px;
}

.review-stars {
    font-size: 14px;
    margin-left: 6px;
}

.review-reply {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 13px;
    border-left: 3px solid var(--accent);
}

.reply-review-text {
    padding: 10px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-style: italic;
    color: var(--text-muted);
}

/* Toggle label for settings */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
    border: 2px solid var(--border);
}

/* Global form input contrast */
.form-group input,
.form-group select,
.form-group textarea {
    border: 2px solid var(--border);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

/* Schedule navigation arrows */
.schedule-nav button,
.week-nav button {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    border: 2px solid var(--border);
    background: var(--bg-card);
    min-width: 36px;
    min-height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.schedule-nav button:hover,
.week-nav button:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* Review reply button */
.btn-reply {
    padding: 6px 14px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
}

.btn-reply:hover {
    background: var(--accent);
    color: #fff;
}

/* Notification info text */
.notification-info,
.empty-state p {
    color: var(--text-secondary);
}

/* Schedule legend enhancement */
.schedule-legend span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Time input fields */
input[type="time"] {
    border: 2px solid var(--border);
    padding: 6px 10px;
    font-size: 14px;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
}

input[type="time"]:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Vertical weekday columns */
.schedule-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.weekday-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-align: center;
    transition: var(--transition);
    min-width: 0;
}

.weekday-col.active {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.weekday-col.inactive {
    opacity: 0.45;
}

.weekday-col .weekday-name {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.weekday-col .weekday-name-short {
    display: none;
}

.weekday-col .weekday-check-box {
    margin-bottom: 6px;
    cursor: pointer;
}

.weekday-col .weekday-time-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.weekday-col .weekday-time-stack input[type="time"] {
    width: 80px;
    padding: 3px 4px;
    font-size: 11px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.weekday-col .weekday-time-stack .time-sep {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1;
}

.schedule-staff-tag {
    display: inline-block;
    padding: 2px 6px;
    margin: 1px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .schedule-week-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .weekday-col .weekday-name {
        display: none;
    }

    .weekday-col .weekday-name-short {
        display: block;
        font-weight: 600;
        font-size: 12px;
        margin-bottom: 6px;
    }
}

/* Attendance buttons */
.btn-attend,
.btn-noshow {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
    border: 2px solid;
}

.btn-attend {
    background: rgba(5, 150, 105, 0.1);
    color: #065F46;
    border-color: var(--green);
}

.btn-attend:hover {
    background: var(--green);
    color: #fff;
}

.btn-noshow {
    background: rgba(220, 38, 38, 0.1);
    color: #991B1B;
    border-color: var(--red);
}

.btn-noshow:hover {
    background: var(--red);
    color: #fff;
}

/* Past booking highlight */
.booking-past {
    border-left: 4px solid var(--text-muted);
    opacity: 0.85;
}

/* Color picker circle */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--border);
    transition: var(--transition);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    padding: 0;
}

.color-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.color-circle input[type="color"] {
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border: none;
    padding: 0;
    cursor: pointer;
    background: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.color-circle input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-circle input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-circle input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-hex {
    font-family: monospace;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Select with Add button */
.select-with-add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.select-with-add select {
    flex: 1;
}

.btn-icon-add {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-icon-add:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
}

.new-category-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.new-category-row input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
}

.new-category-row input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Calendar view switcher */
.calendar-view-switcher {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.calendar-view-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.calendar-view-btn.active {
    background: var(--accent);
    color: #fff;
    font-weight: 500;
}

/* Day/Week calendar grid */
.calendar-day-view {
    display: grid;
    grid-template-columns: 60px 1fr;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
}

.calendar-week-view {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
}

.cal-time-label {
    padding: 4px 8px;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: right;
    background: var(--bg-sidebar);
}

.cal-slot {
    min-height: 40px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 2px;
    position: relative;
}

.cal-slot:last-child {
    border-right: none;
}

.cal-day-header {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.cal-booking-block {
    background: linear-gradient(135deg, var(--accent-glow), rgba(79, 70, 229, 0.15));
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    margin: 1px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cal-booking-block .cal-client {
    font-weight: 600;
    color: var(--text-primary);
}

.cal-booking-block .cal-service {
    color: var(--text-secondary);
    font-size: 10px;
}

/* Schedule Day View */
.sched-day-view {
    padding: 8px 0;
}

.sched-day-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
}

.sched-day-status.working-day {
    background: rgba(5, 150, 105, 0.08);
    color: #065F46;
}

.sched-day-status.off-day {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.sched-day-status.blocked-day {
    background: rgba(220, 38, 38, 0.08);
    color: #991B1B;
}

.sched-day-status .block-reason {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-secondary);
}

.sched-hours-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sched-hour-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sched-hour-label {
    width: 50px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: right;
    flex-shrink: 0;
}

.sched-hour-slot {
    flex: 1;
    min-height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    transition: var(--transition);
}

.sched-hour-slot.active {
    background: rgba(5, 150, 105, 0.1);
    border-left: 3px solid var(--green);
}

.sched-hour-slot.inactive {
    background: var(--bg-secondary);
}

.sched-hour-slot .hour-off {
    color: var(--text-muted);
    font-size: 12px;
}

/* Schedule Week View */
/* Week view — time grid */
.sched-week-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 8px;
}

.sched-week-grid-header {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
}

.sched-week-col-hdr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 2px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 1px solid var(--border);
}

.sched-week-col-hdr:hover {
    background: rgba(108, 92, 231, 0.08);
}

.sched-week-col-hdr.working {
    background: rgba(5, 150, 105, 0.06);
}

.sched-week-col-hdr.off {
    color: var(--text-muted);
}

.sched-week-col-hdr.blocked {
    background: rgba(220, 38, 38, 0.06);
}

.sched-week-col-hdr.today {
    background: rgba(108, 92, 231, 0.12);
}

.sched-week-col-hdr.today .sched-week-day-num {
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sched-week-day-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sched-week-day-num {
    font-size: 16px;
    font-weight: 700;
    margin: 2px 0;
}

.sched-week-grid-row {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
    min-height: 32px;
}

.sched-week-grid-row:last-child {
    border-bottom: none;
}

.sched-week-time-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 2px;
    background: var(--bg-secondary);
}

.sched-week-slot {
    border-left: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
}

.sched-week-slot.active {
    background: rgba(5, 150, 105, 0.10);
}

.sched-week-slot.active:hover {
    background: rgba(5, 150, 105, 0.20);
}

.sched-week-slot.inactive {
    background: transparent;
}

.sched-week-slot.inactive:hover {
    background: var(--bg-secondary);
}

.sched-week-slot.blocked {
    background: rgba(220, 38, 38, 0.06);
}

.sched-week-slot.blocked:hover {
    background: rgba(220, 38, 38, 0.12);
}

.sched-week-slot .slot-icon {
    font-size: 12px;
    opacity: 0.6;
}

/* Booking status badges */
.badge-attended {
    background: rgba(5, 150, 105, 0.12);
    color: #065F46;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.badge-noshow {
    background: rgba(220, 38, 38, 0.1);
    color: #991B1B;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ============================================================
   Schedule Type Toggle & Individual Calendar
   ============================================================ */

.schedule-type-toggle {
    display: flex;
    gap: 8px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 4px;
    border: 1px solid var(--border);
}

.sched-type-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.sched-type-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sched-type-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.hint-text {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 12px 0;
}

.individual-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.individual-time-row label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.individual-time-row input[type="time"] {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
}

.individual-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin: 12px 0;
}

.ical-header {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 0;
}

.ical-day {
    text-align: center;
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    border: 2px solid transparent;
    user-select: none;
}

.ical-day:hover {
    background: var(--bg-card-hover);
}

.ical-day.empty {
    cursor: default;
}

.ical-day.working {
    background: rgba(5, 150, 105, 0.15);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.3);
    font-weight: 700;
}

.ical-day.working:hover {
    background: rgba(5, 150, 105, 0.25);
}

.ical-day.past {
    opacity: 0.4;
    cursor: default;
}

.ical-day.today {
    box-shadow: inset 0 0 0 2px var(--primary);
}

@media (max-width: 600px) {

    .sched-week-grid-header,
    .sched-week-grid-row {
        grid-template-columns: 40px repeat(7, 1fr);
    }

    .sched-week-day-num {
        font-size: 13px;
    }

    .sched-week-time-label {
        font-size: 10px;
    }
}

/* ============================================================
   MOBILE RESPONSIVE — Sidebar becomes slide-out drawer
   ============================================================ */

/* Sidebar overlay backdrop */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {

    /* Show hamburger */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        font-size: 22px;
        flex-shrink: 0;
    }

    .mobile-menu-btn:hover {
        background: var(--bg-card-hover);
    }

    /* Sidebar becomes off-screen drawer */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 200;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    /* Main content fills full width */
    .main-content {
        margin-left: 0 !important;
    }

    /* Top bar adjustments */
    .top-bar {
        padding: 12px 16px;
        gap: 8px;
    }

    .top-bar-left h2 {
        font-size: 16px;
    }

    .top-bar-right {
        gap: 8px;
    }

    .owner-name {
        display: none;
    }

    .mode-toggle {
        display: none;
    }

    /* Content area */
    .content-area {
        padding: 16px;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    /* QR section vertical on mobile */
    .qr-section {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .qr-code-img {
        width: 160px;
        height: 160px;
    }

    /* Link share */
    .link-share {
        flex-direction: column;
    }

    /* Section header stack on mobile */
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* Filters */
    .filters {
        flex-direction: column;
        width: 100%;
    }

    .filters input,
    .filters select {
        width: 100%;
    }

    /* Cards */
    .card {
        padding: 16px;
    }

    /* Item cards stack */
    .item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }

    .item-actions {
        align-self: flex-end;
    }

    /* Modals */
    .modal-content {
        margin: 8px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Form row stack on mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Feedback FAB */
    .feedback-fab {
        font-size: 13px;
        padding: 10px 16px;
        bottom: 16px;
        right: 16px;
    }

    /* Calendar view switcher scroll */
    .calendar-view-switcher {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Schedule toolbar */
    .schedule-toolbar {
        flex-wrap: wrap;
    }

    /* Support filters scroll */
    .support-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .support-filters .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .top-bar-left h2 {
        font-size: 14px;
    }
}

/* ============================================================
   Modal Overlay (Cancel / Edit Booking)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-overlay .modal-content {
    background: var(--bg-card, #fff);
    padding: 24px;
    border-radius: var(--radius, 16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
    width: 90%;
    max-width: 420px;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-overlay .modal-content h3 {
    color: var(--text-primary, #1a1a2e);
    font-size: 18px;
}

.modal-overlay .btn-secondary {
    padding: 10px 20px;
    border: 1px solid var(--border, #ddd);
    background: transparent;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-secondary, #666);
    transition: var(--transition, all 0.2s);
}

.modal-overlay .btn-secondary:hover {
    background: var(--bg-secondary, #f5f5f5);
}

.modal-overlay .btn-primary {
    padding: 10px 20px;
    border: none;
    background: var(--accent, #4F46E5);
    color: #fff;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition, all 0.2s);
}

.modal-overlay .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}