/**
 * Домбай Партнёр - PWA Styles
 */

/* ===============================================
   CSS Variables
   =============================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    --header-height: 56px;
    --nav-height: 64px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);

    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===============================================
   Splash Screen
   =============================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-screen svg {
    width: 200px;
    height: auto;
    animation: splash-pulse 1.5s ease-in-out infinite;
}

@keyframes splash-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* ===============================================
   Reset & Base
   =============================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ===============================================
   App Layout
   =============================================== */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.back-btn,
.logout-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.back-btn:hover,
.logout-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Header debt indicator */
.header-debt {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 8px;
    margin-right: 4px;
    transition: background 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.header-debt:active {
    background: var(--bg-tertiary);
}

.header-debt-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    line-height: 1;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.header-debt-value {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
}

.header-debt-danger .header-debt-value {
    color: var(--danger);
}

.header-debt-paid .header-debt-value {
    color: var(--success);
}

.header-debt-paid .header-debt-label {
    color: var(--success);
    opacity: 0.7;
}

.app-content {
    flex: 1;
    margin-top: var(--header-height);
    margin-bottom: var(--nav-height);
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-area-bottom));
}

.app-content.no-nav {
    margin-bottom: 0;
}

/* ===============================================
   Bottom Navigation
   =============================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary);
}

/* ===============================================
   Utilities
   =============================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

/* ===============================================
   Loading
   =============================================== */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-muted);
}

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

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

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: var(--danger);
}

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

/* ===============================================
   Buttons
   =============================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
    cursor: pointer;
}

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

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

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

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

.btn-block {
    width: 100%;
}

.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 0.875rem;
}

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

.card-body {
    padding: 16px;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* ===============================================
   Login Page
   =============================================== */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    padding: 24px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.login-logo svg {
    width: 48px;
    height: 48px;
    color: white;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-form {
    width: 100%;
    max-width: 360px;
}

.login-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
}

/* ===============================================
   Calendar
   =============================================== */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: var(--border-color);
}

.calendar-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 2px solid transparent;
}

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

.calendar-day.today {
    border-color: var(--primary);
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
}

.calendar-day.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-day.closed {
    background: var(--bg-tertiary);
}

.calendar-day.closed::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 2px;
    background: var(--danger);
    transform: rotate(-45deg);
}

.calendar-day-number {
    font-size: 0.875rem;
    font-weight: 500;
}

