/* BarberPro - CSS Styles */
:root {
    /* Light Mode */
    --background: hsl(40, 20%, 98%);
    --foreground: hsl(220, 20%, 10%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(220, 20%, 10%);
    --primary: hsl(38, 90%, 50%);
    --primary-foreground: hsl(220, 20%, 10%);
    --secondary: hsl(220, 10%, 93%);
    --secondary-foreground: hsl(220, 10%, 30%);
    --muted: hsl(220, 10%, 95%);
    --muted-foreground: hsl(220, 10%, 45%);
    --accent: hsl(38, 80%, 45%);
    --border: hsl(220, 10%, 88%);
    --success: hsl(142, 76%, 36%);
    --error: hsl(0, 72%, 51%);
    --warning: hsl(45, 93%, 47%);
    --info: hsl(200, 80%, 50%);
    --whatsapp: hsl(142, 70%, 45%);
    --radius: 0.75rem;
    --font-body: 'Poppins', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
    --background: hsl(220, 20%, 10%);
    --foreground: hsl(40, 20%, 95%);
    --card: hsl(220, 18%, 14%);
    --card-foreground: hsl(40, 20%, 95%);
    --primary: hsl(38, 90%, 50%);
    --primary-foreground: hsl(220, 20%, 10%);
    --secondary: hsl(220, 15%, 20%);
    --secondary-foreground: hsl(40, 20%, 90%);
    --muted: hsl(220, 15%, 18%);
    --muted-foreground: hsl(220, 10%, 55%);
    --accent: hsl(38, 80%, 45%);
    --border: hsl(220, 15%, 22%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 0.5rem 0;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .header-content {
        min-height: 64px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--foreground);
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    box-shadow: 0 4px 20px rgba(217, 152, 22, 0.3);
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .logo-icon {
        width: 40px;
        height: 40px;
    }
}

.logo-icon.large {
    width: 56px;
    height: 56px;
}

@media (min-width: 640px) {
    .logo-icon.large {
        width: 64px;
        height: 64px;
    }
}

.logo h1 {
    font-size: 1rem;
    font-weight: 700;
}

@media (min-width: 640px) {
    .logo h1 {
        font-size: 1.25rem;
    }
}

.logo span {
    font-size: 0.6rem;
    color: var(--muted-foreground);
    margin-top: -4px;
    display: block;
}

@media (min-width: 640px) {
    .logo span {
        font-size: 0.7rem;
    }
}

/* Theme Toggle */
.theme-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--muted);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: var(--font-body);
    white-space: nowrap;
}

@media (min-width: 640px) {
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--primary-foreground);
    box-shadow: 0 4px 20px rgba(217, 152, 22, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 30px rgba(217, 152, 22, 0.5);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

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

.btn-warning {
    background: var(--warning);
    color: hsl(220, 20%, 10%);
}

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

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

.btn-whatsapp:hover:not(:disabled) {
    background: hsl(142, 70%, 40%);
}

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

.btn-outline:hover:not(:disabled) {
    background: var(--secondary);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
}

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

.btn-glass {
    background: var(--secondary);
    border: 1px solid var(--border);
    color: var(--foreground);
}

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

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
}

@media (min-width: 640px) {
    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

.btn-icon {
    padding: 0.5rem;
}

/* Cards */
.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
}

@media (min-width: 640px) {
    .glass-card {
        padding: 1.5rem;
    }
}

/* Main Content */
.main-content {
    padding: 1rem;
}

@media (min-width: 640px) {
    .main-content {
        padding: 1.5rem 1rem;
    }
}

.page-title {
    text-align: center;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .page-title {
        margin-bottom: 1.5rem;
    }
}

.page-title h2 {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

@media (min-width: 640px) {
    .page-title h2 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
}

.page-title p {
    color: var(--muted-foreground);
    font-size: 0.85rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 500px;
    margin: 0 auto 1.25rem;
    position: relative;
    padding: 0 0.25rem;
}

@media (min-width: 640px) {
    .step-indicator {
        margin: 0 auto 1.5rem;
        padding: 0 0.5rem;
    }
}

.step-line {
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border);
}

