/* ================================================
   Holispace Booking — Panel recepcji
   ================================================ */

/* ------------------------------------------------
   Logowanie
   ------------------------------------------------ */
.hb-rc-login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.hb-rc-login-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.hb-rc-login-header {
    text-align: center;
    margin-bottom: 28px;
}

.hb-rc-login-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.hb-rc-login-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}

.hb-rc-login-header p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.hb-rc-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}

.hb-rc-login-field {
    margin-bottom: 16px;
}

.hb-rc-login-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 6px;
}

.hb-rc-login-field input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}

.hb-rc-login-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.hb-rc-login-btn {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    margin-top: 8px;
}

.hb-rc-login-btn:hover { background: #1d4ed8; }

.hb-rc-login-forgot {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

.hb-rc-login-forgot a { color: #2563eb; text-decoration: none; }

/* ------------------------------------------------
   Panel recepcji
   ------------------------------------------------ */
.hb-rc {
    max-width: 1100px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1e293b;
}

/* Nagłówek */
.hb-rc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.hb-rc__header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hb-rc__header-logo { font-size: 32px; }

.hb-rc__header-info h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
}

.hb-rc__header-info p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hb-rc__role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hb-rc__role-badge--admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.hb-rc__role-badge--reception {
    background: #f0fdf4;
    color: #166534;
}

.hb-rc__logout {
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all .2s;
}

.hb-rc__logout:hover { background: #f8fafc; color: #1e293b; }

/* Komunikat */
.hb-rc__notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.hb-rc__notice--success { background: #dcfce7; color: #166534; }
.hb-rc__notice--error   { background: #fef2f2; color: #dc2626; }

/* Zakładki */
.hb-rc__tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.hb-rc__tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}

.hb-rc__tab:hover      { color: #2563eb; }
.hb-rc__tab--active    { color: #2563eb; border-bottom-color: #2563eb; }

/* Filtry */
.hb-rc__filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.hb-rc__filter-group { display: flex; flex-direction: column; gap: 4px; }

.hb-rc__filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hb-rc__filter-group select,
.hb-rc__filter-group input[type="date"],
.hb-rc__filter-group input[type="text"] {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    background: #fff;
    font-family: inherit;
}

/* Liczba wyników */
.hb-rc__count {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

/* Lista wizyt */
.hb-rc__appointments { display: flex; flex-direction: column; gap: 10px; }

.hb-rc__appointment {
    display: grid;
    grid-template-columns: 56px 1fr auto auto;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    transition: box-shadow .2s;
}

.hb-rc__appointment:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }

.hb-rc__appointment-date {
    text-align: center;
    background: #eff6ff;
    border-radius: 8px;
    padding: 6px 4px;
}

.hb-rc__appointment-day {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
}

.hb-rc__appointment-month {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    margin-top: 2px;
}

.hb-rc__appointment-weekday {
    display: block;
    font-size: 10px;
    color: #93c5fd;
    margin-top: 1px;
}

.hb-rc__appointment-patient strong {
    font-size: 14px;
    display: block;
}

.hb-rc__appointment-phone,
.hb-rc__appointment-email {
    font-size: 12px;
    color: #64748b;
    margin-right: 10px;
}

.hb-rc__appointment-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
}

.hb-rc__appointment-specialist {
    padding-left: 8px;
    font-weight: 500;
    color: #1e293b;
}

.hb-rc__appointment-notes {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    margin-top: 3px;
}

.hb-rc__status-locked {
    font-size: 12px;
    color: #94a3b8;
    padding: 6px 10px;
    display: inline-block;
}

.hb-rc__appointment-actions select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    font-family: inherit;
}

.hb-rc__empty {
    text-align: center;
    padding: 40px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 8px;
}

/* ------------------------------------------------
   Przyciski
   ------------------------------------------------ */
.hb-rc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #1e293b;
    font-family: inherit;
    transition: all .15s;
    text-decoration: none;
}

.hb-rc__btn:hover          { background: #f8fafc; border-color: #cbd5e1; }
.hb-rc__btn--primary       { background: #2563eb; color: #fff; border-color: #2563eb; }
.hb-rc__btn--primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.hb-rc__btn--icon          { width: 32px; padding: 6px; font-size: 16px; font-weight: 700; }
.hb-rc__btn--large         { padding: 12px 32px; font-size: 15px; }

.hb-rc__btn--view {
    border: none;
    background: transparent;
    border-radius: 6px;
}

.hb-rc__btn--view.hb-rc__btn--active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    color: #2563eb;
    font-weight: 600;
}

/* ------------------------------------------------
   Formularz umawiania
   ------------------------------------------------ */
.hb-rc__section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hb-rc__book-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 24px;
}

.hb-rc__book-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.hb-rc__book-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.hb-rc__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.hb-rc__form-field { margin-bottom: 12px; }

.hb-rc__form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.hb-rc__form-field input,
.hb-rc__form-field select,
.hb-rc__form-field textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color .2s;
    background: #fff;
}

.hb-rc__form-field input:focus,
.hb-rc__form-field select:focus,
.hb-rc__form-field textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* Wyszukiwarka pacjenta */
.hb-rc__search-box {
    margin-bottom: 16px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 8px;
}

.hb-rc__search-box label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.hb-rc__search-wrap { position: relative; }

.hb-rc__search-wrap input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.hb-rc__search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.hb-rc__search-result {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    transition: background .1s;
}

.hb-rc__search-result:last-child { border-bottom: none; }
.hb-rc__search-result:hover      { background: #eff6ff; }
.hb-rc__search-result strong     { display: block; color: #1e293b; }
.hb-rc__search-result span       { color: #64748b; font-size: 12px; }

.hb-rc__hint { font-size: 12px; color: #64748b; margin: 8px 0 0; }

/* Sloty */
.hb-rc__slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.hb-rc__slot {
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    line-height: 1.3;
    text-align: center;
}

.hb-rc__slot:hover       { border-color: #2563eb; background: #eff6ff; color: #2563eb; }
.hb-rc__slot.hb-selected { border-color: #2563eb; background: #2563eb; color: #fff; }

.hb-rc__slot-room {
    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: .8;
    margin-top: 2px;
}

/* ------------------------------------------------
   Kalendarz recepcji
   ------------------------------------------------ */
.hb-rc__calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.hb-rc__cal-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hb-rc__cal-period {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    min-width: 180px;
    text-align: center;
}

.hb-rc__cal-filters .hb-rc__select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    background: #fff;
    font-family: inherit;
}

.hb-rc__view-switcher {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

/* Legenda */
.hb-rc__cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.hb-rc__cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1e293b;
}

.hb-rc__cal-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Kontener kalendarza */
.hb-rc__cal-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
}

.hb-rc__cal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #64748b;
    font-size: 14px;
}

/* Tygodniowy */
.hb-rc-week {
    display: grid;
    grid-template-columns: 55px repeat(7, 1fr);
    overflow-x: auto;
}

.hb-rc-week-header-cell {
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    background: #f8fafc;
    text-transform: uppercase;
    letter-spacing: .04em;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hb-rc-week-header-cell.hb-rc-today-col { color: #2563eb; background: #eff6ff; }

.hb-rc-time-col { border-right: 1px solid #e2e8f0; }

.hb-rc-time-slot {
    height: 60px;
    padding: 3px 6px 0;
    font-size: 10px;
    color: #94a3b8;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
    line-height: 1;
}

.hb-rc-day-col {
    border-right: 1px solid #f1f5f9;
    position: relative;
}

.hb-rc-day-col.hb-rc-today-col { background: #fafbff; }

.hb-rc-day-cell {
    height: 60px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.hb-rc-event {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    z-index: 5;
    overflow: hidden;
    transition: opacity .15s, transform .15s;
    line-height: 1.3;
}

.hb-rc-event:hover { opacity: .88; transform: scale(1.02); z-index: 6; }

.hb-rc-event-patient {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hb-rc-event-time {
    display: block;
    font-weight: 400;
    opacity: .85;
    font-size: 10px;
}

/* Miesięczny */
.hb-rc-month { display: grid; grid-template-columns: repeat(7, 1fr); }

.hb-rc-month-header {
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hb-rc-month-day {
    min-height: 80px;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    padding: 5px;
    vertical-align: top;
}

.hb-rc-month-day.hb-rc-other-month { background: #fafafa; }
.hb-rc-month-day.hb-rc-today       { background: #eff6ff; }

.hb-rc-month-day-number {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
}

.hb-rc-month-day.hb-rc-today .hb-rc-month-day-number { color: #2563eb; }

.hb-rc-month-event {
    display: block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity .15s;
}

.hb-rc-month-event:hover { opacity: .85; }
.hb-rc-month-more { font-size: 10px; color: #64748b; padding: 1px 3px; }

/* Tooltip */
.hb-rc__tooltip {
    position: fixed;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    width: 270px;
    z-index: 9999;
    font-size: 13px;
}

.hb-rc__tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.hb-rc__tooltip-title { font-weight: 700; font-size: 14px; color: #1e293b; }

.hb-rc__tooltip-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    line-height: 1;
}

.hb-rc__tooltip-body { padding: 12px 16px; }

.hb-rc__tooltip-row {
    display: flex;
    gap: 8px;
    margin-bottom: 7px;
    font-size: 13px;
}

.hb-rc__tooltip-label { color: #64748b; flex-shrink: 0; min-width: 65px; }
.hb-rc__tooltip-value { color: #1e293b; font-weight: 500; }

/* Responsive */
@media ( max-width: 768px ) {
    .hb-rc__appointment {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto;
    }
    .hb-rc__appointment-status  { grid-column: 2; }
    .hb-rc__appointment-actions { grid-column: 1 / -1; }
    .hb-rc__book-grid            { grid-template-columns: 1fr; }
    .hb-rc__form-row             { grid-template-columns: 1fr; }
}