/* ─────────────────────────────────────────
   RESET & VARIABLES
───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --black:       #0d0d0d;
    --dark:        #1a1a1a;
    --mid-dark:    #3a3a3a;
    --mid:         #606060;
    --light:       #909090;
    --very-light:  #c0c0c0;
    --border:      #e8e8e8;
    --border-dark: #d0d0d0;
    --bg:          #f5f5f5;
    --surface:     #ffffff;
    --radius:      14px;
    --radius-sm:   9px;
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
    --shadow:      0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.18);
    --sidebar-w:   272px;
    --topbar-h:    56px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--black);
    min-height: 100vh;
}

/* ─────────────────────────────────────────
   LOGIN
───────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px 32px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.login-logo {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--black);
    margin-bottom: 16px;
}

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    color: var(--black);
    margin-bottom: 5px;
}

.login-subtitle {
    text-align: center;
    font-size: 0.82rem;
    color: var(--light);
    font-weight: 300;
    font-style: italic;
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--mid);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 7px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.93rem;
    color: var(--black);
    background: var(--surface);
    outline: none;
    transition: border-color 0.22s, box-shadow 0.22s;
}

.form-group input:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}

.form-group input::placeholder {
    color: #c0c0c0;
    font-weight: 300;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--very-light);
    padding: 4px;
}

.password-toggle.is-visible {
    color: var(--mid);
}

.login-error {
    font-size: 0.78rem;
    color: #b94040;
    margin-top: -8px;
    margin-bottom: 14px;
    display: none;
}

.login-error.show { display: block; }

.btn-login {
    width: 100%;
    padding: 13px;
    background: var(--black);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.93rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.04em;
    margin-top: 8px;
    transition: background 0.2s, transform 0.15s;
}

.btn-login:hover   { background: var(--dark); transform: translateY(-1px); }
.btn-login:active  { transform: translateY(0); }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.login-meta {
    margin-top: 18px;
    font-size: 0.78rem;
    color: var(--light);
    text-align: center;
}

.login-meta a {
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--border-dark);
    padding-bottom: 1px;
}

.login-meta a:hover {
    border-color: var(--black);
}

/* ─────────────────────────────────────────
   TOPBAR
───────────────────────────────────────── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.topbar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--black);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.burger-wrap { position: relative; }

.burger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 36px;
}

.burger-btn span {
    display: block;
    height: 2px;
    background: var(--black);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.burger-dot {
    position: absolute;
    top: 2px; right: 2px;
    width: 8px; height: 8px;
    background: var(--black);
    border-radius: 50%;
    border: 2px solid var(--surface);
    pointer-events: none;
    transition: opacity 0.2s;
}

.burger-dot.hidden { opacity: 0; }

/* ─────────────────────────────────────────
   OVERLAY & SIDEBAR
───────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.42);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.overlay.show { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed;
    top: 0; right: 0;
    width: var(--sidebar-w);
    height: 100%;
    background: var(--black);
    color: #fff;
    z-index: 300;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}

.sidebar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.sidebar-close:hover { color: #fff; }

.sidebar-nav {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}

.sidebar-nav li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    font-size: 0.88rem;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.18s;
    border-left: 3px solid transparent;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.01em;
}

.sidebar-nav li:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

.sidebar-nav li.active {
    background: rgba(255,255,255,0.10);
    border-left-color: #fff;
    color: #fff;
    font-weight: 500;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.sidebar-footer {
    padding: 16px 20px 36px;
    border-top: 1px solid rgba(255,255,255,0.09);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover { color: #fff; border-color: rgba(255,255,255,0.45); }

.sidebar-meta {
    margin-top: 10px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
}

.sidebar-meta a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
}

.landing-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.32);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.88);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s, box-shadow 0.15s;
}

.landing-pill-link::after {
    content: '↗';
    font-size: 0.75rem;
    opacity: 0.7;
}

.landing-pill-link:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.7);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

/* ─────────────────────────────────────────
   MAIN & VIEWS
───────────────────────────────────────── */
.main {
    padding-top: var(--topbar-h);
    min-height: 100vh;
}

.view {
    padding: 24px 20px 64px;
    animation: fadeUp 0.32s ease both;
}

.view.hidden { display: none; }

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

