/* Mellouk Beauty - AI Salon Manager Dashboard */
/* Color Palette - Warm, Elegant Beauty Theme */
:root {
    --primary: #d4a373;
    --primary-dark: #bc8c5e;
    --primary-light: #e9d5c3;
    --secondary: #588157;
    --accent: #bc6c25;
    --background: #faf8f5;
    --surface: #ffffff;
    --surface-hover: #fdfcfa;
    --text-primary: #2d2a26;
    --text-secondary: #6b6560;
    --text-muted: #9a948d;
    --border: #e8e4df;
    --success: #588157;
    --warning: #dda15e;
    --error: #bc4749;
    --info: #5e7c8b;
    
    --shadow-sm: 0 1px 3px rgba(45, 42, 38, 0.06);
    --shadow-md: 0 4px 12px rgba(45, 42, 38, 0.08);
    --shadow-lg: 0 8px 24px rgba(45, 42, 38, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --sidebar-width: 260px;
    --header-height: 70px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 2000;
    max-width: 90%;
    padding: 12px 20px;
    background: var(--text-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
}

.app-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.settings-save-status {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 600;
}

.settings-save-status.is-error {
    color: var(--error);
}

.analytics-period-label {
    font-size: 14px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.analytics-quick-stats {
    margin-top: 8px;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.hours-day {
    font-weight: 600;
    color: var(--text-secondary);
}

.hours-hours {
    color: var(--text-primary);
}

.dashboard-back-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 12px;
    white-space: nowrap;
}

.dashboard-back-link:hover {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .dashboard-back-link {
        display: none;
    }
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2d2a26 0%, #1a1816 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

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

.nav-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Header */
.main-header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.data-refresh-status {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.data-refresh-status.is-error {
    color: #b45309;
}

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

/* Bilingual EN / PT (matches marketing header pattern) */
.dashboard-lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
}
.dashboard-lang a {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.dashboard-lang a:hover {
    color: var(--text-primary);
}
.dashboard-lang a.active {
    background: var(--accent, #d4a373);
    color: #fff;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--background);
    padding: 10px 16px;
    border-radius: 30px;
    min-width: 280px;
}

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

.header-search input {
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    width: 100%;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--error);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.header-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.header-profile span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Sections */
.section {
    display: none;
    padding: 32px;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

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

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

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary);
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card.revenue .stat-icon {
    background: linear-gradient(135deg, #d4a373 0%, #bc8c5e 100%);
    color: #fff;
}

.stat-card.appointments .stat-icon {
    background: linear-gradient(135deg, #588157 0%, #3a5a40 100%);
    color: #fff;
}

.stat-card.noshow .stat-icon {
    background: linear-gradient(135deg, #bc4749 0%, #a3373a 100%);
    color: #fff;
}

.stat-card.ticket .stat-icon {
    background: linear-gradient(135deg, #5e7c8b 0%, #4a6572 100%);
    color: #fff;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

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

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

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

/* AI Insights */
.ai-insights {
    margin-bottom: 32px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.insight-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    gap: 16px;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
}

.insight-card.high {
    border-color: var(--error);
}

.insight-card.medium {
    border-color: var(--warning);
}

.insight-card.low {
    border-color: var(--success);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.insight-card.high .insight-icon {
    background: rgba(188, 71, 73, 0.1);
    color: var(--error);
}

.insight-card.medium .insight-icon {
    background: rgba(221, 161, 94, 0.1);
    color: var(--warning);
}

.insight-card.low .insight-icon {
    background: rgba(88, 129, 87, 0.1);
    color: var(--success);
}

.insight-content {
    flex: 1;
}

.insight-content p {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.insight-action {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* Today's Schedule */
.today-schedule {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.schedule-subheading {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 8px 0 4px;
}

.schedule-subheading:first-child {
    margin-top: 0;
}

.schedule-empty-note {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.schedule-time.schedule-time-dated {
    min-width: 118px;
    font-size: 15px;
}

.stat-change.muted {
    color: var(--text-muted);
    font-size: 13px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.schedule-item:hover {
    background: var(--primary-light);
}

.schedule-time {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-dark);
    min-width: 60px;
}

.schedule-info {
    flex: 1;
}

.schedule-client {
    font-weight: 500;
    color: var(--text-primary);
}

.schedule-service {
    font-size: 13px;
    color: var(--text-secondary);
}

.schedule-professional {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-professional img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.schedule-professional span {
    font-size: 13px;
    color: var(--text-secondary);
}

.schedule-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.schedule-status.confirmed {
    background: rgba(88, 129, 87, 0.1);
    color: var(--success);
}

.schedule-status.pending {
    background: rgba(221, 161, 94, 0.1);
    color: var(--warning);
}

.schedule-status.completed {
    background: rgba(94, 124, 139, 0.1);
    color: var(--info);
}

.schedule-status.cancelled {
    background: rgba(188, 71, 73, 0.12);
    color: var(--error);
    text-decoration: line-through;
}

.schedule-status.no_show {
    background: rgba(107, 101, 96, 0.15);
    color: var(--text-secondary);
}

.schedule-status.reminded {
    background: rgba(94, 124, 139, 0.12);
    color: var(--info);
}

.schedule-status.in_progress {
    background: rgba(212, 163, 115, 0.2);
    color: var(--primary-dark);
}

.schedule-status.rescheduled {
    background: rgba(154, 148, 141, 0.15);
    color: var(--text-muted);
}

.appointments-section .appointments-total-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.chart-period {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--surface);
    cursor: pointer;
}

/* Performers */
.performers-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.performers-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.performers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.performer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background);
    border-radius: var(--radius-md);
}

.performer-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.performer-rank.gold {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
}

.performer-rank.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #8a8a8a 100%);
    color: #fff;
}

.performer-rank.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    color: #fff;
}

.performer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.performer-info {
    flex: 1;
}

.performer-name {
    font-weight: 500;
    color: var(--text-primary);
}

.performer-stat {
    font-size: 13px;
    color: var(--text-muted);
}

.performer-value {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

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

.btn-primary.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

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

.btn-secondary.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.appointments-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

@media (min-width: 900px) {
    .appointments-actions-row {
        width: auto;
        margin-top: 0;
        margin-left: 12px;
    }
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

/* AI Settings */
.ai-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.ai-feature-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.feature-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.feature-icon.receptionist {
    background: linear-gradient(135deg, #588157 0%, #3a5a40 100%);
    color: #fff;
}

.feature-icon.noshow {
    background: linear-gradient(135deg, #bc4749 0%, #a3373a 100%);
    color: #fff;
}

.feature-icon.upsell {
    background: linear-gradient(135deg, #d4a373 0%, #bc8c5e 100%);
    color: #fff;
}

.feature-icon.pricing {
    background: linear-gradient(135deg, #5e7c8b 0%, #4a6572 100%);
    color: #fff;
}

.feature-info {
    flex: 1;
}

.feature-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 20px;
    transition: 0.3s;
}

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

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

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

.feature-stats {
    display: flex;
    gap: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.feature-stats .stat {
    display: flex;
    flex-direction: column;
}

.feature-stats .stat .value {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-stats .stat .label {
    font-size: 12px;
    color: var(--text-muted);
}

.feature-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.config-row select,
.config-row input {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--surface);
}

.multiplier-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.multiplier-input input {
    width: 60px;
    text-align: center;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.settings-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card h3 i {
    color: var(--primary);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

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

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--background);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

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

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    width: 200px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.modal-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-form input[type="text"],
.modal-form input[type="tel"],
.modal-form input[type="number"],
.modal-form input[type="datetime-local"],
.modal-form select,
.modal-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--background);
    color: var(--text-primary);
}

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

.modal-form-check {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.modal-form-check input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.modal-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Master data (WhatsApp / AI same catalog) */
.master-data-panel {
    margin-top: 32px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.master-data-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    max-width: 720px;
}

.master-data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.master-data-col-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.master-count {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    background: rgba(88, 129, 87, 0.12);
    border-radius: 999px;
    vertical-align: middle;
}

.master-table-wrap {
    max-height: 340px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-hover);
}

.master-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.master-table th,
.master-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.master-table th {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.master-table tr:last-child td {
    border-bottom: none;
}

.master-table .mono {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.master-table .kw {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.master-data-empty {
    padding: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .master-data-grid {
        grid-template-columns: 1fr;
    }
}

/* Delete button */
.btn-delete {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}
.btn-delete:hover {
    color: #bc4749;
    background: rgba(188, 71, 73, 0.1);
}

/* Responsive */
@media (max-width: 1200px) {
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .ai-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .performers-row {
        grid-template-columns: 1fr;
    }
    
    .header-search {
        display: none;
    }
}

