/* Demo Barbería - Estilos */
:root {
    --color-primary: #1e293b;
    --color-primary-dark: #0f172a;
    --color-secondary: #64748b;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    --color-bg: #f1f5f9;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-muted: #64748b;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

    --nav-height: 70px;
    --header-height: 60px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--color-primary);
    color: white;
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main */
.app-main {
    flex: 1;
    padding: 1.5rem;
    padding-bottom: calc(var(--nav-height) + 1.5rem);
}

/* Nav inferior */
.app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

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

.nav-icon {
    font-size: 1.5rem;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

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

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

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

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

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Cards */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.card-body {
    padding: 1.5rem;
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.15s;
}

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

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.bg-dark {
    background: rgba(0, 0, 0, 0.3);
    color: white;
}

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

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

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

/* Utilities */
.text-center {
    text-align: center;
}

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

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

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

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

.d-flex {
    display: flex;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 2rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.login-logo-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.login-logo-text {
    font-size: 1.75rem;
    font-weight: 800;
}

.login-logo-slogan {
    font-size: 0.9rem;
    opacity: 0.7;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-md);
}

.login-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.role-btn {
    padding: 1.5rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.role-btn:hover {
    border-color: var(--color-primary);
    background: #f8fafc;
}

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

.role-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.role-name {
    font-weight: 700;
}

.barbero-select {
    display: none;
}

.barbero-select.visible {
    display: block;
}

.barbero-list {
    display: grid;
    gap: 0.75rem;
}

.barbero-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

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

.barbero-option.selected {
    border-color: var(--color-primary);
    background: #f0f9ff;
}

.barbero-avatar {
    font-size: 2rem;
}

.barbero-info {
    flex: 1;
}

.barbero-nombre {
    font-weight: 700;
}

.barbero-especialidad {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Agenda */
.agenda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.agenda-date-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agenda-date {
    font-size: 1.25rem;
    font-weight: 700;
}

.agenda-grid {
    display: grid;
    grid-template-columns: 80px repeat(var(--barberos-count, 4), 1fr);
    gap: 2px;
    background: var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.agenda-header-cell {
    background: var(--color-primary);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
}

.agenda-time-cell {
    background: #f8fafc;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.agenda-slot {
    background: white;
    padding: 0.5rem;
    min-height: 50px;
    cursor: pointer;
    transition: background 0.15s;
}

.agenda-slot:hover {
    background: #f0f9ff;
}

.agenda-slot.ocupado {
    background: #fef2f2;
    cursor: default;
}

.cita-mini {
    background: var(--cita-color, var(--color-info));
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.cita-mini-cliente {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cita-mini-servicio {
    opacity: 0.9;
    font-size: 0.7rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.modal-body {
    padding: 1.5rem;
}

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