/* ─────────────────────────────────────────
   DASHBOARD
───────────────────────────────────────── */
.greeting {
    font-size: 0.8rem;
    color: var(--light);
    font-weight: 300;
    margin-bottom: 2px;
}

.view-date {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 26px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 18px 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-card.dark {
    background: var(--black);
    border-color: var(--black);
}

.icon-btn {
    border: none;
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--black);
    font-size: 0.78rem;
    gap: 4px;
    transition: background .14s ease, border-color .14s ease, opacity .14s ease, transform .08s ease;
}

.icon-btn:hover:not(:disabled) {
    background: #fff;
    border-color: rgba(15,23,42,0.18);
    transform: translateY(-1px);
}

.icon-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(15,23,42,.12);
}

.icon-btn:disabled {
    opacity: .5;
    cursor: default;
}

.icon-rotate {
    display: inline-block;
    font-size: 1rem;
}

.icon-btn.spinning .icon-rotate {
    animation: spin 0.7s linear infinite;
}

.icon-btn-primary {
    background: var(--black);
    color: #fff;
    border-color: var(--black);
}

.icon-btn-primary:hover:not(:disabled) {
    background: var(--dark);
}

.icon-label {
    font-size: 0.75rem;
}

.dash-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.stat-num {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 7px;
    color: var(--black);
}

.stat-card.dark .stat-num { color: #fff; }

.stat-label {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--light);
    line-height: 1.35;
}

.stat-card.dark .stat-label { color: rgba(255,255,255,0.5); }

.section-heading {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--light);
    margin-bottom: 12px;
}

/* ─────────────────────────────────────────
   APPOINTMENT CARDS
───────────────────────────────────────── */
.appt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 13px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
    box-shadow: var(--shadow-sm);
}

.appt-card:hover {
    border-color: var(--black);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.appt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mid);
    flex-shrink: 0;
    text-transform: uppercase;
}

.appt-info { flex: 1; min-width: 0; }

.appt-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appt-meta {
    font-size: 0.76rem;
    color: var(--light);
    font-weight: 300;
}

.appt-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.appt-time {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--black);
}

/* Status badges */
.status-badge {
    font-size: 0.62rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-pending   { background: var(--bg); color: var(--mid); border: 1px solid var(--border-dark); }
.status-confirmed { background: var(--black); color: #fff; }
.status-cancelled { background: #fafafa; color: var(--very-light); border: 1px solid var(--border); }

/* Manage cards */
.appt-card.manage-card { flex-wrap: wrap; cursor: default; }
.appt-card.manage-card:hover { transform: none; border-color: var(--border); box-shadow: var(--shadow-sm); }

.manage-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.btn-sm {
    flex: 1;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

.btn-confirm-sm {
    background: var(--black);
    border-color: var(--black);
    color: #fff;
}
.btn-confirm-sm:hover { background: var(--dark); }

.btn-modify-sm {
    background: var(--surface);
    border-color: var(--border-dark);
    color: var(--black);
}
.btn-modify-sm:hover { border-color: var(--black); background: var(--bg); }

.btn-cancel-sm {
    background: var(--surface);
    border-color: var(--border);
    color: #b94040;
}
.btn-cancel-sm:hover { background: #fff8f8; border-color: #b94040; }

/* ─────────────────────────────────────────
   FILTER TABS
───────────────────────────────────────── */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--mid);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active { background: var(--black); border-color: var(--black); color: #fff; font-weight: 500; }
.tab-btn:not(.active):hover { border-color: var(--black); color: var(--black); }

/* ─────────────────────────────────────────
   CALENDAR
───────────────────────────────────────── */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cal-month {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 500;
}

.cal-arrow {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--black);
    transition: all 0.18s;
    font-family: 'Poppins', sans-serif;
}

.cal-arrow:hover { background: var(--black); color: #fff; border-color: var(--black); }

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

.cal-weekday {
    text-align: center;
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--very-light);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 4px 0;
}

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

.cal-cell {
    aspect-ratio: 1;
    border: none;
    background: none;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.83rem;
    font-weight: 400;
    color: var(--black);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
    padding: 0;
}

.cal-cell:not(.empty):hover { background: var(--bg); }
.cal-cell.empty              { cursor: default; pointer-events: none; }

.cal-cell.today {
    font-weight: 600;
    background: var(--bg);
    border: 1.5px solid var(--border-dark);
}

.cal-cell.selected {
    background: var(--black);
    color: #fff;
}

.cal-cell.other-month { color: #d0d0d0; }

/* Dot under days with appointments */
.cal-cell.has-appts::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--black);
}

.cal-cell.selected.has-appts::after { background: rgba(255,255,255,0.7); }

.day-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
}

.day-panel-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

/* ─────────────────────────────────────────
   VIEW TITLE
───────────────────────────────────────── */
.view-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 22px;
}

/* ─────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 44px 20px;
}

.empty-icon {
    font-size: 2.2rem;
    opacity: 0.18;
    margin-bottom: 10px;
}

.empty-text {
    font-size: 0.85rem;
    color: var(--light);
    font-weight: 300;
    font-style: italic;
}

/* ─────────────────────────────────────────
   MODAL (BOTTOM SHEET)
───────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 400;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-backdrop.show { opacity: 1; visibility: visible; }

.modal {
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 500px;
    padding: 16px 22px 44px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
    max-height: 88vh;
    overflow-y: auto;
}

.modal-backdrop.show .modal { transform: translateY(0); }

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 12px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.3;
}

.modal-close-btn {
    background: var(--bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--mid);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.modal-close-btn:hover { background: var(--border); color: var(--black); }

.modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.modal-row:last-of-type { border-bottom: none; }

.modal-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.modal-value {
    font-size: 0.9rem;
    color: var(--black);
}

.modal-value a {
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--border-dark);
    padding-bottom: 1px;
    transition: border-color 0.2s;
}

.modal-value a:hover { border-color: var(--black); }

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 26px;
}

.btn-primary {
    padding: 13px;
    background: var(--black);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-align: center;
}

.btn-primary:hover { background: var(--dark); transform: translateY(-1px); }

.btn-secondary {
    padding: 13px;
    background: var(--surface);
    color: var(--black);
    border: 1.5px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

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

.btn-danger {
    padding: 13px;
    background: var(--surface);
    color: #b94040;
    border: 1.5px solid #e0c8c8;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-danger:hover { background: #fff8f8; border-color: #b94040; }

/* Modify form inside modal */
.modify-form .form-group  { margin-bottom: 16px; }

.modify-form label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--mid);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 7px;
}

