/* ============================================
   BARBERX - App Cliente Styles
   Sistema de Agendamentos
   ============================================ */

/* Variables */
:root {
    --primary-gold: #d4a853;
    --primary-gold-light: #e8c878;
    --primary-gold-dark: #b8923f;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-input: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #333333;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}

.header-logo i {
    color: var(--primary-gold);
}

.header-logo .gold {
    color: var(--primary-gold);
}

.header-menu {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Barbearia Info */
.barbearia-info {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.barbearia-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.barbearia-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--bg-dark);
}

.barbearia-details h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.barbearia-endereco {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.barbearia-endereco i {
    width: 14px;
    height: 14px;
}

.barbearia-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--primary-gold);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--primary-gold);
    background: rgba(212, 168, 83, 0.1);
}

.action-btn i {
    width: 16px;
    height: 16px;
}

/* Steps Indicator */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--bg-dark);
}

.step-item.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-item span:not(.step-number) {
    font-size: 11px;
    color: var(--text-muted);
}

.step-item.active span:not(.step-number) {
    color: var(--primary-gold);
    font-weight: 500;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
    margin-bottom: 20px;
}

/* Step Content */
.step-content {
    display: none;
    padding: 16px 0;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Services Grid */
.servicos-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.servico-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.servico-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-2px);
}

.servico-card.selected {
    border-color: var(--primary-gold);
    background: rgba(212, 168, 83, 0.1);
}

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

.servico-nome {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.servico-preco {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-gold);
}

.servico-info {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.servico-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Profissionais Grid */
.profissionais-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.profissional-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profissional-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-2px);
}

.profissional-card.selected {
    border-color: var(--primary-gold);
    background: rgba(212, 168, 83, 0.1);
}

.profissional-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--bg-dark);
    border: 3px solid var(--border-color);
}

.profissional-card.selected .profissional-avatar {
    border-color: var(--primary-gold);
}

.profissional-nome {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profissional-especialidade {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Calendar */
.calendar-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

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

.calendar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-nav {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.calendar-nav:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

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

.calendar-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 0;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: var(--bg-card-hover);
}

.calendar-day.selected {
    background: var(--primary-gold);
    color: var(--bg-dark);
}

.calendar-day.today {
    border: 1px solid var(--primary-gold);
}

.calendar-day.disabled {
    color: var(--text-muted);
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-day.empty {
    cursor: default;
}

/* Horarios */
.horarios-container {
    margin-top: 20px;
}

.horarios-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

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

.horario-btn {
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.horario-btn:hover:not(.disabled) {
    border-color: var(--primary-gold);
}

.horario-btn.selected {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--bg-dark);
}

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

/* Resumo Card */
.resumo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.resumo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.resumo-item:last-of-type {
    border-bottom: none;
}

.resumo-item i {
    color: var(--primary-gold);
    width: 20px;
    height: 20px;
}

.resumo-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.resumo-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.resumo-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--primary-gold);
}

.resumo-total span:first-child {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.resumo-preco {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-gold);
}

/* Cliente Form */
.cliente-form {
    margin-top: 24px;
}

.cliente-form h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

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

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

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

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 168, 83, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

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

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
}

.nav-buttons .btn {
    flex: 1;
}

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

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

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.modal-icon.success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: white;
}

.modal-icon.success i {
    width: 40px;
    height: 40px;
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-content > p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-details {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.modal-detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-detail-item i {
    color: var(--primary-gold);
    width: 18px;
    height: 18px;
}

.modal-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-note i {
    width: 16px;
    height: 16px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-actions .btn {
    width: 100%;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

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

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.small {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.loading-overlay p {
    margin-top: 16px;
    color: var(--text-secondary);
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.loading-placeholder p {
    margin-top: 12px;
    font-size: 14px;
}

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

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

/* Responsive */
@media (max-width: 360px) {
    .profissionais-grid {
        grid-template-columns: 1fr;
    }

    .horarios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
