:root {
    --primary: #FF6600;
    --primary-hover: #e65c00;
    --secondary: #F5F5F5;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e0e0e0;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: #f8f9fa;
    font-size: 14px;
}

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

.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.main-content {
    flex: 1;
    padding: 32px;
    margin-left: 250px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Typography */
.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-light);
    font-size: 14px;
}

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

/* Components */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

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

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    background: #ebebeb;
}

.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.2);
}

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

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

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Sidebar */
.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 102, 0, 0.08);
    color: var(--primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
}

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

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    margin-bottom: 24px;
}

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

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

/* Dashboard */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.kpi-icon {
    margin-bottom: 16px;
    color: var(--primary);
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.kpi-label {
    color: var(--text-light);
    font-size: 14px;
}

/* Week View */
.week-view {
    display: flex;
    gap: 12px;
}

.week-day {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.week-day.today {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.week-day.today .week-day-count {
    color: white;
}

.week-day-name {
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.week-day-number {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.week-day-count {
    font-size: 12px;
    color: var(--text-light);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.badge-info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info);
}

/* Modal */
.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;
    visibility: hidden;
    transition: all 0.2s;
}

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

.modal {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: all 0.2s;
}

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

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

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

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

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

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

.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 102, 0, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #e9ecef;
    border-radius: 8px;
    width: fit-content;
    margin-bottom: 24px;
}

.tab {
    padding: 8px 16px;
    border: none;
    background: none;
    border-radius: 6px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: white;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Color Picker */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text);
    transform: scale(1.1);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-light);
    font-weight: 600;
    font-size: 13px;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

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

/* Booking Public Page */
.public-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
}

.public-header {
    background: linear-gradient(135deg, #FF6600 0%, #FF8533 100%);
    padding: 32px;
    border-radius: 16px;
    color: white;
    margin-bottom: 32px;
    text-align: center;
}

.booking-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.booking-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.booking-steps::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #eee;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.step-number {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s;
}

.step.active .step-number {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.step.active {
    color: var(--primary);
    font-weight: 600;
}

/* Calendar Grid */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: 8px;
}

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

.calendar-day-header {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    padding-bottom: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.calendar-day:hover:not(.disabled) {
    background: #f0f0f0;
}

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

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.slot {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

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

.slot.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.confirmation-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 20px;
}

.confirmation-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.confirmation-icon svg {
    width: 32px;
    height: 32px;
}

.confirmation-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.confirmation-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.confirmation-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.confirmation-label {
    color: var(--text-light);
}

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