.modify-form input,
.modify-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.93rem;
    color: var(--black);
    background: var(--surface);
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.modify-form input:focus,
.modify-form select:focus { border-color: var(--black); }

/* Cancel confirm panel inside modal */
.confirm-cancel-box {
    background: #fff8f8;
    border: 1px solid #ecd0d0;
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 16px;
    text-align: center;
}

.confirm-cancel-box p {
    font-size: 0.88rem;
    color: var(--mid-dark);
    line-height: 1.5;
}

.confirm-cancel-box strong {
    color: var(--black);
}

/* ─────────────────────────────────────────
   TOAST
───────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--black);
    color: #fff;
    padding: 11px 22px;
    border-radius: 24px;
    font-size: 0.83rem;
    font-weight: 400;
    z-index: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
    pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ─────────────────────────────────────────
   GESTIÓN DE HORARIOS
───────────────────────────────────────── */
.sched-section-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--light);
    margin-bottom: 12px;
}

.sched-spacer { height: 26px; }

/* Franjas horarias */
.sched-ranges-list { margin-bottom: 10px; }

.sched-range-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 8px;
}

.sched-range-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--black);
    letter-spacing: 0.01em;
}

.sched-remove-btn {
    background: none;
    border: none;
    color: var(--very-light);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.18s, background 0.18s;
    flex-shrink: 0;
}

.sched-remove-btn:hover { color: var(--black); background: var(--bg); }

.sched-add-btn {
    width: 100%;
    padding: 13px;
    background: var(--surface);
    border: 1.5px dashed var(--border-dark);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.84rem;
    font-weight: 400;
    color: var(--mid);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    text-align: center;
}

.sched-add-btn:hover { border-color: var(--black); color: var(--black); }

/* ── Campos datos del negocio ── */
.sched-biz-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.sched-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sched-field-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mid);
}

.sched-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--black);
    background: var(--surface);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sched-input:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

.sched-input::placeholder { color: var(--very-light); }

.sched-empty {
    font-size: 0.82rem;
    color: var(--very-light);
    font-style: italic;
    padding: 12px 0 8px;
}

