:root {
    --clinic-sidebar-bg: #17233b;
    --clinic-sidebar-hover: #24314d;
    --clinic-accent: #0d6efd;
    --clinic-body-bg: #f3f5f9;
}

body {
    background: var(--clinic-body-bg);
    font-size: 0.925rem;
}

/* --- Yan menyu --- */
.sidebar {
    background: var(--clinic-sidebar-bg);
    width: 250px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1040;
    transition: transform .2s ease;
}

.sidebar .brand {
    color: #fff;
    padding: 1rem 1.15rem;
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: block;
    text-decoration: none;
}

.sidebar .nav-link {
    color: #b9c3d6;
    padding: .5rem 1.15rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.sidebar .nav-link:hover {
    background: var(--clinic-sidebar-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--clinic-accent);
    color: #fff;
}

.sidebar .nav-section {
    color: #6c7a94;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 1rem 1.15rem .35rem;
}

.content-wrap {
    margin-left: 250px;
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .content-wrap {
        margin-left: 0;
    }
}

/* --- Ümumi --- */
.card {
    border: 1px solid #e3e8f0;
    border-radius: .5rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eef1f6;
    font-weight: 600;
}

.table > :not(caption) > * > * {
    padding: .55rem .6rem;
}

.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #64748b;
    background: #f8fafc;
    white-space: nowrap;
}

.stat-card .stat-value {
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.2;
}

.stat-card .stat-label {
    color: #64748b;
    font-size: .8rem;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.required::after {
    content: " *";
    color: #dc3545;
}

.table-sm-input {
    min-width: 90px;
}

/* --- Çap --- */
@media print {
    .sidebar,
    .topbar,
    .no-print {
        display: none !important;
    }

    .content-wrap {
        margin-left: 0;
    }

    body {
        background: #fff;
    }
}

/* --- Axtarışlı seçim sahəsi (picker) --- */
.picker {
    position: relative;
}

.picker-control {
    position: relative;
}

.picker-control .form-control {
    padding-right: 2rem;
}

.picker-clear {
    position: absolute;
    top: 50%;
    right: .4rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    line-height: 1;
    padding: .15rem .25rem;
    font-size: .75rem;
    border-radius: .25rem;
}

.picker-clear:hover {
    color: #dc3545;
    background: #f1f5f9;
}

.picker-menu {
    display: none;
    /* fixed — cədvəlin overflow-u menyunu kəsməsin deyə (yeri JS hesablayır) */
    position: fixed;
    z-index: 1080;
    min-width: 260px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dfe4ec;
    border-radius: .45rem;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .12);
}

.picker-menu.show {
    display: block;
}

.picker-option {
    display: block;
    width: 100%;
    text-align: start;
    border: 0;
    background: transparent;
    padding: .45rem .7rem;
    border-bottom: 1px solid #f1f5f9;
}

.picker-option:last-child {
    border-bottom: 0;
}

.picker-option:hover,
.picker-option.active {
    background: #eef4ff;
}

.picker-title {
    font-weight: 500;
    font-size: .9rem;
}

.picker-meta {
    font-size: .77rem;
    color: #64748b;
}

.picker-note {
    padding: .55rem .7rem;
    font-size: .85rem;
    color: #64748b;
}

/* Uzun cədvəllərdə başlıq yapışıq qalsın */
.table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* --- Qəbul vaxtı xanaları (24 saatlıq) --- */
.slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.slot {
    border: 1px solid #cfd8e6;
    background: #fff;
    color: #1f2937;
    border-radius: .35rem;
    padding: .3rem .6rem;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
    min-width: 62px;
}

.slot:hover:not(:disabled) {
    border-color: var(--clinic-accent);
    background: #eef4ff;
}

.slot-busy,
.slot:disabled {
    background: #f1f3f7;
    color: #9aa4b2;
    border-color: #e2e6ee;
    text-decoration: line-through;
    cursor: not-allowed;
}

.slot-active {
    background: var(--clinic-accent);
    border-color: var(--clinic-accent);
    color: #fff;
    font-weight: 600;
}

.slot-legend {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: .3rem;
    vertical-align: middle;
}

.slot-legend-free {
    background: #fff;
    border: 1px solid #cfd8e6;
}

.slot-legend-busy {
    background: #f1f3f7;
    border: 1px solid #e2e6ee;
}
