/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f8f8;
    --accent: #1a5276;
    --accent-glow: rgba(26, 82, 118, 0.15);
    --accent-blue: #1a5276;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #999999;
    --border: #e5e5e5;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

* { -webkit-user-select: none; -moz-user-select: none; user-select: none; }
p, span, h1, h2, h3, h4, h5, h6, .barber-bio { -webkit-user-select: text; user-select: text; }

.app-container { max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--bg-primary); position: relative; padding-bottom: 24px; box-shadow: 0 0 40px rgba(0,0,0,0.08); }

/* ===== HEADER ===== */
.profile-header { position: relative; width: 100%; }
.banner { width: 100%; height: 180px; overflow: hidden; position: relative; }
.banner-img { width: 100%; height: 100%; object-fit: cover; }
.banner-overlay { display: none; }

.profile-photo-wrapper { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); z-index: 10; }
.profile-photo { width: 90px; height: 90px; border-radius: 50%; border: 3px solid var(--accent-blue); object-fit: cover; box-shadow: 0 4px 20px rgba(30,64,175,0.2); }
.status-dot { position: absolute; bottom: 4px; right: 4px; width: 14px; height: 14px; background: var(--success); border-radius: 50%; border: 2px solid var(--bg-primary); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== BIO ===== */
.bio-section { text-align: center; padding: 50px 20px 20px; }
.barber-name { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.barber-tagline { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; font-weight: 300; }
.location { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; color: var(--text-muted); font-size: 0.8rem; }

.social-links { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.social-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 50%; color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
.social-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.rating { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.stars { display: flex; gap: 2px; }
.star { width: 18px; height: 18px; }
.star.full { fill: var(--accent-blue); }
.rating-text { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; }

.barber-bio { margin-top: 14px; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; padding: 0 12px; font-weight: 300; text-align: left; }

/* ===== TABS ===== */
.tabs { display: flex; padding: 0 16px; gap: 4px; border-bottom: 1px solid var(--border); margin-top: 10px; }
.tab { flex: 1; padding: 12px 8px; background: none; border: none; color: var(--text-muted); font-size: 0.82rem; font-weight: 500; cursor: pointer; position: relative; transition: var(--transition); }
.tab.active { color: var(--accent); }
.tab.active::after { content: ''; position: absolute; bottom: -1px; left: 20%; right: 20%; height: 2px; background: var(--accent); border-radius: 2px; }

.tab-content { display: none; padding: 20px 16px; animation: fadeInUp 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* ===== SERVICES ===== */
.services-list { display: flex; flex-direction: column; gap: 12px; }
.service-card { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); transition: var(--transition); }
.service-card:hover { border-color: var(--accent); transform: translateX(4px); }
.service-info h3 { font-size: 0.95rem; font-weight: 600; }
.service-info p { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.service-duration { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; display: inline-block; }
.service-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.service-price { font-size: 1rem; font-weight: 700; color: var(--accent); }
.btn-agendar-service { padding: 8px 16px; background: var(--accent-blue); color: white; border: none; border-radius: 20px; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: inherit; }
.btn-agendar-service:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(30,64,175,0.3); }

/* ===== PORTFOLIO ===== */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.portfolio-item { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; cursor: pointer; position: relative; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }

/* ===== DETAILS ===== */
.details-section { margin-bottom: 24px; }
.section-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 3px; height: 16px; background: var(--accent); border-radius: 2px; }
.schedule-list { display: flex; flex-direction: column; gap: 8px; }
.schedule-item { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--bg-secondary); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.schedule-item .day { font-size: 0.85rem; font-weight: 500; }
.schedule-item .hours { font-size: 0.85rem; color: var(--accent-blue); font-weight: 500; }
.schedule-item.closed .day { color: var(--text-muted); }
.schedule-item .hours.closed { color: var(--danger); }

/* ===== BOOKING MODAL ===== */
.booking-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); }
.booking-modal.active { display: flex; }
.booking-modal-content { width: 100%; max-width: 430px; max-height: 85vh; background: var(--bg-primary); border-radius: 20px 20px 0 0; padding: 24px 16px 32px; overflow-y: auto; animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.booking-modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 50%; color: var(--text-primary); font-size: 1.2rem; cursor: pointer; }
.booking-selected-service { font-size: 0.85rem; color: var(--accent); font-weight: 600; margin-bottom: 16px; padding: 8px 12px; background: var(--bg-secondary); border-radius: var(--radius-sm); border: 1px solid var(--border); display: inline-block; }
.booking-step { display: none; animation: fadeInUp 0.4s ease; }
.booking-step.active { display: block; }

/* Calendar */
.calendar { background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; margin-bottom: 16px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cal-month { font-size: 0.95rem; font-weight: 600; }
.cal-nav { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 50%; color: var(--text-primary); font-size: 1.2rem; cursor: pointer; }
.cal-nav:hover { border-color: var(--accent); color: var(--accent); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 8px; }
.calendar-weekdays span { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: var(--transition); border: none; background: none; color: var(--text-primary); }
.cal-day:hover:not(.disabled):not(.empty) { background: var(--accent-glow); color: var(--accent); }
.cal-day.selected { background: var(--accent-blue); color: white; font-weight: 700; }
.cal-day.disabled { color: var(--text-muted); opacity: 0.3; cursor: not-allowed; }
.cal-day.blocked-day { opacity: 0.5; text-decoration: line-through; color: var(--danger); }
.cal-day.today { border: 1px solid var(--accent-blue); }

/* Time Slots */
.time-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.time-slot { padding: 12px 8px; text-align: center; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: var(--transition); color: var(--text-primary); }
.time-slot:hover:not(.disabled) { border-color: var(--accent-blue); }
.time-slot.selected { background: var(--accent-blue); color: white; border-color: var(--accent-blue); font-weight: 700; }
.time-slot.disabled { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; }

/* Summary */
.booking-summary { background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; margin-bottom: 16px; }
.summary-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.summary-item:last-child { border-bottom: none; }
.summary-label { font-size: 0.82rem; color: var(--text-secondary); }
.summary-value { font-size: 0.82rem; font-weight: 600; color: var(--accent-blue); }

/* Form */
.client-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.form-input { padding: 14px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem; font-family: inherit; outline: none; transition: var(--transition); }
.form-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(30,64,175,0.1); }
.form-input::placeholder { color: var(--text-muted); }
.form-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: -4px; }

