/* ============================================================
   Cizmăria Urbană – Custom Styles
   ============================================================ */

/* ── Ancore ──────────────────────────────────────────────────
   Bara de sus e fixă, deci un salt la #ancoră aduce titlul
   exact sub ea. Rezervăm înălțimea barei la orice element cu id,
   ca legăturile din cuprins să oprească sub antet, nu peste el. */

[id] {
    scroll-margin-top: 90px;
}

html {
    scroll-behavior: smooth;
}

/* ── Antete de tabel sortabile (th[data-sort], JS în layout.php) ─── */

th[data-sort] {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th[data-sort]::after {
    content: "\2195";           /* ↕ */
    margin-left: .35rem;
    opacity: .35;
    font-size: .8em;
}

th[data-sort]:hover::after {
    opacity: .7;
}

th.lv-sorted-asc::after  { content: "\2191"; opacity: 1; }   /* ↑ */
th.lv-sorted-desc::after { content: "\2193"; opacity: 1; }   /* ↓ */

/* ── Login ───────────────────────────────────────────────── */

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    border: none;
    border-radius: 1rem;
}

.login-logo {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
}

.btn-login {
    padding: .7rem;
    font-weight: 600;
    letter-spacing: .03em;
}

/* ── Dashboard layout ────────────────────────────────────── */

.dashboard-body {
    background-color: #f4f6fb;
}

.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #fff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 6px rgba(0, 0, 0, .04);
}

.sidebar-sticky {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}
.sidebar-sticky::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

/* ── Sidebar nav links ───────────────────────────────────── */

.sidebar .nav-link,
.offcanvas .nav-link {
    color: #4a5568;
    font-size: .875rem;
    padding: .55rem .9rem;
    border-radius: .5rem;
    margin: .1rem 0;
    transition: background .15s ease, color .15s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover,
.offcanvas .nav-link:hover {
    background-color: #ebf0ff;
    color: #0d6efd;
}

.sidebar .nav-link.active,
.offcanvas .nav-link.active {
    background-color: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.sidebar .nav-link.disabled,
.offcanvas .nav-link.disabled {
    color: #a0aec0;
    pointer-events: auto; /* keep hover cursor */
    cursor: default;
    opacity: 1;
}

.sidebar .nav-link .badge,
.offcanvas .nav-link .badge {
    font-size: .65rem;
    margin-left: auto;
}

/* ── Main content ────────────────────────────────────────── */

.main-content {
    min-height: calc(100vh - 56px);
    padding-bottom: 2rem;
}

/* ── Stat cards ──────────────────────────────────────────── */

.stat-card {
    border-radius: .875rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .1) !important;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Sidebar group (collapsible) ─────────────────────────── */

.sidebar-group-toggle {
    text-align: left;
    padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);
}

.sidebar-chevron {
    transition: transform .2s ease;
}

.sidebar-group-toggle:not(.collapsed) .sidebar-chevron {
    transform: rotate(-180deg);
}

/* ── Utility ─────────────────────────────────────────────── */

.text-2xs { font-size: 0.6em; }

/* form-switch cu label pe mai multe rânduri — centrare verticală a toggle-ului */
.form-switch-vcenter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0;
}
.form-switch-vcenter .form-check-input {
    float: none;
    margin-left: 0;
    margin-top: 0;
    flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 767.98px) {
    .main-content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ── Carduri „moi” (dashboard „Azi”, Atelierul acum) ──────────────────────── */
.card-soft { border: 1px solid #eef1f5; border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-soft > .card-header { background: transparent; border-bottom: 1px solid #f1f5f9;
       font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: #475569; padding: .9rem 1rem; }
.ad-head { padding:.8rem 1rem; font-weight:700; font-size:.95rem; border-bottom:1px solid #eef2f7;
           display:flex; align-items:center; }
.ad-person { display:inline-flex; align-items:center; gap:.4rem; background:#f0fdf4; border:1px solid #bbf7d0;
             color:#15803d; border-radius:99px; padding:.3rem .8rem; font-size:.88rem; font-weight:600; }
.ad-dot { width:7px; height:7px; border-radius:99px; background:#22c55e; flex-shrink:0; }
.ad-person-time { font-weight:400; color:#4d7c5f; font-size:.78rem; }
.ad-today-num { font-size:1.9rem; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.ad-today-label { font-size:.75rem; color:#64748b; margin-top:.2rem; }
.ad-pace { border-radius:10px; padding:.5rem .8rem; font-size:.85rem; font-weight:600; text-align:center; }
.ad-pace-ok  { background:#f0fdf4; color:#15803d; }
.ad-pace-mid { background:#fffbeb; color:#b45309; }
.ad-pace-low { background:#fef2f2; color:#b91c1c; }
.ad-person-off { background:#f8fafc; border-color:#e2e8f0; color:#64748b; }
.ad-person-off .ad-dot { background:#cbd5e1; }