.calendar-day-badge {
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.calendar-day.selected .calendar-day-badge {
    background: white;
}

.calendar-day-badge.has-pending {
    background: var(--warning);
}

/* ===============================================
   Service Selector (Visual)
   =============================================== */
.service-selector {
    margin-bottom: 16px;
}

.service-selector-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.service-selector-trigger:active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.service-selector-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.service-selector-thumb-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.service-selector-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.service-selector-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-selector-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.service-selector-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

/* Service Sheet (Bottom Sheet for service list) */
.service-sheet-list {
    padding: 8px 0;
    max-height: 312px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.service-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.service-sheet-item:active {
    background: var(--bg-tertiary);
}

.service-sheet-item.active {
    background: var(--primary-light);
}

.service-sheet-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.service-sheet-thumb-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

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

.service-sheet-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.service-sheet-category {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.service-sheet-check {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0;
}

.service-sheet-item.active .service-sheet-check {
    opacity: 1;
}

.service-select {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* ===============================================
   Booking List
   =============================================== */
.booking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.booking-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.booking-time {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.booking-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.booking-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.booking-status.confirmed {
    background: #dcfce7;
    color: #166534;
}

.booking-customer {
    margin-bottom: 8px;
}

.booking-customer-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.booking-customer-phone {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.booking-customer-phone a {
    color: var(--primary);
}

.booking-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.booking-price {
    font-weight: 600;
    color: var(--text-primary);
}

.booking-comment {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===============================================
   Slots Management
   =============================================== */
.slot-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
}

.slot-item.closed {
    opacity: 0.6;
    background: var(--bg-tertiary);
}

.slot-time {
    font-weight: 500;
}

.slot-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.slot-actions {
    display: flex;
    gap: 8px;
}

.slot-toggle {
    width: 44px;
    height: 28px;
    border-radius: 14px;
    background: var(--bg-tertiary);
    position: relative;
    transition: background 0.2s;
}

.slot-toggle.active {
    background: var(--success);
}

.slot-toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: var(--shadow-sm);
}

.slot-toggle.active::after {
    transform: translateX(16px);
}

/* ===============================================
   Day Actions
   =============================================== */
.day-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.day-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.day-action-btn:hover {
    background: var(--bg-tertiary);
}

.day-action-btn.danger {
    color: var(--danger);
}

.day-action-btn.success {
    color: var(--success);
}

/* ===============================================
   Price Card
   =============================================== */
.price-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.price-card-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.price-card-category {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-input-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 100px;
}

.price-input {
    flex: 1;
    height: 44px;
    padding: 0 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    text-align: right;
}

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

.price-currency {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===============================================
   Toast Notifications
   =============================================== */
.toast-container {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px + var(--safe-area-bottom));
    left: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: var(--text-primary);
    color: white;
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    pointer-events: auto;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   Empty State
   =============================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===============================================
   Settings Page
   =============================================== */
.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.settings-list {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-label {
    font-weight: 500;
}

.settings-item-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===============================================
   Stats
   =============================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===============================================
   Date Header
   =============================================== */
.date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.date-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.date-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===============================================
   Responsive
   =============================================== */
@media (min-width: 768px) {
    .app-content {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .login-page {
        padding: 48px;
    }

    .calendar-day {
        font-size: 1rem;
    }
}

/* ===============================================
   Additional Components
   =============================================== */

/* Login Page Extended */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo svg {
    height: 28px;
    width: auto;
}

.login-agree {
    margin-top: 16px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

.login-agree a {
    color: var(--primary);
    text-decoration: none;
}

.login-agree a:hover {
    text-decoration: underline;
}

.login-footer {
    margin-top: 24px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.btn-loader .spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0;
}

/* Calendar Page Extended */
.calendar-page {
    padding-bottom: 16px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 8px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--border-color);
}

.month-title {
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: capitalize;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
}

.calendar-weekdays .weekend {
    color: var(--danger);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

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

.calendar-day .day-number {
    font-size: 0.875rem;
    font-weight: 500;
}

.calendar-day .booking-count {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.55rem;
    font-weight: 700;
    background: var(--primary);
    color: white;
    width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 50%;
    text-align: center;
}

.calendar-day.has-bookings .day-number {
    color: var(--primary);
    font-weight: 600;
}

.calendar-day .closed-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
}

.legend-dot.has-bookings {
    background: var(--primary);
}

.legend-dot.has-pending {
    background: var(--warning, #f59e0b);
}

.legend-dot.has-blocks {
    background: var(--danger, #ef4444);
}

.legend-item.clickable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 16px;
    transition: background 0.2s;
}

.legend-item.clickable:hover {
    background: var(--bg-tertiary);
}

.legend-item.clickable.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.filter-indicator {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--danger);
    margin-left: 2px;
}

/* Day indicators (dots under the day number) */
.day-indicators {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-top: 2px;
}

.day-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.indicator-bookings {
    background: var(--primary);
}

.indicator-blocks {
    background: var(--danger);
}

.calendar-day.selected .indicator-bookings {
    background: white;
}

.calendar-day.selected .indicator-blocks {
    background: white;
    opacity: 0.7;
}

.calendar-day.has-blocks {
    position: relative;
}

.calendar-day.filtered-out {
    opacity: 0.3;
    pointer-events: none;
}

.calendar-day.has-pending {
    background: rgba(245, 158, 11, 0.1);
}

.calendar-day.has-pending .booking-count {
    background: var(--warning, #f59e0b);
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
}

.calendar-day.selected .day-number {
    color: white;
}

.calendar-day.selected .booking-count {
    background: white;
    color: var(--primary);
}

/* Day Bookings Section (under calendar) */
.day-bookings-section {
    margin-top: 16px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.day-bookings-header {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.day-bookings-date {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.day-bookings-list {
    padding: 12px;
    min-height: 100px;
}

.day-bookings-list .empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 16px;
}

.day-bookings-list .loading-placeholder {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.time-group {
    margin-bottom: 16px;
}

.time-group:last-child {
    margin-bottom: 0;
}

.time-group-header {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 4px 0 8px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

/* Blocks Section */
.blocks-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.blocks-header {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--danger);
    padding: 4px 0 8px 0;
    margin-bottom: 8px;
}

.block-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
}

.block-card:last-child {
    margin-bottom: 0;
}

.block-main {
    flex: 1;
    min-width: 0;
}

.block-service {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.block-time {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--danger);
}

.block-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.block-delete-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    transition: background 0.2s;
    flex-shrink: 0;
}

.block-delete-btn:hover,
.block-delete-btn:active {
    background: rgba(239, 68, 68, 0.2);
}

.booking-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.booking-price {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.booking-card .booking-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Day Page */
.day-page {
    padding-bottom: 16px;
}

.day-header {
    margin-bottom: 16px;
}

.day-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.day-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.day-date {
    font-size: 1rem;
    font-weight: 600;
    text-transform: capitalize;
}

.today-badge {
    font-size: 0.625rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.slot-group {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.slot-time {
    font-weight: 600;
    color: var(--primary);
}

.slot-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.slot-bookings {
    padding: 8px;
}

.booking-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.booking-card:last-child {
    margin-bottom: 0;
}

.booking-card:hover {
    background: var(--bg-tertiary);
}

.booking-card.expanded {
    background: var(--bg-tertiary);
}

.booking-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.booking-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-service-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.booking-type-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.booking-type-tag.freeride {
    color: #92400e;
    background: rgba(245, 158, 11, 0.15);
}

.booking-type-tag.lesson {
    color: #1e40af;
    background: rgba(59, 130, 246, 0.1);
}

.booking-duration {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
}

.booking-time-range {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.booking-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.booking-status {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-paid {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #e0e7ff;
    color: #3730a3;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-reviewing {
    background: #e0f2fe;
    color: #075985;
}

.booking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.meta-item {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meta-item.price {
    font-weight: 600;
    color: var(--text-primary);
}

.booking-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    text-align: right;
    max-width: 60%;
}

.phone-link {
    color: var(--primary);
    font-weight: 500;
}

.booking-expand {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.booking-card.expanded .booking-expand {
    transform: rotate(180deg);
}

/* Slots Page */
.slots-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.date-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.quick-actions {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
}

.quick-actions h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-buttons .btn {
    flex: 1;
}

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

.btn-outline:hover {
    background: var(--bg-tertiary);
}

.btn-small {
    height: 32px;
    padding: 0 12px;
    font-size: 0.8125rem;
}

.slots-section,
.closed-dates-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
}

.slots-section h3,
.closed-dates-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.slots-list,
.closed-dates-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.slot-capacity {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.closed-date-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.closed-date-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.closed-date {
    font-weight: 500;
    font-size: 0.9375rem;
    text-transform: capitalize;
}

.closed-reason {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-message,
.error-message {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.error-message {
    color: var(--danger);
}

/* Prices Page */
.prices-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prices-form {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px;
}

.prices-info {
    margin-bottom: 20px;
}

.pricing-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-suffix .form-input {
    flex: 1;
    text-align: right;
}

.input-suffix {
    font-size: 1rem;
    color: var(--text-muted);
    min-width: 24px;
}

.current-prices {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.current-prices h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.price-display {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9375rem;
}

.price-label {
    color: var(--text-secondary);
}

.price-value {
    font-weight: 600;
}

/* Settings Page */
.settings-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: 600;
    font-size: 1rem;
}

.profile-email {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.services-list {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.service-item:last-child {
    border-bottom: none;
}

.service-title {
    font-weight: 500;
}

.service-type {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Кликабельные карточки услуг в настройках */
.service-settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    transition: background 0.15s;
}

.service-settings-item:last-child {
    border-bottom: none;
}

.service-settings-item:active {
    background: var(--bg-tertiary);
}

.service-settings-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.service-settings-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Fullscreen модалка */
.modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease, visibility 0.3s;
    z-index: 1001;
    background: var(--bg-secondary);
    visibility: hidden;
}

.modal-fullscreen.active {
    transform: translateY(0);
    visibility: visible;
}

.modal-fullscreen .modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.modal-fullscreen .modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 40px);
}

.modal-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Форма настроек услуги */
.service-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}

.form-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
}

.form-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row-half > .form-group {
    flex: 1;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 0;
}

.input-with-suffix .form-input {
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    border-right: none;
}

.input-suffix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.form-actions {
    padding-top: 4px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 500;
}

.setting-value {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.about-info {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.about-copyright {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Empty State Extended */
.empty-state svg {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Loading Placeholder */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.loading-placeholder .spinner {
    margin-bottom: 8px;
}

.loading-placeholder p {
    font-size: 0.875rem;
}

/* Form Select */
.form-select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Toast Extended */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

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

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8125rem;
    opacity: 0.95;
}

.toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    font-size: 1rem;
}

.toast-close:hover {
    background: rgba(255,255,255,0.3);
}

.toast-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Error Page */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    padding: 24px;
}

.error-page h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Button with icon */
.btn svg {
    margin-right: 8px;
}

.btn-danger svg {
    stroke: white;
}

/* ===============================================
   Bottom Sheet
   =============================================== */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-radius: 16px 16px 0 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 85vh;
    overflow-y: auto;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 12px auto;
    cursor: grab;
}

.bottom-sheet-content {
    padding: 0 20px 24px;
}

/* Sheet Header */
.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Sheet Customer */
.sheet-customer {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.customer-name-large {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.phone-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.phone-button:hover {
    background: var(--primary-hover);
}

.phone-button svg {
    flex-shrink: 0;
}

/* Sheet Details */
.sheet-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sheet-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.detail-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-text {
    flex: 1;
    font-size: 0.9375rem;
}

.detail-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Sheet Price Block */
.sheet-price-block {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-top: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.price-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.price-row.total {
    font-weight: 600;
}

.price-row.remaining {
    font-weight: 600;
    font-size: 1.0625rem;
}

.price-value {
    font-weight: 600;
}

.price-value.success {
    color: var(--success);
}

/* Sheet Comment */
.sheet-comment {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    margin-top: 12px;
}

.comment-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.comment-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Sheet Actions */
.sheet-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action svg {
    flex-shrink: 0;
}

.btn-confirm {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.btn-confirm:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.btn-cancel {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-cancel:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Sheet Footer */
.sheet-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Booking Card Arrow */
.booking-card {
    display: flex;
    align-items: center;
}

.booking-card .booking-main {
    flex: 1;
}

.booking-card-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

/* ===============================================
   Slot Modal
   =============================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-radius: 20px 20px 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

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

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
}

.modal-content {
    padding: 20px;
}

/* Slot Modal Body */
.slot-modal-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.slot-status-section {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-label > span:first-child {
    flex: 1;
    font-weight: 500;
}

.toggle-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 60px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.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: var(--success);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

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

/* Capacity Section */
.slot-capacity-section {
    transition: opacity 0.3s;
}

.slot-capacity-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 12px;
}

.capacity-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.capacity-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.capacity-btn:active {
    background: var(--primary-light);
}

.capacity-input {
    width: 80px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    -moz-appearance: textfield;
}

.capacity-input::-webkit-outer-spin-button,
.capacity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

.capacity-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.capacity-warning {
    text-align: center;
    font-size: 0.8rem;
    color: var(--warning);
    margin-top: 4px;
}

/* Modal Actions */
.slot-modal-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.slot-modal-actions .btn {
    flex: 1;
}

.slot-reset-section {
    text-align: center;
    padding-top: 8px;
}

.btn-text {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 0.875rem;
}

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

/* Slot Item Enhancements */
.slot-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.slot-item.has-override {
    border-color: var(--primary);
    background: var(--primary-light);
}

.slot-item.closed {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.slot-item.closed .slot-time {
    text-decoration: line-through;
    color: var(--text-muted);
}

.slot-closed-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Прогрев бани */
.slot-item.warmup {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

.slot-item.warmup .slot-time {
    color: var(--text-muted);
}

.slot-warmup-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #d97706;
    background: rgba(245, 158, 11, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.slot-time {
    font-weight: 500;
    min-width: 120px;
}

.slot-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slot-capacity {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.slot-override-badge {
    font-size: 0.7rem;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
}

.slot-actions {
    margin-left: auto;
}

.edit-slot-btn {
    padding: 8px !important;
    min-width: auto !important;
}

/* ===============================================
   Multi-select Mode
   =============================================== */
.slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.slots-header h3 {
    margin-bottom: 0;
}

#toggle-multiselect {
    display: flex;
    align-items: center;
    gap: 6px;
}

#toggle-multiselect.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.multiselect-panel {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    margin-bottom: 12px;
}

.multiselect-info {
    font-size: 0.875rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.multiselect-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.multiselect-actions .btn {
    flex: 1;
    min-width: 120px;
}

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

.btn-success:hover {
    background: #16a34a;
}

/* Slot checkbox */
.slot-checkbox {
    margin-right: 12px;
}

.slot-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.slot-item.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

/* Multi-select cursor */
.slot-item {
    cursor: default;
}

.slots-page.multiselect-mode .slot-item {
    cursor: pointer;
}

/* ===============================================
   Range Modal
   =============================================== */
#range-modal .modal-content {
    padding: 20px;
}

#range-modal .form-group {
    margin-bottom: 16px;
}

#range-modal .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    flex: 1;
}

/* Action buttons wrap */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-buttons .btn {
    flex: 1 1 auto;
    min-width: 100px;
    height: 40px;
    font-size: 0.8125rem;
    padding: 0 12px;
}

.action-buttons .btn svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

/* ===============================================
   Slot Modal Sections
   =============================================== */
.slot-block-section {
    margin-bottom: 16px;
}

.slot-info-section {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    margin-bottom: 16px;
}

.slot-info-section p {
    margin: 4px 0;
}

.slot-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.slot-capacity-override {
    opacity: 0.8;
}

.slot-capacity-override label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.capacity-hint-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

.capacity-available {
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
}

/* ===============================================
   Confirm Dialog
   =============================================== */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

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

.confirm-dialog {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 28px 24px 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.25s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.confirm-overlay.active .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon svg {
    width: 28px;
    height: 28px;
}

.confirm-icon-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #ef4444;
}

.confirm-icon-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #f59e0b;
}

.confirm-icon-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #3b82f6;
}

.confirm-icon-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #22c55e;
}

.confirm-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.confirm-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.confirm-btn-cancel:active {
    transform: scale(0.98);
    background: var(--border-color);
}

.confirm-btn-ok {
    color: white;
}

.confirm-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.confirm-btn-danger:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.confirm-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.confirm-btn-warning:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.confirm-btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.confirm-btn-info:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.confirm-btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.confirm-btn-success:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

/* ===============================================
   Services Page
   =============================================== */
.services-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.services-page-list {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.service-card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    transition: background 0.15s;
}

.service-card-item:last-child {
    border-bottom: none;
}

.service-card-item:active {
    background: var(--bg-tertiary);
}

.service-card-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.service-card-thumb-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.service-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.service-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-card-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.service-card-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Modal back button */
.modal-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.modal-back-btn:active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Review button */
.btn-review {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-review:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Contacts hidden notice */
.contacts-hidden-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
}

.contacts-hidden-text {
    color: var(--text-muted);
    font-style: italic;
}

/* 5-tab bottom nav adjustment */
.bottom-nav .nav-item span {
    font-size: 0.6875rem;
}

/* ===============================================
   Page Tabs (iOS-style segmented control)
   =============================================== */
.page-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 16px;
}

.page-tab {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.25s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.page-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===============================================
   Stats Cards
   =============================================== */
.stats-current-header,
.stats-history-header {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stats-history-header {
    margin-top: 24px;
}

.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stats-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stats-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stats-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stats-card-danger .stats-card-value {
    color: var(--danger);
}

.stats-card-success .stats-card-value {
    color: var(--success);
}

.stats-card-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.stats-card-badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.stats-card-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Stats History List */
.stats-history-list {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.stats-history-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.stats-history-item:last-child {
    border-bottom: none;
}

.stats-history-item.current {
    background: var(--primary-light);
}

.stats-history-month {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.stats-history-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
}

.stats-history-bookings {
    color: var(--text-secondary);
}

.stats-history-revenue {
    color: var(--text-primary);
    font-weight: 500;
}

.stats-history-commission {
    color: var(--danger);
    font-weight: 500;
}

.stats-history-income {
    color: var(--success);
    font-weight: 600;
}

/* ===============================================
   Commission / Debt Card
   =============================================== */
.commission-section {
    margin-bottom: 24px;
}

.debt-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    border-left: 4px solid var(--border-color);
}

.debt-card-danger {
    border-left-color: var(--danger);
}

.debt-card-success {
    border-left-color: var(--success);
}

.debt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.debt-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.debt-card-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.debt-card-danger .debt-card-value {
    color: var(--danger);
}

.debt-card-success .debt-card-value {
    color: var(--success);
}

.debt-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.debt-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.debt-detail.pending {
    color: var(--warning);
}

/* Paid state */
.debt-card-paid {
    border-left-color: var(--success);
    text-align: center;
    padding: 28px 20px;
}

.debt-paid-icon {
    color: var(--success);
    margin-bottom: 8px;
}

.debt-paid-icon svg {
    display: inline-block;
}

.debt-paid-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 4px;
}

.debt-paid-amount {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Paid label in partner list */
.debt-paid-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

.debt-zero .debt-paid-label {
    color: var(--success);
}

.commission-pay-btn {
    margin-top: 4px;
}

.commission-payments-list {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.commission-payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.commission-payment-item:last-child {
    border-bottom: none;
}

.commission-payment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.commission-payment-amount {
    font-weight: 600;
    font-size: 0.9375rem;
}

.commission-payment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.commission-reject-comment {
    padding: 4px 16px 12px;
    font-size: 0.75rem;
    color: var(--danger);
    font-style: italic;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ===============================================
   Payment Modal
   =============================================== */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

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

.payment-modal {
    background: var(--bg-primary);
    border-radius: 20px;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.25s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

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

.payment-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.payment-modal-body {
    padding: 20px;
}

/* ===============================================
   Admin Pages
   =============================================== */
.admin-page {
    padding-bottom: 16px;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-page-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Admin Partner Card */
.admin-partner-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.admin-partner-card:active {
    background: var(--bg-tertiary);
}

.admin-partner-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.admin-partner-avatar.large {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

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

.admin-partner-name {
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-partner-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-partner-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.admin-partner-debt {
    font-weight: 700;
    font-size: 0.9375rem;
}

.admin-partner-debt.debt-positive {
    color: var(--danger);
}

.admin-partner-debt.debt-zero {
    color: var(--success);
}

.admin-partner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--warning);
    color: white;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
}

/* Partner Profile Card */
.partner-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 16px;
    text-align: center;
}

.partner-profile-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 12px;
}

.partner-profile-email {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.partner-profile-login {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.partner-profile-login-label {
    color: var(--text-muted);
}

.partner-profile-login-value {
    font-weight: 600;
    font-family: monospace;
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-reset-password {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
}

/* Detail Sections */
.detail-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.detail-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.detail-service-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

.detail-service-item:last-child {
    border-bottom: none;
}

/* Service cards in admin partner detail */
.service-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.service-card-item:last-child {
    border-bottom: none;
}

.service-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.service-card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

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

.service-card-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-card-category {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.service-card-link {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-light);
    transition: background 0.15s;
}

.service-card-link:active {
    background: #bfdbfe;
}

.detail-booking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-booking-item:last-child {
    border-bottom: none;
}

.detail-booking-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-booking-customer {
    font-weight: 500;
    font-size: 0.9375rem;
}

.detail-booking-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-booking-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.detail-booking-total {
    font-weight: 600;
    font-size: 0.875rem;
}

.detail-booking-commission {
    font-size: 0.75rem;
    color: var(--danger);
}

/* Admin Payment Card */
.admin-payment-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

.admin-payment-main {
    flex: 1;
    min-width: 0;
}

.admin-payment-partner {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.admin-payment-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.admin-payment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-payment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-payment-comment {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-style: italic;
}

.admin-payment-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.admin-payment-actions .btn-approve {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-payment-actions .btn-approve:active {
    background: rgba(34, 197, 94, 0.2);
}

.admin-payment-actions .btn-reject {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-payment-actions .btn-reject:active {
    background: rgba(239, 68, 68, 0.2);
}

/* Admin Payment Mini Card (in partner detail) */
.admin-payment-card-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-payment-card-mini:last-child {
    border-bottom: none;
}

.payment-mini-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-mini-amount {
    font-weight: 600;
    font-size: 0.9375rem;
}

.payment-mini-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== Legal Pages ===== */
.legal-page {
    padding: 16px;
    max-width: 640px;
    margin: 0 auto;
}

.legal-page h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.legal-updated {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.legal-section {
    margin-bottom: 24px;
}

.legal-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.legal-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 12px 0 6px;
}

.legal-section p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.legal-section ul {
    padding-left: 20px;
    margin-bottom: 8px;
}

.legal-section li {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
}

/* Settings link items */
.setting-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.setting-link svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.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: #cbd5e1;
    border-radius: 28px;
    transition: background-color 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

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

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

.toggle-switch.disabled .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Setting label group (label + hint) */
.setting-label-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.setting-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Update Banner */
.update-banner {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 12px);
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #1e40af 100%);
    color: white;
    padding: 14px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUpBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.update-banner.hidden {
    display: none;
}

.update-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.update-banner-icon {
    flex-shrink: 0;
    animation: spin 2s linear infinite;
}

.update-banner-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.update-banner-text strong {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.update-banner-text span {
    font-size: 0.75rem;
    opacity: 0.85;
    line-height: 1.2;
}

.update-banner button {
    background: white;
    color: #1d4ed8;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s;
}

.update-banner button:active {
    transform: scale(0.95);
}

.update-banner button:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
}

@keyframes slideUpBounce {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

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

/* ===============================================
   Install Banner (Android)
   =============================================== */

.install-banner {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 12px);
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #1e40af 100%);
    color: white;
    padding: 14px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUpBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.install-banner.hidden {
    display: none;
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.install-banner-icon {
    flex-shrink: 0;
}

.install-banner-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.install-banner-text strong {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.install-banner-text span {
    font-size: 0.75rem;
    opacity: 0.85;
    line-height: 1.2;
}

.install-banner button#install-btn {
    background: white;
    color: #1d4ed8;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s;
}

.install-banner button#install-btn:active {
    transform: scale(0.95);
}

.install-banner-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.6;
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.install-banner-close:hover {
    opacity: 1;
}

/* ===============================================
   Install iOS Overlay
   =============================================== */

.install-ios-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.25s ease;
}

.install-ios-overlay.hidden {
    display: none;
}

.install-ios-tooltip {
    background: white;
    border-radius: 16px;
    padding: 28px 24px 20px;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: slideUpBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.install-ios-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 20px;
}

.install-ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
    font-size: 0.9375rem;
    color: #334155;
    line-height: 1.3;
}

.install-ios-step svg {
    flex-shrink: 0;
}

.install-ios-step strong {
    font-weight: 600;
    color: #1e293b;
}

.install-ios-ok {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: transform 0.15s;
}

.install-ios-ok:active {
    transform: scale(0.97);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===============================================
   Landing Page
   =============================================== */

.app-content.landing-mode {
    margin: 0;
    padding: 0;
    max-width: none !important;
    width: 100%;
}

.landing {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    font-family: var(--font-family);
}

/* Container helper */
.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Hero ---- */
.landing-hero {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    color: #fff;
    padding: 80px 24px 64px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(circle at 25% 65%, rgba(255,255,255,0.1) 0%, transparent 55%),
                radial-gradient(circle at 75% 30%, rgba(255,255,255,0.06) 0%, transparent 45%);
    pointer-events: none;
}

.landing-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.landing-hero-content {
    max-width: 680px;
}

.landing-logo {
    width: 150px;
    height: auto;
    margin-bottom: 32px;
}

.landing-title {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px;
}

.landing-subtitle {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.88;
    margin: 0 0 36px;
    max-width: 520px;
}

.btn-landing-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid transparent;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    text-decoration: none;
}

.btn-landing-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.22);
}

.btn-landing-hero:active {
    transform: translateY(0) scale(0.98);
}

.landing-hero-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.landing-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    max-width: 280px;
    margin: 0 auto;
}

.landing-cta-buttons .btn-landing-hero,
.landing-cta-buttons .btn-landing-outline {
    width: 100%;
    box-sizing: border-box;
}

.btn-landing-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    padding: 17px 38px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.btn-landing-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-landing-outline:active {
    transform: translateY(0) scale(0.98);
}

.landing-hero-phone {
    display: none;
}

/* ---- Sections ---- */
.landing-section {
    padding: 56px 24px;
    max-width: 1248px; /* 1200 + 24*2 padding */
    margin: 0 auto;
}

.landing-section-alt {
    background: var(--bg-secondary);
    max-width: 100%;
}

.landing-section-alt > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.landing-section-title {
    font-size: 24px;
    font-weight: 700;
    text-align: left;
    margin: 0 0 36px;
    color: var(--text-primary);
}

/* ---- Features grid ---- */
.landing-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.landing-feature-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.landing-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.landing-feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.landing-feature-card p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

/* ---- Screenshots ---- */
.landing-screens {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.landing-screens::-webkit-scrollbar {
    display: none;
}

.landing-phone {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
    text-align: center;
}

.landing-phone img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 3px solid #e2e8f0;
}

.landing-phone-label {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---- Timeline ---- */
.landing-timeline {
    position: relative;
}

/* Вертикальная линия */
.landing-timeline::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-color);
    border-radius: 2px;
}

.landing-timeline-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
    padding-bottom: 24px;
}

.landing-timeline-item:last-child {
    padding-bottom: 0;
}

.landing-timeline-left {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.landing-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 6px var(--bg-secondary);
}

.landing-timeline-line {
    display: none;
}

.landing-timeline-content {
    flex: 1;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-top: 2px;
}

.landing-timeline-content h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text-primary);
}

.landing-timeline-content p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

/* ---- Pricing ---- */
/* ---- Pricing + CTA bottom row ---- */
.landing-bottom-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 16px 48px;
}

.landing-bottom-card {
    padding: 48px 24px;
    text-align: center;
}

.landing-bottom-pricing {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
    border-radius: 20px 20px 0 0;
}

.landing-bottom-cta {
    background: #0f172a;
    color: #fff;
    border-radius: 0 0 20px 20px;
}

.landing-pricing-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.landing-pricing-label {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 20px;
}

.landing-pricing-desc {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.82;
    margin: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.landing-bottom-cta h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 14px;
}

.landing-bottom-cta p {
    font-size: 15px;
    opacity: 0.75;
    margin: 0 0 28px;
}

/* ---- Footer ---- */
.landing-footer {
    padding: 32px 24px;
    text-align: center;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.6);
}

.landing-footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.landing-footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.15s;
}

.landing-footer-links a:hover {
    color: #fff;
}

.landing-footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* ---- Tablet (>= 600px) ---- */
@media (min-width: 600px) {
    .landing-hero {
        padding: 100px 40px 80px;
    }

    .landing-title {
        font-size: 36px;
    }

    .landing-subtitle {
        font-size: 18px;
    }

    .btn-landing-hero {
        font-size: 17px;
        padding: 16px 48px;
    }

    .landing-section {
        padding: 64px 40px;
    }

    .landing-section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .landing-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-feature-card {
        padding: 28px 24px;
    }

    .landing-feature-icon {
        width: 60px;
        height: 60px;
    }

    .landing-feature-card h3 {
        font-size: 16px;
    }

    .landing-feature-card p {
        font-size: 14px;
    }

    .landing-timeline-content {
        padding: 24px 28px;
    }

    .landing-timeline-content {
        padding: 24px 28px;
    }

    .landing-timeline-content h3 {
        font-size: 19px;
    }

    .landing-timeline-content p {
        font-size: 15px;
    }

    .landing-bottom-cta h2 {
        font-size: 28px;
    }

    .landing-bottom-cta p {
        font-size: 16px;
    }
}

/* ---- Desktop (>= 900px) ---- */
@media (min-width: 900px) {
    .landing-hero {
        padding: 100px 60px 80px;
        text-align: left;
    }

    .landing-hero-inner {
        display: flex;
        align-items: center;
        gap: 60px;
    }

    .landing-hero-content {
        flex: 1;
        max-width: none;
        margin: 0;
    }

    .landing-logo {
        width: 200px;
        margin-bottom: 32px;
    }

    .landing-title {
        font-size: 40px;
        margin-bottom: 20px;
    }

    .landing-subtitle {
        font-size: 18px;
        max-width: 460px;
        margin-left: 0;
        margin-right: 0;
    }



    .btn-landing-hero {
        font-size: 18px;
        padding: 18px 48px;
        border-radius: 14px;
    }

    .btn-landing-outline {
        font-size: 18px;
        padding: 21px 40px;
        border-radius: 14px;
    }

    .landing-hero-phone {
        display: block;
        flex: 0 0 auto;
        width: 260px;
    }

    .landing-hero-phone img {
        width: 100%;
        border-radius: 28px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        border: 4px solid rgba(255, 255, 255, 0.2);
    }

    .landing-section {
        padding: 80px 24px;
        max-width: 1248px;
    }

    .landing-section-title {
        font-size: 32px;
        margin-bottom: 48px;
    }

    .landing-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .landing-feature-card {
        padding: 32px 28px;
    }

    .landing-feature-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        margin-bottom: 18px;
    }

    .landing-feature-icon svg {
        width: 32px;
        height: 32px;
    }

    .landing-feature-card h3 {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .landing-feature-card p {
        font-size: 14px;
    }

    .landing-timeline::before {
        left: 27px;
    }

    .landing-step-number {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .landing-timeline-item {
        gap: 32px;
        padding-bottom: 28px;
    }

    .landing-timeline-content {
        padding: 28px 32px;
    }

    .landing-timeline-content h3 {
        font-size: 20px;
    }

    .landing-timeline-content p {
        font-size: 16px;
    }

    .landing-screens {
        overflow-x: visible;
    }

    .landing-phone {
        flex: 1 1 0;
        width: auto;
    }

    .landing-phone img {
        border-radius: 24px;
    }

    .landing-phone-label {
        font-size: 15px;
        margin-top: 14px;
    }

    .landing-bottom-row {
        flex-direction: row;
        max-width: 1248px;
        margin: 0 auto 48px;
        padding: 0 24px;
    }

    .landing-bottom-pricing {
        border-radius: 20px 0 0 20px;
    }

    .landing-bottom-cta {
        border-radius: 0 20px 20px 0;
    }

    .landing-bottom-card {
        flex: 1;
        padding: 64px 48px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .landing-pricing-value {
        font-size: 64px;
    }

    .landing-pricing-label {
        font-size: 20px;
    }

    .landing-pricing-desc {
        font-size: 15px;
    }

    .landing-cta-buttons {
        flex-direction: row;
        max-width: none;
    }

    .landing-cta-buttons .btn-landing-hero,
    .landing-cta-buttons .btn-landing-outline {
        width: auto;
    }

    .landing-bottom-cta h2 {
        font-size: 32px;
    }

    .landing-bottom-cta p {
        font-size: 17px;
        margin-bottom: 32px;
    }

    .landing-footer {
        padding: 40px 60px;
    }

    .landing-footer-links {
        flex-direction: row;
        justify-content: center;
        gap: 32px;
    }

    .landing-footer-links a {
        font-size: 15px;
    }
}

/* ---- Wide Desktop (>= 1200px) ---- */
@media (min-width: 1200px) {
    .landing-hero {
        padding: 120px 80px 100px;
    }

    .landing-hero-inner {
        gap: 80px;
    }

    .landing-title {
        font-size: 48px;
    }

    .landing-subtitle {
        font-size: 20px;
        max-width: 500px;
    }

    .landing-hero-phone {
        width: 300px;
    }

    .landing-screens {
        gap: 32px;
    }

    .landing-features {
        gap: 28px;
    }

    .landing-feature-card {
        padding: 36px 28px;
    }
}

/* ===============================================
   FAB Button
   =============================================== */
.btn-fab {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.btn-fab:active {
    transform: scale(0.92);
    background: var(--primary-dark);
}

/* ===============================================
   Password Modal
   =============================================== */
.password-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;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 24px;
}

.password-modal-overlay.active {
    opacity: 1;
}

.password-modal {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 28px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.password-modal-overlay.active .password-modal {
    transform: scale(1);
}

.password-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.password-modal-value {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    letter-spacing: 1px;
    word-break: break-all;
    user-select: all;
    margin-bottom: 20px;
}

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

.password-modal-actions .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ===============================================
   Create Partner Panel
   =============================================== */
.create-partner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    transition: background 0.3s;
}

.create-partner-overlay.active {
    background: rgba(0, 0, 0, 0.5);
}

.create-partner-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-radius: 20px 20px 0 0;
    padding: 24px;
    padding-bottom: calc(24px + var(--safe-area-bottom));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.create-partner-overlay.active .create-partner-panel {
    transform: translateY(0);
}

.create-partner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.create-partner-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
}

.create-partner-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
}

.create-partner-form .form-group {
    margin-bottom: 16px;
}

.create-partner-form .form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.create-partner-form .form-input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0 14px;
    font-size: 0.9375rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color 0.15s;
    outline: none;
}

.create-partner-form .form-input:focus {
    border-color: var(--primary);
}

.create-partner-form .btn-block {
    width: 100%;
    margin-top: 8px;
}