@media (min-width: 640px) {
    .step-line {
        top: 16px;
        left: 30px;
        right: 30px;
    }
}

.step-line-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.5s ease;
    width: 0%;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--muted);
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .step span {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

.step label {
    font-size: 0.55rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
    text-align: center;
}

@media (min-width: 640px) {
    .step label {
        font-size: 0.65rem;
        margin-top: 0.35rem;
    }
}

.step.active span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--primary-foreground);
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(217, 152, 22, 0.4);
}

.step.active label {
    color: var(--primary);
}

.step.completed span {
    background: var(--primary);
    color: var(--primary-foreground);
}

.step.completed span::after {
    content: '✓';
}

/* Booking Form */
.booking-form {
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .booking-form {
        max-width: 600px;
    }
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.form-step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

@media (min-width: 640px) {
    .form-step h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
}

.step-desc {
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

@media (min-width: 640px) {
    .step-desc {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
}

.step-desc span {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

@media (min-width: 640px) {
    .step-desc span {
        font-size: 0.8rem;
    }
}

/* Options Grid */
.options-grid {
    display: grid;
    gap: 0.6rem;
}

@media (min-width: 640px) {
    .options-grid {
        gap: 0.75rem;
    }
}

.option-card {
    display: block;
    cursor: pointer;
}

.option-card input {
    display: none;
}

.option-content {
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .option-content {
        padding: 1rem;
    }
}

.option-card:hover .option-content {
    border-color: rgba(217, 152, 22, 0.5);
}

.option-card input:checked + .option-content {
    border-color: var(--primary);
    background: rgba(217, 152, 22, 0.1);
    box-shadow: 0 4px 20px rgba(217, 152, 22, 0.15);
}

.option-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

@media (min-width: 640px) {
    .option-content h4 {
        font-size: 1rem;
        margin-bottom: 0.35rem;
    }
}

.option-content p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

@media (min-width: 640px) {
    .option-content p {
        font-size: 0.8rem;
        gap: 0.5rem;
        margin-top: 0.25rem;
    }
}

/* Barber Card */
.barber-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

@media (min-width: 640px) {
    .barber-card {
        gap: 0.75rem;
    }
}

.barber-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .barber-avatar {
        width: 48px;
        height: 48px;
    }
}

.option-card input:checked + .option-content .barber-avatar {
    border-color: var(--primary);
}

/* Date Picker - Mobile First */
.date-picker-container {
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .date-picker-container {
        margin-bottom: 1rem;
    }
}

.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem;
    background: var(--muted);
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
}

@media (min-width: 640px) {
    .date-picker-header {
        padding: 0.75rem;
    }
}

.date-picker-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

@media (min-width: 640px) {
    .date-picker-header h4 {
        font-size: 0.95rem;
    }
}

.date-picker-nav {
    display: flex;
    gap: 0.5rem;
}

.date-picker {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0.4rem;
    background: var(--card);
    border-radius: 0 0 var(--radius) var(--radius);
    border: 1px solid var(--border);
}

@media (min-width: 640px) {
    .date-picker {
        padding: 0.5rem;
    }
}

.date-header {
    text-align: center;
    padding: 0.4rem 0.15rem;
    font-weight: 600;
    color: var(--muted-foreground);
    font-size: 0.6rem;
}

@media (min-width: 640px) {
    .date-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.7rem;
    }
}

.date-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    color: var(--foreground);
    min-width: 28px;
    min-height: 28px;
    max-width: 40px;
    max-height: 40px;
}

@media (min-width: 640px) {
    .date-cell {
        font-size: 0.85rem;
        min-width: 32px;
        min-height: 32px;
    }
}

.date-cell:hover:not(:disabled) {
    background: var(--secondary);
}