/* Buttons */
.btn-confirm { width: 100%; padding: 16px; background: var(--accent-blue); color: white; border: none; border-radius: var(--radius); font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: inherit; }
.btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(30,64,175,0.3); }
.btn-back { display: block; margin-top: 12px; padding: 10px; background: none; border: none; color: var(--text-muted); font-size: 0.82rem; cursor: pointer; font-family: inherit; }

/* Success */
.success-message { text-align: center; padding: 40px 20px; }
.success-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; background: var(--success); color: white; border-radius: 50%; font-size: 1.5rem; font-weight: 700; margin: 0 auto 16px; animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
.success-message h3 { font-size: 1.2rem; margin-bottom: 8px; }
.success-message p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 24px; }

/* ===== LIGHTBOX ===== */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.lightbox.active { display: flex; }
.lightbox-img { max-width: 100%; max-height: 80vh; border-radius: var(--radius); object-fit: contain; }
.lightbox-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #333; border: none; border-radius: 50%; color: white; font-size: 1.5rem; cursor: pointer; }

/* ===== FOOTER ===== */
.site-footer { padding: 32px 16px 24px; text-align: center; border-top: 1px solid var(--border); margin-top: 20px; }
.footer-rights { font-size: 0.7rem; color: var(--text-muted); }
.footer-admin-link { display: inline-block; margin-top: 12px; font-size: 0.7rem; color: var(--text-muted); text-decoration: none; opacity: 0.4; transition: var(--transition); }
.footer-admin-link:hover { opacity: 1; color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (min-width: 431px) { body { background: #f0f0f0; } .app-container { border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }


/* ===== ADDRESS & CONTACT ===== */
.address-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.address-card svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.address-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
}

.contact-item svg {
    color: var(--accent);
}

.contact-item.whatsapp {
    border-color: #25d366;
}

.contact-item.whatsapp svg {
    color: #25d366;
}

.contact-item span {
    font-size: 0.85rem;
    font-weight: 500;
}
