/**
 * Barber Portal Styles
 * CSS Variables are dynamically updated from Firebase shop_branding collection
 */

:root {
    /* These variables are updated from Firebase shop_branding */
    --primary-color: #ff6b35;
    --accent-color: #ffd700;
    --background-color: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* System colors */
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

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

.loading-text {
    margin-top: 20px;
    color: var(--text-color);
}

/* Login Container */
.login-container {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #1a1a1a;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 500;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Buttons */
.btn-login, .btn-primary, .btn-action {
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-login {
    width: 100%;
}

.btn-primary:hover, .btn-action:hover, .btn-login:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #666;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-logout {
    background: #666;
}

.btn-small {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-small.danger {
    color: var(--error-color);
    border-color: var(--error-color);
}

.btn-small.warning {
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-small.success {
    color: var(--success-color);
    border-color: var(--success-color);
}

/* Dashboard Layout */
.dashboard-container {
    display: none;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: white;
}

.shop-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.shop-url {
    font-size: 12px;
    opacity: 0.9;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.menu-item:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.menu-item.active {
    background: rgba(var(--primary-color), 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.menu-icon {
    width: 20px;
    margin-right: 12px;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
}

.top-bar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
}

.top-actions {
    display: flex;
    gap: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s;
}

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

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

/* Appointments */
.appointments-container, .settings-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
}

.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appointment-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.appointment-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.appointment-time {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 5px;
}

.appointment-client {
    color: #666;
    margin-bottom: 3px;
}

.appointment-service {
    color: #999;
    font-size: 14px;
}

.appointment-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}

.status-pending { background: #fff3e0; color: #ff9800; }
.status-confirmed { background: #e3f2fd; color: #2196f3; }
.status-completed { background: #e8f5e9; color: #4caf50; }
.status-cancelled { background: #ffebee; color: #f44336; }

.appointment-actions {
    display: flex;
    gap: 10px;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.service-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
}

.service-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.service-details {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.service-category {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-right: 10px;
}

.service-description {
    color: #999;
    font-size: 14px;
    margin: 10px 0;
}

.service-meta {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.service-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.service-status.active {
    background: #e8f5e9;
    color: #4caf50;
}

.service-status.inactive {
    background: #ffebee;
    color: #f44336;
}

.service-badge {
    padding: 4px 8px;
    background: var(--accent-color);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.service-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Error Messages */
.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

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

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 700px;
}

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

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.6;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--card-background);
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--card-background);
}

/* Settings */
.settings-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Schedule */
.schedule-day {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.schedule-day-header {
    margin-bottom: 10px;
}

.schedule-periods {
    margin-left: 30px;
}

.period-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.period-row input[type="time"] {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Clients */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.client-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.client-header h4 {
    margin: 0;
    color: var(--text-color);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.vip {
    background: gold;
    color: #333;
}

.client-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.client-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    color: #999;
    font-size: 14px;
    font-style: italic;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Checkbox Labels */
.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
}

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

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

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

.toast-error {
    border-left: 4px solid var(--error-color);
}

.toast-error .toast-icon {
    background: var(--error-color);
    color: white;
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-warning .toast-icon {
    background: var(--warning-color);
    color: white;
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

.toast-info .toast-icon {
    background: var(--info-color);
    color: white;
}

.toast-message {
    flex: 1;
    color: var(--text-color);
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Custom Modal Styles */
.modal-overlay.show {
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show .modal-content {
    animation: slideUp 0.3s ease;
}

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

.modal-confirm {
    text-align: center;
    max-width: 400px;
    padding: 30px;
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-message {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-prompt {
    max-width: 450px;
}

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

.modal-alert {
    max-width: 450px;
}

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

.modal-alert .modal-body p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
}

/* Loading Overlay */
.loading-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.loading-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-message {
    color: var(--text-color);
    font-size: 16px;
}

/* Premium Appointment Modal Styles */
.appointment-modal {
    max-width: 600px;
}

.appointment-form {
    padding: 0;
}

.form-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color);
    opacity: 0.7;
    margin: 0 0 20px 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    appearance: none;
}

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

/* Service Selection Styles */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.service-item:hover {
    border-color: var(--text-color);
    opacity: 0.7;
}

.service-checkbox {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    position: relative;
}

.service-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    appearance: none;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-background);
    transition: all 0.2s ease;
}

.service-checkbox input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.service-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.service-checkbox input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.service-info {
    flex: 1;
}

.service-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 5px;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
}

.service-duration {
    color: var(--text-color);
    opacity: 0.6;
}

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

/* Selected service style */
.service-item:has(input:checked) {
    background: var(--card-background);
    border-color: var(--primary-color);
}

/* Appointment Details Modal */
.appointment-details-modal {
    max-width: 500px;
}

.appointment-details-body {
    padding: 0;
}

.detail-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color);
    opacity: 0.6;
    margin: 0 0 15px 0;
}

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

.detail-label {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.services-detail-list {
    margin: 10px 0;
}

.service-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: var(--card-background);
    border-radius: 6px;
    margin-bottom: 8px;
}

.service-detail-name {
    font-size: 14px;
    color: var(--text-color);
}

.service-detail-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.total-row {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.total-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-pending {
    background: var(--warning-color);
    color: white;
    opacity: 0.9;
}

.status-badge.status-confirmed {
    background: var(--primary-color);
    color: white;
}

.status-badge.status-completed {
    background: var(--success-color);
    color: white;
}

.status-badge.status-cancelled {
    background: var(--danger-color);
    color: white;
    opacity: 0.8;
}

.notes-content {
    padding: 12px;
    background: var(--card-background);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
}

/* Service Modal Styles */
.service-modal {
    max-width: 550px;
}

.service-form {
    padding: 0;
}

.input-with-prefix,
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 15px;
    font-size: 15px;
    color: var(--text-color);
    opacity: 0.6;
}

.input-suffix {
    position: absolute;
    right: 15px;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.6;
}

.form-input.with-prefix {
    padding-left: 30px;
}

.form-input.with-suffix {
    padding-right: 70px;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.5;
}

.settings-toggles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 24px;
    transition: all 0.3s ease;
    margin-right: 12px;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

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

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

.toggle-label {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

/* Button Refinements */
.btn-cancel,
.btn-confirm {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: var(--card-background);
    color: var(--text-color);
    opacity: 0.8;
}

.btn-cancel:hover {
    background: var(--border-color);
    opacity: 1;
}

.btn-confirm {
    background: var(--primary-color);
    color: white;
    min-width: 140px;
}

.btn-confirm:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
        padding-top: 100px; /* Space for fixed elements */
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        border-radius: 0;
        padding: 15px;
        margin-bottom: 0;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .top-actions {
        display: none; /* Hide on mobile, show in menu */
    }
    
    /* Appointment cards mobile */
    .appointment-card {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .appointment-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .appointment-actions .btn-small {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Service cards mobile */
    .service-card {
        padding: 15px;
    }
    
    .service-actions {
        flex-wrap: wrap;
    }
    
    .service-actions button {
        flex: 1;
        min-width: 80px;
    }
    
    /* Modal adjustments */
    .modal-content {
        margin: 20px;
        max-height: 80vh;
    }
    
    /* Toast adjustments */
    .toast-container {
        top: 80px; /* Below fixed header */
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
    
    /* Settings sections */
    .settings-section {
        padding: 15px;
    }
    
    /* Buttons mobile */
    .btn-primary, .btn-action, .btn-secondary {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Appointment modal mobile */
    .appointment-modal {
        max-width: 100%;
        margin: 10px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 12px;
    }
    
    .service-checkbox {
        padding: 12px;
    }
    
    .service-name {
        font-size: 14px;
    }
    
    .service-meta {
        font-size: 13px;
    }
    
    /* Table/Grid adjustments */
    .clients-grid {
        grid-template-columns: 1fr;
    }
    
    /* Schedule periods */
    .period-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .period-row input[type="time"] {
        width: 100%;
    }
}