.date-cell.selected {
    background: var(--primary);
    color: var(--primary-foreground);
}

.date-cell:disabled {
    color: var(--muted-foreground);
    opacity: 0.3;
    cursor: not-allowed;
}

.date-cell.sunday {
    color: var(--muted-foreground);
    opacity: 0.3;
}

.date-cell.today {
    border: 2px solid var(--primary);
}

/* Time Slots */
.time-section {
    margin-bottom: 0.875rem;
}

@media (min-width: 640px) {
    .time-section {
        margin-bottom: 1rem;
    }
}

.time-section h4 {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.4rem;
}

@media (min-width: 640px) {
    .time-section h4 {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

@media (min-width: 400px) {
    .time-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 640px) {
    .time-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
    }
}

.time-slot {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

@media (min-width: 640px) {
    .time-slot {
        padding: 0.625rem;
        font-size: 0.85rem;
    }
}

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

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

.time-slot:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Form Fields */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .form-fields {
        gap: 1rem;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (min-width: 640px) {
    .form-group {
        gap: 0.4rem;
    }
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .form-group label {
        font-size: 0.85rem;
    }
}

.form-group input,
.form-group textarea {
    padding: 0.65rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
}

@media (min-width: 640px) {
    .form-group input,
    .form-group textarea {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted-foreground);
}

/* Summary Card */
.summary-card {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem;
}

@media (min-width: 640px) {
    .summary-card {
        padding: 1rem;
    }
}

.summary-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
    .summary-row {
        gap: 0.75rem;
        padding: 0.75rem 0;
    }
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
}

@media (min-width: 640px) {
    .summary-row svg {
        width: 18px;
        height: 18px;
    }
}

.summary-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .summary-label {
        font-size: 0.8rem;
    }
}

.summary-value {
    font-weight: 500;
    font-size: 0.9rem;
}

@media (min-width: 640px) {
    .summary-value {
        font-size: 0.95rem;
    }
}

/* Success Step */
.success-step {
    text-align: center;
    padding: 1.25rem 0;
}

@media (min-width: 640px) {
    .success-step {
        padding: 1.5rem 0;
    }
}

.success-icon {
    width: 56px;
    height: 56px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--success);
    margin: 0 auto 0.875rem;
}

@media (min-width: 640px) {
    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
        margin: 0 auto 1rem;
    }
}

.success-step .summary-card {
    max-width: 100%;
    margin: 0.875rem auto;
    text-align: left;
}

@media (min-width: 640px) {
    .success-step .summary-card {
        margin: 1rem auto;
    }
}

.success-note {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-top: 0.875rem;
}

@media (min-width: 640px) {
    .success-note {
        font-size: 0.85rem;
        margin-top: 1rem;
    }
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
    .form-navigation {
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
}

.form-navigation .btn {
    flex: 1;
}

.new-booking {
    text-align: center;
    margin-top: 1rem;
}

/* Footer */
.footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    margin-top: auto;
}