.sched-hint {
    font-size: 0.75rem;
    color: var(--very-light);
    font-weight: 300;
    font-style: italic;
    margin-top: 10px;
    line-height: 1.4;
}

/* Días habilitados */
.day-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-pill {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--mid);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.day-pill:hover  { border-color: var(--black); color: var(--black); }
.day-pill.active { background: var(--black); border-color: var(--black); color: #fff; font-weight: 500; }

/* Bloqueos */
.sched-bloqueos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.sched-add-btn-inline {
    padding: 7px 16px;
    background: var(--black);
    border: none;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.sched-add-btn-inline:hover { background: var(--dark); }

.block-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.block-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.block-item-date {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 3px;
}

.block-item-meta {
    font-size: 0.76rem;
    color: var(--light);
    font-weight: 300;
}

/* Advertencia de turnos afectados */
.block-warning {
    margin-top: 14px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid var(--border);
    border-left: 3px solid var(--black);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.block-warning-title {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--mid-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.btn-wsp-notify {
    display: block;
    padding: 10px 14px;
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--black);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-wsp-notify:hover {
    background: var(--black);
    border-color: var(--black);
    color: #fff;
}

/* ─────────────────────────────────────────
   OPCIÓN PILLS (intervalo / cupos)
───────────────────────────────────────── */
.option-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.option-pill {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--mid);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.option-pill:hover  { border-color: var(--black); color: var(--black); }
.option-pill.active { background: var(--black); border-color: var(--black); color: #fff; font-weight: 500; }

/* ─────────────────────────────────────────
   GRUPOS DE DÍAS
───────────────────────────────────────── */
.day-group-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.day-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.day-group-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mid-dark);
}

/* ─────────────────────────────────────────
   TABLET — CENTRADO (601px – 767px)
───────────────────────────────────────── */
@media (min-width: 601px) and (max-width: 767px) {
    html { background: #e8e8e8; }
    body {
        max-width: 480px;
        margin: 0 auto;
        min-height: 100vh;
        box-shadow: 0 0 60px rgba(0,0,0,0.12);
        overflow-x: hidden;
    }
    .topbar {
        left:  max(0px, calc((100vw - 480px) / 2));
        right: max(0px, calc((100vw - 480px) / 2));
        width: auto;
    }
    .sidebar {
        right: max(0px, calc((100vw - 480px) / 2));
    }
}

/* ─────────────────────────────────────────
   DESKTOP — SIDEBAR FIJA A LA IZQUIERDA
   (≥ 768px)
───────────────────────────────────────── */
@media (min-width: 768px) {
    html { background: #e8e8e8; }

    /* Cuerpo ocupa sidebar + contenido */
    body {
        max-width: calc(var(--sidebar-w) + 480px); /* 272 + 480 = 752px */
        margin: 0 auto;
        min-height: 100vh;
        box-shadow: 0 0 60px rgba(0,0,0,0.12);
        overflow-x: hidden;
    }

    /* Ocultar burger */
    .burger-wrap { display: none; }

    /* Sidebar siempre visible a la izquierda */
    .sidebar {
        position: fixed;
        left:      max(0px, calc((100vw - var(--sidebar-w) - 480px) / 2));
        right:     auto;
        top:       0;
        bottom:    0;
        width:     var(--sidebar-w);
        transform: none !important;
        transition: none;
        border-right: 1px solid rgba(255,255,255,0.08);
    }

    /* Ocultar botón de cerrar sidebar en desktop */
    .sidebar-close { display: none; }

    /* Overlay nunca aparece en desktop */
    .overlay { display: none !important; }

    /* Topbar: ocupa solo la zona del contenido */
    .topbar {
        left:  calc(max(0px, calc((100vw - var(--sidebar-w) - 480px) / 2)) + var(--sidebar-w));
        right: max(0px, calc((100vw - var(--sidebar-w) - 480px) / 2));
        width: auto;
    }

    /* Main: desplazado para no quedar debajo del sidebar */
    .main {
        padding-left: var(--sidebar-w);
    }
}

/* ─────────────────────────────────────────
   RESPONSIVE MÓVIL
───────────────────────────────────────── */
@media (max-width: 360px) {
    .stats-grid     { grid-template-columns: 1fr; }
    .cal-cell       { font-size: 0.75rem; }
    .manage-actions { flex-wrap: wrap; }
    .option-pills   { gap: 6px; }
}
