/* Realizar Booking - Frontend Styles */
:root {
    --rb-primary: #2e7d32;
    --rb-primary-light: #4caf50;
    --rb-primary-dark: #1b5e20;
    --rb-secondary: #1565c0;
    --rb-danger: #c62828;
    --rb-warning: #f57f17;
    --rb-bg: #f8f9fa;
    --rb-card: #ffffff;
    --rb-border: #e0e0e0;
    --rb-text: #212529;
    --rb-text-muted: #6c757d;
    --rb-radius: 12px;
    --rb-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.rb-app { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; max-width: 720px; margin: 0 auto; color: var(--rb-text); }
.rb-app * { box-sizing: border-box; }

/* Steps indicator */
.rb-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; padding: 0; list-style: none; }
.rb-step { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; background: var(--rb-border); color: var(--rb-text-muted); transition: all .3s; }
.rb-step.active { background: var(--rb-primary); color: #fff; transform: scale(1.15); }
.rb-step.done { background: var(--rb-primary-light); color: #fff; }

/* Cards */
.rb-card { background: var(--rb-card); border: 1px solid var(--rb-border); border-radius: var(--rb-radius); padding: 24px; margin-bottom: 16px; box-shadow: var(--rb-shadow); }
.rb-card-title { margin: 0 0 16px; font-size: 20px; font-weight: 700; }

/* Room selection */
.rb-rooms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rb-room-card { background: var(--rb-card); border: 2px solid var(--rb-border); border-radius: var(--rb-radius); padding: 20px; text-align: center; cursor: pointer; transition: all .2s; }
.rb-room-card:hover { border-color: var(--rb-primary-light); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.rb-room-card.selected { border-color: var(--rb-primary); background: #e8f5e9; }
.rb-room-card h3 { margin: 0 0 4px; font-size: 18px; }
.rb-room-card .rb-room-icon { font-size: 32px; margin-bottom: 8px; }

/* Service selection */
.rb-services-list { display: flex; flex-direction: column; gap: 10px; }
.rb-service-option { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border: 2px solid var(--rb-border); border-radius: var(--rb-radius); cursor: pointer; transition: all .2s; }
.rb-service-option:hover { border-color: var(--rb-primary-light); }
.rb-service-option.selected { border-color: var(--rb-primary); background: #e8f5e9; }
.rb-service-option h4 { margin: 0; font-size: 16px; }
.rb-service-option .rb-service-desc { color: var(--rb-text-muted); font-size: 13px; margin-top: 2px; }
.rb-service-option .rb-service-price { font-size: 18px; font-weight: 700; color: var(--rb-primary); white-space: nowrap; }

/* Shift selection */
.rb-shifts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.rb-shift-btn { padding: 12px; border: 2px solid var(--rb-border); border-radius: var(--rb-radius); text-align: center; cursor: pointer; transition: all .2s; background: var(--rb-card); }
.rb-shift-btn:hover { border-color: var(--rb-primary-light); }
.rb-shift-btn.selected { border-color: var(--rb-primary); background: #e8f5e9; }
.rb-shift-btn.disabled { opacity: .4; cursor: not-allowed; }
.rb-shift-btn .rb-shift-label { font-weight: 700; font-size: 15px; }
.rb-shift-btn .rb-shift-time { color: var(--rb-text-muted); font-size: 12px; }
.rb-shift-btn .rb-shift-price { color: var(--rb-primary); font-weight: 600; margin-top: 4px; }

/* Calendar */
.rb-calendar { margin-top: 16px; }
.rb-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rb-calendar-header h3 { margin: 0; font-size: 17px; text-transform: capitalize; }
.rb-calendar-nav { background: none; border: 1px solid var(--rb-border); border-radius: 8px; padding: 6px 14px; cursor: pointer; font-size: 18px; transition: background .2s; }
.rb-calendar-nav:hover { background: var(--rb-bg); }
.rb-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.rb-calendar-weekday { font-size: 12px; font-weight: 700; color: var(--rb-text-muted); padding: 6px 0; }
.rb-calendar-day { padding: 10px 4px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: all .15s; border: 2px solid transparent; }
.rb-calendar-day:hover:not(.disabled):not(.empty) { background: #e8f5e9; }
.rb-calendar-day.selected { background: var(--rb-primary); color: #fff; font-weight: 700; }
.rb-calendar-day.disabled { color: #ccc; cursor: not-allowed; }
.rb-calendar-day.empty { cursor: default; }
.rb-calendar-day.today { border-color: var(--rb-primary-light); }
.rb-calendar-day.has-slots { position: relative; }
.rb-calendar-day.has-slots::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--rb-primary); }

/* Hour slots */
.rb-hours-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.rb-hour-slot { padding: 10px 8px; border: 2px solid var(--rb-border); border-radius: 8px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .15s; }
.rb-hour-slot:hover:not(.disabled) { border-color: var(--rb-primary-light); }
.rb-hour-slot.selected { border-color: var(--rb-primary); background: #e8f5e9; }
.rb-hour-slot.disabled { opacity: .3; cursor: not-allowed; }

/* Form fields */
.rb-form-group { margin-bottom: 16px; }
.rb-form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--rb-text); }
.rb-form-group input, .rb-form-group select, .rb-form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--rb-border); border-radius: 8px;
    font-size: 15px; font-family: inherit; transition: border-color .2s;
}
.rb-form-group input:focus, .rb-form-group select:focus { border-color: var(--rb-primary); outline: none; box-shadow: 0 0 0 3px rgba(46,125,50,0.15); }
.rb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Summary */
.rb-summary { background: var(--rb-bg); border-radius: var(--rb-radius); padding: 20px; }
.rb-summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--rb-border); }
.rb-summary-row:last-child { border: none; }
.rb-summary-row .rb-label { color: var(--rb-text-muted); }
.rb-summary-row .rb-value { font-weight: 600; }
.rb-summary-total { font-size: 22px; color: var(--rb-primary); padding-top: 12px; margin-top: 8px; border-top: 2px solid var(--rb-primary); }

/* Buttons */
.rb-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: 8px; font-size: 15px; font-weight: 700; border: none; cursor: pointer; transition: all .2s; text-decoration: none; }
.rb-btn-primary { background: var(--rb-primary); color: #fff; }
.rb-btn-primary:hover { background: var(--rb-primary-dark); transform: translateY(-1px); }
.rb-btn-secondary { background: var(--rb-bg); color: var(--rb-text); border: 1px solid var(--rb-border); }
.rb-btn-secondary:hover { background: #e9ecef; }
.rb-btn-danger { background: var(--rb-danger); color: #fff; }
.rb-btn-danger:hover { background: #b71c1c; }
.rb-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.rb-btn-full { width: 100%; }
.rb-actions { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* Loading & messages */
.rb-loading { text-align: center; padding: 40px; color: var(--rb-text-muted); }
.rb-message { padding: 14px 20px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.rb-message-success { background: #d4edda; color: #155724; }
.rb-message-error { background: #f8d7da; color: #721c24; }
.rb-message-info { background: #cce5ff; color: #004085; }

/* Customer panel */
.rb-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.rb-booking-list { display: flex; flex-direction: column; gap: 12px; }
.rb-booking-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border: 1px solid var(--rb-border); border-radius: var(--rb-radius); background: var(--rb-card); }
.rb-booking-info h4 { margin: 0 0 4px; font-size: 15px; }
.rb-booking-info p { margin: 0; color: var(--rb-text-muted); font-size: 13px; }
.rb-booking-meta { text-align: right; }
.rb-booking-price { font-size: 18px; font-weight: 700; color: var(--rb-primary); }
.rb-booking-status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.rb-status-approved { background: #d4edda; color: #155724; }
.rb-status-pending { background: #fff3cd; color: #856404; }
.rb-status-cancelled { background: #f8d7da; color: #721c24; }

/* Login required */
.rb-login-required { text-align: center; padding: 40px; background: var(--rb-bg); border-radius: var(--rb-radius); }

/* ===== CUSTOMER PANEL ===== */
.rb-panel-welcome { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 20px; background: linear-gradient(135deg, #E6F2E8, #F6FCEF); border-radius: var(--rb-radius); }
.rb-panel-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--rb-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.rb-panel-name { font-size: 18px; font-weight: 700; color: var(--rb-text); margin: 0; }
.rb-panel-subtitle { font-size: 13px; color: var(--rb-text-muted); margin: 2px 0 0; }

/* Check-in banner */
.rb-checkin-banner { background: #E6F2E8; border: 2px solid var(--rb-primary); border-radius: var(--rb-radius); padding: 16px 20px; margin-bottom: 20px; }
.rb-checkin-title { font-size: 15px; font-weight: 700; color: var(--rb-primary-dark, #1b5e20); margin-bottom: 10px; }
.rb-checkin-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid rgba(0,0,0,0.06); }
.rb-checkin-item:first-of-type { border: none; }
.rb-btn-checkin { padding: 8px 20px; font-size: 13px; border-radius: 50px; }
.rb-badge-checkin-done { display: inline-block; padding: 6px 14px; background: #d4edda; color: #155724; border-radius: 50px; font-size: 12px; font-weight: 600; }
.rb-text-muted { color: var(--rb-text-muted); font-size: 12px; }

/* Tabs */
.rb-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: #f0f0f0; padding: 4px; border-radius: 10px; }
.rb-tab { flex: 1; padding: 10px 16px; border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--rb-text-muted); border-radius: 8px; transition: all 0.2s; font-family: inherit; }
.rb-tab:hover { color: var(--rb-text); }
.rb-tab-active { background: #fff; color: var(--rb-text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* Booking cards */
.rb-booking-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--rb-card); border: 1px solid var(--rb-border); border-radius: var(--rb-radius); margin-bottom: 8px; transition: all 0.15s; }
.rb-booking-card:hover { border-color: var(--rb-primary-light, #4caf50); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.rb-booking-date-badge { min-width: 48px; text-align: center; background: var(--rb-bg, #f8f9fa); border-radius: 10px; padding: 8px 4px; }
.rb-booking-day { display: block; font-size: 20px; font-weight: 800; color: var(--rb-primary); line-height: 1; }
.rb-booking-weekday { display: block; font-size: 10px; font-weight: 600; color: var(--rb-text-muted); text-transform: uppercase; }
.rb-booking-details { flex: 1; }
.rb-booking-room { font-size: 15px; font-weight: 700; color: var(--rb-text); }
.rb-booking-service { font-size: 12px; color: var(--rb-text-muted); margin-top: 1px; }
.rb-booking-time { font-size: 12px; color: var(--rb-text-muted); margin-top: 3px; }
.rb-booking-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rb-booking-price { font-size: 16px; font-weight: 800; color: var(--rb-primary); }
.rb-btn-cancel-sm { padding: 4px 12px; font-size: 11px; border-radius: 6px; background: #fee2e2; color: #991b1b; border: none; cursor: pointer; font-weight: 600; transition: background 0.2s; }
.rb-btn-cancel-sm:hover { background: #fecaca; }

/* Profile card */
.rb-profile-card { background: var(--rb-card); border: 1px solid var(--rb-border); border-radius: var(--rb-radius); padding: 24px; }
.rb-profile-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--rb-border); }
.rb-profile-row:last-of-type { border: none; }
.rb-profile-row label { font-size: 13px; font-weight: 600; color: var(--rb-text-muted); min-width: 120px; }
.rb-profile-row span { font-size: 14px; color: var(--rb-text); }
.rb-input { padding: 8px 12px; border: 1px solid var(--rb-border); border-radius: 8px; font-size: 14px; font-family: inherit; width: 220px; }
.rb-input:focus { outline: none; border-color: var(--rb-primary); box-shadow: 0 0 0 3px rgba(46,125,50,0.1); }

/* Empty */
.rb-empty { text-align: center; padding: 40px 20px; color: var(--rb-text-muted); font-size: 14px; }

/* Responsive */
@media (max-width: 600px) {
    .rb-rooms-grid { grid-template-columns: 1fr; }
    .rb-shifts-grid { grid-template-columns: 1fr; }
    .rb-hours-grid { grid-template-columns: repeat(3, 1fr); }
    .rb-form-row { grid-template-columns: 1fr; }
    .rb-booking-card { flex-direction: column; align-items: flex-start; }
    .rb-booking-right { align-items: flex-start; flex-direction: row; gap: 8px; }
    .rb-tabs { overflow-x: auto; }
    .rb-checkin-item { flex-direction: column; gap: 8px; align-items: flex-start; }
    .rb-profile-row { flex-direction: column; align-items: flex-start; gap: 6px; }
    .rb-input { width: 100%; }
}