@media (min-width: 640px) {
    .footer {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 1.25rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .loading {
        padding: 1.5rem;
    }
}

/* Alert */
.alert {
    padding: 0.875rem;
    border-radius: var(--radius);
    margin-bottom: 0.875rem;
}

@media (min-width: 640px) {
    .alert {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Panel Page */
.panel-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.panel-container {
    width: 100%;
    max-width: 400px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--foreground);
}

.login-card {
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .login-header {
        margin-bottom: 1.5rem;
    }
}

.login-header h1 {
    font-size: 1.25rem;
    margin-top: 0.65rem;
}

@media (min-width: 640px) {
    .login-header h1 {
        font-size: 1.35rem;
        margin-top: 0.75rem;
    }
}

.login-header p {
    color: var(--muted-foreground);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

@media (min-width: 640px) {
    .login-header p {
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .login-form {
        gap: 1rem;
    }
}

.demo-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.7rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .demo-info {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        font-size: 0.75rem;
    }
}

.demo-info code {
    color: var(--primary);
    background: rgba(217, 152, 22, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* Dashboard */
.dashboard-page {
    min-height: 100vh;
}

.dashboard-content {
    padding: 0.875rem;
}

@media (min-width: 640px) {
    .dashboard-content {
        padding: 1rem;
    }
}

@media (min-width: 768px) {
    .dashboard-content {
        padding: 1.5rem 1rem;
    }
}

.welcome-section {
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .welcome-section {
        margin-bottom: 1.5rem;
    }
}

.welcome-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

@media (min-width: 640px) {
    .welcome-section h2 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
}

@media (min-width: 768px) {
    .welcome-section h2 {
        font-size: 1.5rem;
    }
}

.welcome-section p {
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

@media (min-width: 640px) {
    .welcome-section p {
        font-size: 0.9rem;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .stats-grid {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem;
    transition: border-color 0.2s ease;
}

@media (min-width: 640px) {
    .stat-card {
        padding: 1rem;
    }
}

.stat-card:hover {
    border-color: rgba(217, 152, 22, 0.3);
}

.stat-icon {
    margin-bottom: 0.4rem;
}

@media (min-width: 640px) {
    .stat-icon {
        margin-bottom: 0.5rem;
    }
}

.stat-icon.primary { color: var(--primary); }
.stat-icon.accent { color: var(--accent); }
.stat-icon.success { color: var(--success); }

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
}

@media (min-width: 640px) {
    .stat-value {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 1.75rem;
    }
}

.stat-label {
    font-size: 0.7rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .stat-label {
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) {
    .stat-label {
        font-size: 0.85rem;
    }
}

/* Calendar */
.calendar-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .calendar-section {
        margin-bottom: 1.5rem;
    }
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem;
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    gap: 0.4rem;
}

@media (min-width: 640px) {
    .calendar-header {
        padding: 0.75rem;
        gap: 0.5rem;
    }
}

.calendar-header h3 {
    font-size: 0.75rem;
    text-align: center;
    flex: 1;
}

@media (min-width: 640px) {
    .calendar-header h3 {
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .calendar-header h3 {
        font-size: 1rem;
    }
}

.calendar-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
}

@media (min-width: 768px) {
    .calendar-table {
        min-width: 700px;
    }
}

.calendar-table th,
.calendar-table td {
    border: 1px solid var(--border);
    padding: 0.2rem;
    text-align: center;
    min-width: 75px;
}

@media (min-width: 768px) {
    .calendar-table th,
    .calendar-table td {
        padding: 0.25rem;
        min-width: 85px;
    }
}

.calendar-table th {
    background: var(--muted);
    padding: 0.4rem 0.2rem;
}

@media (min-width: 640px) {
    .calendar-table th {
        padding: 0.5rem 0.25rem;
    }
}

.calendar-table th.today {
    background: rgba(217, 152, 22, 0.1);
}

.calendar-table th.sunday,
.calendar-table td.sunday {
    background: rgba(128, 128, 128, 0.1);
}

.day-name {
    font-size: 0.6rem;
    color: var(--muted-foreground);
    display: block;
}

@media (min-width: 640px) {
    .day-name {
        font-size: 0.7rem;
    }
}

.day-num {
    font-size: 0.9rem;
    font-weight: 600;
}

@media (min-width: 640px) {
    .day-num {
        font-size: 1rem;
    }
}

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

.time-col {
    width: 45px;
    font-size: 0.65rem;
    color: var(--muted-foreground);
    background: var(--muted);
}

@media (min-width: 640px) {
    .time-col {
        width: 50px;
        font-size: 0.75rem;
    }
}

.calendar-table td {
    height: 32px;
    vertical-align: top;
}

@media (min-width: 640px) {
    .calendar-table td {
        height: 36px;
    }
}

.calendar-table td.past {
    background: rgba(128, 128, 128, 0.05);
}

.appointment-block {
    background: rgba(217, 152, 22, 0.2);
    border: 1px solid rgba(217, 152, 22, 0.3);
    border-radius: 4px;
    padding: 0.15rem 0.3rem;
    font-size: 0.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .appointment-block {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

.appointment-block.past {
    background: var(--muted);
    border-color: var(--border);
    color: var(--muted-foreground);
}

.apt-name {
    font-weight: 500;
    display: block;
}

.apt-barber {
    font-size: 0.55rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .apt-barber {
        font-size: 0.6rem;
    }
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.6rem;
    border-top: 1px solid var(--border);
    font-size: 0.65rem;
}

@media (min-width: 640px) {
    .calendar-legend {
        gap: 1rem;
        padding: 0.75rem;
        font-size: 0.75rem;
    }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .legend-item {
        gap: 0.4rem;
    }
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

@media (min-width: 640px) {
    .legend-color {
        width: 14px;
        height: 14px;
    }
}

.legend-color.active {
    background: rgba(217, 152, 22, 0.2);
    border: 1px solid rgba(217, 152, 22, 0.3);
}

.legend-color.past {
    background: var(--muted);
}

.legend-color.sunday {
    background: rgba(128, 128, 128, 0.2);
}

/* Dashboard Navigation - Mobile First */
.dashboard-header .header-content {
    flex-wrap: nowrap;
}

.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 70%;
}

@media (min-width: 640px) {
    .dashboard-nav {
        max-width: none;
        gap: 0.35rem;
    }
}

@media (min-width: 768px) {
    .dashboard-nav {
        gap: 0.5rem;
    }
}

.dashboard-nav .btn.active {
    background: var(--secondary);
    color: var(--primary);
}

.dashboard-nav .btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .dashboard-nav .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) {
    .dashboard-nav .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* Page Header */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
}

.page-header h2 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

@media (min-width: 640px) {
    .page-header h2 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
}

@media (min-width: 768px) {
    .page-header h2 {
        font-size: 1.5rem;
    }
}

.page-header p {
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

@media (min-width: 640px) {
    .page-header p {
        font-size: 0.9rem;
    }
}

/* Appointments List */
.appointments-list-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .appointments-list-section {
        margin-bottom: 1.5rem;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--muted);
    border-radius: var(--radius) var(--radius) 0 0;
}

@media (min-width: 640px) {
    .section-header {
        padding: 1rem;
    }
}

.section-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
}

@media (min-width: 640px) {
    .section-header h3 {
        font-size: 1rem;
    }
}

.appointments-list {
    max-height: 350px;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .appointments-list {
        max-height: 400px;
    }
}

.appointment-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

@media (min-width: 640px) {
    .appointment-item {
        flex-wrap: nowrap;
        gap: 1rem;
        padding: 1rem;
    }
}

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

.appointment-item:hover {
    background: var(--muted);
}

.apt-time-block {
    min-width: 60px;
    text-align: center;
    padding: 0.4rem;
    background: var(--muted);
    border-radius: var(--radius);
}

@media (min-width: 640px) {
    .apt-time-block {
        min-width: 70px;
        padding: 0.5rem;
    }
}

.apt-date {
    font-size: 0.65rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .apt-date {
        font-size: 0.7rem;
    }
}

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

@media (min-width: 640px) {
    .apt-time {
        font-size: 0.95rem;
    }
}

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

.apt-customer {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 640px) {
    .apt-customer {
        margin-bottom: 0.25rem;
    }
}

.apt-details {
    font-size: 0.7rem;
    color: var(--muted-foreground);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

@media (min-width: 640px) {
    .apt-details {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
}

.apt-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.5rem;
}

@media (min-width: 640px) {
    .apt-actions {
        gap: 0.5rem;
        width: auto;
        margin-top: 0;
    }
}

/* Appointment Status Buttons */
.btn-confirm {
    background: var(--info);
    color: white;
}

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

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .status-badge {
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }
}

.status-badge.pending {
    background: rgba(217, 152, 22, 0.15);
    color: var(--primary);
}

.status-badge.confirmed {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.status-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-badge.inactive {
    background: rgba(128, 128, 128, 0.15);
    color: var(--muted-foreground);
}

/* Data Table - Mobile Responsive */
.data-table-wrapper {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Mobile: Card view */
@media (max-width: 767px) {
    .data-table {
        width: 100%;
        display: block;
    }
    
    .data-table thead {
        display: none;
    }
    
    .data-table tbody {
        display: block;
    }
    
    .data-table tbody tr {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 0.5rem;
    }
    
    .data-table tbody tr:last-child {
        border-bottom: none;
    }
    
    .data-table tbody tr:hover {
        background: rgba(217, 152, 22, 0.05);
    }
    
    .data-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
        border: none;
        font-size: 0.85rem;
    }
    
    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--muted-foreground);
        text-transform: uppercase;
        margin-right: 1rem;
    }
    
    .data-table tbody td:first-child {
        font-weight: 600;
        font-size: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }
    
    .data-table tbody td:first-child::before {
        display: none;
    }
    
    .data-table tbody td:last-child {
        padding-top: 0.5rem;
        justify-content: flex-end;
    }
    
    .data-table tbody td:last-child::before {
        display: none;
    }
    
    .user-cell {
        flex-direction: row;
        gap: 0.75rem;
    }
}

/* Desktop: Table view */
@media (min-width: 768px) {
    .data-table {
        width: 100%;
        border-collapse: collapse;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem;
        text-align: left;
        border-bottom: 1px solid var(--border);
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .data-table th {
        background: var(--muted);
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--muted-foreground);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .data-table tbody tr:hover {
        background: rgba(217, 152, 22, 0.05);
    }

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

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

@media (min-width: 640px) {
    .user-cell {
        gap: 0.75rem;
    }
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: var(--secondary);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
}

.text-muted { color: var(--muted-foreground); }
.text-danger { color: var(--error); }
.text-success { color: var(--success); }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0.75rem;
}

@media (min-width: 640px) {
    .modal {
        padding: 1rem;
    }
}

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

.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

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

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

@media (min-width: 640px) {
    .modal-header {
        padding: 1rem;
    }
}

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

@media (min-width: 640px) {
    .modal-header h3 {
        font-size: 1rem;
    }
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--muted-foreground);
    cursor: pointer;
    line-height: 1;
}

.btn-close:hover {
    color: var(--foreground);
}

.modal-content form {
    padding: 0.875rem;
}

@media (min-width: 640px) {
    .modal-content form {
        padding: 1rem;
    }
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
    .modal-footer {
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

.form-control {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
}

@media (min-width: 640px) {
    .form-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
}

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

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Branch Grid */
.branch-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .branch-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .branch-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.branch-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .branch-card {
        padding: 1.25rem;
    }
}

.branch-card:hover {
    border-color: rgba(217, 152, 22, 0.3);
}

.branch-card.inactive {
    opacity: 0.6;
}

.branch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

@media (min-width: 640px) {
    .branch-header {
        margin-bottom: 0.75rem;
    }
}

.branch-icon {
    width: 36px;
    height: 36px;
    background: rgba(217, 152, 22, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

@media (min-width: 640px) {
    .branch-icon {
        width: 40px;
        height: 40px;
    }
}

.branch-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

@media (min-width: 640px) {
    .branch-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
}

.branch-address,
.branch-phone {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.3rem;
}

@media (min-width: 640px) {
    .branch-address,
    .branch-phone {
        gap: 0.4rem;
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }
}

.branch-address svg,
.branch-phone svg {
    flex-shrink: 0;
    margin-top: 2px;
    width: 12px;
    height: 12px;
}

@media (min-width: 640px) {
    .branch-address svg,
    .branch-phone svg {
        width: 14px;
        height: 14px;
    }
}

.branch-stats {
    display: flex;
    gap: 0.875rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
    .branch-stats {
        gap: 1rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
}

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

.branch-stat .stat-num {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

@media (min-width: 640px) {
    .branch-stat .stat-num {
        font-size: 1.1rem;
    }
}

.branch-stat .stat-label {
    font-size: 0.65rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .branch-stat .stat-label {
        font-size: 0.7rem;
    }
}

.branch-card .status-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
}

@media (min-width: 640px) {
    .branch-card .status-badge {
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* Reports */
.reports-grid {
    display: grid;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

@media (min-width: 640px) {
    .reports-grid {
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 1024px) {
    .reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.report-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem;
}

@media (min-width: 640px) {
    .report-card {
        padding: 1rem;
    }
}

.report-card.full-width {
    margin-bottom: 0.875rem;
}

@media (min-width: 640px) {
    .report-card.full-width {
        margin-bottom: 1rem;
    }
}

.report-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

@media (min-width: 640px) {
    .report-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

@media (min-width: 640px) {
    .report-header {
        margin-bottom: 0.75rem;
    }
}

.inline-select {
    width: auto;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

@media (min-width: 640px) {
    .inline-select {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

.chart-container {
    min-height: 150px;
}

@media (min-width: 640px) {
    .chart-container {
        min-height: 180px;
    }
}

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 150px;
    padding-top: 18px;
}

@media (min-width: 640px) {
    .bar-chart {
        gap: 3px;
        height: 180px;
        padding-top: 20px;
    }
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar {
    flex: 1;
    width: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 4px;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

.bar:hover {
    opacity: 0.8;
}

.bar-value {
    position: absolute;
    top: -16px;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--foreground);
}

@media (min-width: 640px) {
    .bar-value {
        top: -18px;
        font-size: 0.65rem;
    }
}

.bar-label {
    font-size: 0.5rem;
    color: var(--muted-foreground);
    margin-top: 0.3rem;
}

@media (min-width: 640px) {
    .bar-label {
        font-size: 0.6rem;
        margin-top: 0.4rem;
    }
}

/* Horizontal Bar Chart */
.bar-chart.horizontal {
    flex-direction: column;
    height: auto;
    gap: 0.35rem;
}

@media (min-width: 640px) {
    .bar-chart.horizontal {
        gap: 0.4rem;
    }
}

.bar-item-h {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

@media (min-width: 640px) {
    .bar-item-h {
        gap: 0.5rem;
    }
}

.bar-item-h .bar-label {
    width: 40px;
    font-size: 0.65rem;
    margin: 0;
}

@media (min-width: 640px) {
    .bar-item-h .bar-label {
        width: 45px;
        font-size: 0.7rem;
    }
}

.bar-container {
    flex: 1;
    height: 20px;
    background: var(--muted);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .bar-container {
        height: 22px;
    }
}

.bar-h {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-container .bar-value {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
}

@media (min-width: 640px) {
    .bar-container .bar-value {
        right: 6px;
        font-size: 0.65rem;
    }
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

@media (min-width: 640px) {
    .progress-bar {
        gap: 0.4rem;
    }
}

.progress-fill {
    height: 5px;
    width: 50px;
    background: var(--muted);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

@media (min-width: 640px) {
    .progress-fill {
        height: 6px;
        width: 60px;
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--width, 0%);
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
}

.progress-bar span {
    font-size: 0.7rem;
    font-weight: 500;
    min-width: 30px;
}

@media (min-width: 640px) {
    .progress-bar span {
        font-size: 0.75rem;
        min-width: 35px;
    }
}

/* Branch Stats Grid */
.branch-stats-grid {
    display: grid;
    gap: 0.6rem;
}

@media (min-width: 640px) {
    .branch-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 1024px) {
    .branch-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.branch-stat-card {
    background: var(--muted);
    border-radius: var(--radius);
    padding: 0.875rem;
}

@media (min-width: 640px) {
    .branch-stat-card {
        padding: 1rem;
    }
}

.branch-stat-card h4 {
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

@media (min-width: 640px) {
    .branch-stat-card h4 {
        margin-bottom: 0.25rem;
        font-size: 0.95rem;
    }
}

.branch-stat-card .branch-address {
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
}

@media (min-width: 640px) {
    .branch-stat-card .branch-address {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

.branch-stat-row {
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .branch-stat-row {
        gap: 0.75rem;
    }
}

.branch-stat-row > div {
    text-align: center;
}

.stat-change {
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 0.15rem;
}

@media (min-width: 640px) {
    .stat-change {
        font-size: 0.7rem;
        margin-top: 0.2rem;
    }
}

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

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

.skeleton {
    background: linear-gradient(90deg, var(--muted) 25%, var(--secondary) 50%, var(--muted) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease infinite;
    min-height: 70px;
}

@media (min-width: 640px) {
    .skeleton {
        min-height: 80px;
    }
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Notifications */
#notificationContainer {
    position: fixed;
    top: 60px;
    right: 0.5rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 320px;
    width: calc(100% - 1rem);
}

@media (min-width: 640px) {
    #notificationContainer {
        top: 70px;
        right: 1rem;
        max-width: 380px;
        gap: 0.5rem;
    }
}

.notification-toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 0.75rem;
    display: flex;
    gap: 0.6rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

@media (min-width: 640px) {
    .notification-toast {
        padding: 0.875rem;
        gap: 0.75rem;
    }
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-icon {
    width: 32px;
    height: 32px;
    background: rgba(217, 152, 22, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    animation: pulse 2s ease infinite;
}

@media (min-width: 640px) {
    .notification-icon {
        width: 36px;
        height: 36px;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.notification-content h4 {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 0.15rem;
}

@media (min-width: 640px) {
    .notification-content h4 {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }
}

.notification-content p {
    font-size: 0.75rem;
    margin: 0.1rem 0;
}

@media (min-width: 640px) {
    .notification-content p {
        font-size: 0.8rem;
    }
}

.notification-meta {
    font-size: 0.65rem;
    color: var(--muted-foreground);
    margin-top: 0.3rem;
}

@media (min-width: 640px) {
    .notification-meta {
        font-size: 0.7rem;
        margin-top: 0.35rem;
    }
}

.notification-close {
    background: none;
    border: none;
    color: var(--muted-foreground);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@media (min-width: 640px) {
    .notification-close {
        font-size: 1.1rem;
    }
}

.notification-close:hover {
    color: var(--foreground);
}

/* Toast Messages */
.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

@media (min-width: 640px) {
    .toast {
        padding: 0.625rem 0.875rem;
        gap: 0.5rem;
    }
}

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

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

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

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

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

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

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .empty-state {
        padding: 2rem 1rem;
    }
}

.empty-state svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.6rem;
    opacity: 0.5;
}

@media (min-width: 640px) {
    .empty-state svg {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
    }
}

.empty-state p {
    font-size: 0.85rem;
}

@media (min-width: 640px) {
    .empty-state p {
        font-size: 0.9rem;
    }
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.875rem;
    overflow-x: auto;
}

@media (min-width: 640px) {
    .tabs {
        margin-bottom: 1rem;
    }
}

.tab-btn {
    padding: 0.6rem 0.875rem;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

.tab-btn:hover {
    color: var(--foreground);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Responsive Helpers */
.hide-mobile {
    display: none !important;
}

@media (min-width: 640px) {
    .hide-mobile {
        display: initial !important;
    }
}

.show-mobile {
    display: initial !important;
}

@media (min-width: 640px) {
    .show-mobile {
        display: none !important;
    }
}

/* WhatsApp Modal */
.whatsapp-modal-content {
    text-align: center;
    padding: 1rem;
}

.whatsapp-modal-content p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.whatsapp-modal-content .message-preview {
    background: var(--muted);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: left;
    font-size: 0.85rem;
    white-space: pre-line;
    border-left: 4px solid var(--whatsapp);
}

.whatsapp-modal-content .modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}
