/*
 * sc-app.css — componentele comune: clopoțel + panou notificări, toast-uri
 * „gen WhatsApp”, setări (temă, notificări, instalare aplicație) și câmpul
 * de selectare cu căutare. Folosește variabilele de culoare ale paginilor
 * (--panel, --text, --accent ...), cu valori de rezervă.
 */
.sc-ui, .sc-ui *{ box-sizing: border-box; }
.sc-ui{
    --sc-panel: var(--panel, #161a23);
    --sc-panel-2: var(--panel-2, #1b1f2a);
    --sc-panel-3: var(--panel-3, #20242f);
    --sc-text: var(--text, #eef0f4);
    --sc-dim: var(--text-dim, #9aa1b0);
    --sc-accent: var(--accent, #5b8def);
    --sc-accent-soft: var(--accent-soft, rgba(91,141,239,.14));
    --sc-border: var(--border, rgba(255,255,255,.08));
    --sc-success: var(--success, #6fcf97);
    --sc-danger: var(--danger, #ef7b7b);
    --sc-shadow: 0 24px 60px -18px rgba(0,0,0,.45);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", "SF Pro Text", Roboto, Helvetica, Arial, sans-serif;
    color: var(--sc-text);
}
[data-theme="light"] .sc-ui{ --sc-shadow: 0 24px 60px -24px rgba(30,40,60,.28); }

/* ---------- Clopoțel ---------- */
.sc-bell{
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 999px; border: none; cursor: pointer;
    background: transparent; color: inherit; font-size: 17px; margin: 0 2px;
    transition: background .2s ease;
}
.sc-bell:hover{ background: rgba(255,255,255,.08); }
.sc-bell.sc-floating{
    position: fixed; right: 18px; bottom: 18px; z-index: 100030;
    width: 52px; height: 52px; font-size: 20px; color: #fff;
    background: var(--accent, #5b8def); box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
}
.sc-bell .sc-bell-badge{
    position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: #25d366; color: #fff; font-size: 10.5px; font-weight: 800;
    display: none; align-items: center; justify-content: center; line-height: 1;
    box-shadow: 0 0 0 2px var(--panel, #161a23);
}
.sc-bell.sc-has-unread .sc-bell-badge{ display: inline-flex; }
.sc-bell.sc-ring i{ animation: sc-ring .9s ease; transform-origin: 50% 0; }
@keyframes sc-ring{ 0%,100%{transform:rotate(0)} 15%{transform:rotate(16deg)} 30%{transform:rotate(-14deg)} 45%{transform:rotate(10deg)} 60%{transform:rotate(-6deg)} 75%{transform:rotate(3deg)} }

/* ---------- Panou ---------- */
/* z-index peste bara de navigare a paginilor (care e fixă și foarte sus). */
.sc-panel-backdrop{ position: fixed; inset: 0; z-index: 100040; display: none; }
.sc-panel-backdrop.sc-open{ display: block; }
.sc-npanel{
    position: fixed; top: 86px; right: max(16px, calc((100vw - 1256px) / 2));
    width: 400px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px);
    z-index: 100050; display: none; flex-direction: column; overflow: hidden;
    background: var(--sc-panel); border: 1px solid var(--sc-border); border-radius: 20px;
    box-shadow: var(--sc-shadow);
    animation: sc-pop .18s ease;
}
.sc-npanel.sc-open{ display: flex; }
.sc-bell-li{ display: flex; align-items: center; list-style: none; }
/* Telefon: panoul se deschide ca „foaie” de jos, ca în aplicațiile native. */
@media (max-width: 640px){
    .sc-npanel{ top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: none; max-height: 82vh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .sc-npanel-head::before{ content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--sc-border); }
    .sc-npanel-head{ position: relative; padding-top: 22px; }
    .sc-panel-backdrop.sc-open{ background: rgba(0,0,0,.35); }
    .sc-bell.sc-floating{ bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@keyframes sc-pop{ from{ opacity: 0; transform: translateY(-6px) scale(.98); } to{ opacity: 1; transform: none; } }
.sc-npanel-head{ display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.sc-npanel-head h3{ margin: 0; font-size: 17px; font-weight: 800; color: var(--sc-text); flex: 1; letter-spacing: -.01em; }
.sc-link-btn{ border: none; background: none; color: var(--sc-accent); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.sc-link-btn:hover{ background: var(--sc-accent-soft); }
.sc-tabs{ display: flex; gap: 6px; padding: 0 18px 10px; }
.sc-tab{ border: 1px solid var(--sc-border); background: transparent; color: var(--sc-dim); font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.sc-tab[aria-selected="true"]{ background: var(--sc-accent-soft); color: var(--sc-accent); border-color: transparent; }
.sc-npanel-body{ overflow-y: auto; flex: 1; padding: 0 8px 8px; overscroll-behavior: contain; }

.sc-nitem{
    display: flex; gap: 12px; padding: 11px 10px; border-radius: 14px; cursor: pointer;
    text-decoration: none !important; color: var(--sc-text) !important; position: relative;
}
.sc-nitem:hover{ background: var(--sc-panel-3); }
.sc-avatar{
    flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; color: #fff; letter-spacing: .02em;
}
.sc-nitem-main{ flex: 1; min-width: 0; }
.sc-nitem-top{ display: flex; align-items: baseline; gap: 8px; }
.sc-nitem-title{ flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-nitem-time{ flex: 0 0 auto; font-size: 11px; color: var(--sc-dim); }
.sc-nitem.sc-unread .sc-nitem-time{ color: #25d366; font-weight: 700; }
.sc-nitem-body{
    font-size: 12.8px; color: var(--sc-dim); margin-top: 2px; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-nitem-meta{ display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.sc-chip{ font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sc-panel-3); color: var(--sc-dim); }
.sc-unread-dot{ margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: #25d366; display: none; }
.sc-nitem.sc-unread .sc-unread-dot{ display: block; }
.sc-empty{ text-align: center; padding: 34px 20px; color: var(--sc-dim); font-size: 13px; }
.sc-empty i{ font-size: 28px; display: block; margin-bottom: 10px; opacity: .6; }

/* ---------- Setări ---------- */
.sc-settings{ padding: 6px 18px 16px; display: none; }
.sc-settings.sc-open{ display: block; }
.sc-set-row{ display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sc-border); }
.sc-set-row:last-child{ border-bottom: none; }
.sc-set-row .sc-set-text{ flex: 1; min-width: 0; }
.sc-set-row .sc-set-title{ font-size: 13.5px; font-weight: 700; }
.sc-set-row .sc-set-sub{ font-size: 12px; color: var(--sc-dim); margin-top: 2px; }
.sc-seg{ display: inline-flex; padding: 3px; gap: 3px; border-radius: 999px; background: var(--sc-panel-3); }
.sc-seg button{ border: none; background: transparent; color: var(--sc-dim); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.sc-seg button[aria-pressed="true"]{ background: var(--sc-panel); color: var(--sc-text); box-shadow: 0 2px 8px -2px rgba(0,0,0,.25); }
.sc-switch{ position: relative; width: 44px; height: 26px; flex: 0 0 44px; }
.sc-switch input{ opacity: 0; width: 0; height: 0; position: absolute; }
.sc-switch span{ position: absolute; inset: 0; border-radius: 999px; background: var(--sc-panel-3); border: 1px solid var(--sc-border); transition: background .2s; cursor: pointer; }
.sc-switch span::after{ content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sc-switch input:checked + span{ background: #25d366; border-color: transparent; }
.sc-switch input:checked + span::after{ transform: translateX(18px); }
.sc-switch input:disabled + span{ opacity: .5; cursor: not-allowed; }
.sc-btn{
    border: none; cursor: pointer; font-weight: 700; font-size: 12.5px; padding: 8px 14px; border-radius: 999px;
    background: var(--sc-accent); color: #fff; white-space: nowrap;
}
.sc-btn.sc-btn-ghost{ background: var(--sc-accent-soft); color: var(--sc-accent); }
.sc-hint{ font-size: 12px; color: var(--sc-dim); line-height: 1.45; background: var(--sc-panel-2); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }

/* ---------- Toast-uri ---------- */
.sc-toasts{
    position: fixed; top: 16px; right: 16px; z-index: 100060;
    display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 24px);
    pointer-events: none;
}
@media (max-width: 600px){ .sc-toasts{ left: 12px; right: 12px; top: 10px; width: auto; } }
.sc-toast{
    pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
    padding: 12px 14px; border-radius: 18px; background: var(--sc-panel); color: var(--sc-text);
    border: 1px solid var(--sc-border); box-shadow: var(--sc-shadow);
    animation: sc-toast-in .32s cubic-bezier(.2,.9,.3,1.2);
    transition: transform .25s ease, opacity .25s ease;
}
.sc-toast.sc-leaving{ opacity: 0; transform: translateX(30px); }
@keyframes sc-toast-in{ from{ opacity: 0; transform: translateY(-14px) scale(.96); } to{ opacity: 1; transform: none; } }
.sc-toast .sc-toast-main{ flex: 1; min-width: 0; }
.sc-toast .sc-toast-app{ font-size: 11px; color: var(--sc-dim); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sc-toast .sc-toast-app img{ width: 14px; height: 14px; border-radius: 4px; }
.sc-toast .sc-toast-title{ font-size: 14px; font-weight: 800; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-toast .sc-toast-body{ font-size: 13px; color: var(--sc-dim); margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-toast .sc-toast-close{ border: none; background: none; color: var(--sc-dim); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px; }

/* ---------- Banner (activare notificări / instalare) ---------- */
.sc-banner{
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 100035;
    width: 560px; max-width: calc(100vw - 24px); display: flex; gap: 12px; align-items: center;
    padding: 14px 16px; border-radius: 18px; background: var(--sc-panel); border: 1px solid var(--sc-border);
    box-shadow: var(--sc-shadow); animation: sc-toast-in .3s ease;
}
.sc-banner img{ width: 40px; height: 40px; border-radius: 10px; }
.sc-banner .sc-banner-text{ flex: 1; font-size: 13px; color: var(--sc-dim); }
.sc-banner .sc-banner-text b{ display: block; color: var(--sc-text); font-size: 14px; margin-bottom: 1px; }

/* ---------- Buton „Instalează aplicația” + ghid ---------- */
.sc-install-btn{
    display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; white-space: nowrap;
    font: 700 12.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 9px 14px; border-radius: 999px; color: #fff;
    background: linear-gradient(135deg, #5b8def, #1f56c9); box-shadow: 0 8px 20px -10px rgba(47,111,237,.9);
    transition: transform .15s ease, filter .15s ease;
}
.sc-install-btn:hover{ filter: brightness(1.08); transform: translateY(-1px); }
/* În bară: doar iconița (logo-ul e centrat și nu e loc de text); tooltip la hover. */
.sc-install-nav{ margin: 0 4px; width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 14px; animation: sc-install-pulse 2.4s ease-in-out 3; }
.sc-install-nav span{ display: none; }
@keyframes sc-install-pulse{ 0%,100%{ box-shadow: 0 0 0 0 rgba(91,141,239,.55); } 50%{ box-shadow: 0 0 0 7px rgba(91,141,239,0); } }
.sc-install-floating{ position: fixed; left: 18px; bottom: 18px; z-index: 100030; padding: 12px 18px; font-size: 13.5px; }
@media (max-width: 640px){ .sc-install-floating{ left: 12px; bottom: 12px; } }
.sc-modal-backdrop{ position: fixed; inset: 0; z-index: 100070; background: rgba(5,8,14,.55); display: grid; place-items: center; padding: 16px; }
.sc-modal{ width: 460px; max-width: 100%; background: var(--sc-panel); color: var(--sc-text); border: 1px solid var(--sc-border); border-radius: 22px; padding: 22px; box-shadow: var(--sc-shadow); animation: sc-pop .18s ease; }
.sc-modal-head{ display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sc-modal-head img{ width: 44px; height: 44px; border-radius: 12px; }
.sc-modal-head div{ flex: 1; }
.sc-modal-head b{ display: block; font-size: 16px; }
.sc-modal-head span{ font-size: 12.5px; color: var(--sc-dim); }
.sc-steps{ list-style: none; counter-reset: s; margin: 0 0 18px; padding: 0; }
.sc-steps li{ counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; margin-bottom: 12px; color: var(--sc-dim); }
.sc-steps li b{ color: var(--sc-text); }
.sc-steps li::before{ content: counter(s); flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--sc-accent-soft); color: var(--sc-accent); }
.sc-modal-ok{ width: 100%; padding: 12px; font-size: 14px; }

/* ---------- Selector cu căutare ---------- */
.sc-combo{ position: relative; width: 100%; }
.sc-combo-field{ position: relative; }
.sc-combo .sc-combo-input{ /* dublă clasă: bate stilurile generice „.field input” ale paginilor */
    width: 100%; padding: 10px 38px 10px 38px; border-radius: 12px; font-size: 14px;
    background: var(--panel-2, #1b1f2a); color: var(--text, #eef0f4); border: 1px solid var(--border-strong, rgba(255,255,255,.16));
    outline: none;
}
.sc-combo .sc-combo-input:focus{ border-color: var(--accent, #5b8def); box-shadow: 0 0 0 3px var(--accent-soft, rgba(91,141,239,.14)); }
.sc-combo-icon{ position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-dim, #9aa1b0); pointer-events: none; font-size: 13px; }
.sc-combo-toggle{ position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--text-dim, #9aa1b0); cursor: pointer; padding: 6px 8px; }
.sc-combo-list{
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; max-height: 280px; overflow-y: auto;
    margin: 0; padding: 6px; list-style: none; display: none;
    background: var(--panel, #161a23); border: 1px solid var(--border, rgba(255,255,255,.08)); border-radius: 14px;
    box-shadow: 0 18px 40px -16px rgba(0,0,0,.5);
}
.sc-combo.sc-open .sc-combo-list{ display: block; }
.sc-combo-opt{ display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text, #eef0f4); font-size: 13.5px; }
.sc-combo-opt[aria-selected="true"], .sc-combo-opt:hover{ background: var(--accent-soft, rgba(91,141,239,.14)); }
.sc-combo-opt.sc-chosen::after{ content: "\2713"; margin-left: auto; color: var(--accent, #5b8def); font-weight: 800; }
.sc-combo-opt mark{ background: transparent; color: var(--accent, #5b8def); font-weight: 800; padding: 0; }
.sc-combo-opt .sc-avatar{ flex: 0 0 28px; width: 28px; height: 28px; font-size: 11px; }
.sc-combo-sub{ font-size: 11.5px; color: var(--text-dim, #9aa1b0); }
.sc-combo-empty{ padding: 12px; color: var(--text-dim, #9aa1b0); font-size: 13px; text-align: center; }
.sc-combo-count{ font-size: 11.5px; color: var(--text-dim, #9aa1b0); margin-top: 6px; }

/* ---------- Bara de navigare pe telefon (meniul ☰) ----------
   BUG REPARAT: bara avea înălțime fixă (80px), iar meniul deschis „curgea”
   în afara ei, fără fundal, peste conținutul paginii — iconițe fără text,
   greu de citit și de nimerit. Acum bara crește odată cu meniul, meniul are
   fundal, fiecare rând are etichetă și e destul de mare pentru deget.
   Doar sub 768px (unde Bootstrap strânge meniul) — desktopul rămâne la fel. */
.sc-nav-label{ display: none; }
@media (max-width: 767.98px){
    .navbar{ height: auto !important; min-height: 80px; align-items: flex-start !important; }
    html body .navbar{ width: calc(100% - 20px) !important; top: 10px !important; } /* paginile o fac îngustă (100% - 64px) */
    .navbar > .container, .navbar > .container-fluid{ flex-wrap: wrap; min-height: 80px; align-items: center; }
    .navbar .navbar-brand{ top: 40px !important; } /* centrat pe primul rând, nu pe toată bara deschisă */
    .navbar-brand img{ height: auto !important; max-height: 25px; max-width: 52vw; }
    html .navbar .navbar-collapse{
        flex-basis: 100%; margin: 0 0 10px; padding: 0;
        background: transparent !important; border: none; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0;
        max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain;
    }
    html .navbar .navbar-collapse .navbar-nav{ width: 100%; margin: 0 !important; padding: 6px 0 0 !important; background: transparent !important; }
    .navbar .navbar-collapse .nav-item{ width: 100%; }
    .navbar .navbar-collapse .nav-link{
        display: flex !important; align-items: center; gap: 14px; width: 100%;
        padding: 12px 14px !important; margin: 0 !important; border-radius: 12px;
        font-size: 15px; color: #eef0f4 !important;
    }
    .navbar .navbar-collapse .nav-link::after{ display: none !important; } /* sublinierea animată de pe desktop */
    .navbar .navbar-collapse .nav-link:hover, .navbar .navbar-collapse .nav-link:focus,
    .navbar .navbar-collapse .dropdown.show > .nav-link{ background: rgba(255,255,255,.07); }
    .navbar .navbar-collapse .nav-link > i, .navbar .navbar-collapse .nav-link > b{ width: 22px; text-align: center; font-size: 17px; }
    .navbar .navbar-collapse .nav-link img{ width: 26px; height: 26px; margin: 0 !important; }
    .sc-nav-label{ display: inline; font-weight: 600; letter-spacing: -.005em; }
    .navbar .sc-back-nav-btn{ position: static !important; transform: none !important; left: auto !important; }
    .navbar .navbar-collapse .navbar-notif-badge{ position: static !important; margin-left: auto; }
    /* submeniurile se deschid în listă, sub rândul lor (nu plutesc peste pagină) */
    html:root .navbar .navbar-collapse .dropdown-menu{ /* html:root = mai specific decât regulile vechi pentru tema luminoasă */
        position: static !important; transform: none !important; inset: auto !important; float: none;
        margin: 0 0 6px 36px !important; padding: 0 0 0 6px !important; min-width: 0;
        background: transparent !important; border: none !important; border-left: 2px solid rgba(91,141,239,.5) !important;
        border-radius: 0 !important; box-shadow: none !important;
    }
    html:root .navbar .navbar-collapse .dropdown-menu .dropdown-item{
        color: #c9cedb !important; background: transparent !important;
        padding: 10px 12px !important; border-radius: 10px; font-size: 14px; white-space: normal;
    }
    html:root .navbar .navbar-collapse .dropdown-menu .dropdown-item::before{ display: none !important; }
    html:root .navbar .navbar-collapse .dropdown-menu .dropdown-item:hover{ background: rgba(255,255,255,.07) !important; color: #fff !important; }

    /* Pagini mai late decât telefonul: împingeau tot (inclusiv bara) spre stânga. */
    .profile-grid{ grid-template-columns: minmax(0, 1fr) !important; }           /* user/profile-info.php */
    .info-value{ min-width: 0; overflow-wrap: anywhere; }                        /* emailuri lungi în profil */
    .chart-block, .chart-block.wide{ min-width: 0 !important; }                  /* user/stats.php */
    .dataTables_wrapper{ max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } /* tabelele de inventar */
}

/* ---------- Mementouri (tab în panoul clopoțelului) ---------- */
.sc-rem{ padding: 12px 14px 16px; }
.sc-rem-form{ display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--sc-border); }
.sc-rem-form textarea, .sc-rem-form input, .sc-rem-form select{
    width: 100%; border: 1px solid var(--sc-border); border-radius: 12px; background: var(--sc-panel-2); color: var(--sc-text);
    padding: 9px 11px; font: inherit; font-size: 13px; min-width: 0;
}
.sc-rem-form textarea{ resize: vertical; min-height: 56px; }
.sc-rem-form textarea:focus, .sc-rem-form input:focus, .sc-rem-form select:focus{ outline: none; border-color: var(--sc-accent); }
.sc-rem-row{ display: flex; gap: 8px; }
.sc-rem-row > *{ flex: 1; }
.sc-rem-chips{ display: flex; gap: 6px; flex-wrap: wrap; }
.sc-rem-chips button{ border: 1px solid var(--sc-border); background: var(--sc-panel-2); color: var(--sc-text); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.sc-rem-chips button:hover{ border-color: var(--sc-accent); color: var(--sc-accent); }
.sc-rem-check{ display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--sc-dim); cursor: pointer; }
.sc-rem-check input{ width: auto; accent-color: var(--sc-accent); }
.sc-rem-list{ padding-top: 6px; }
.sc-rem-item{ display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--sc-border); font-size: 13px; }
.sc-rem-item:last-child{ border-bottom: none; }
.sc-rem-item > i{ color: var(--sc-accent); }
.sc-rem-main{ flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sc-rem-main a{ color: inherit; text-decoration: underline; }
.sc-rem-sub{ font-size: 11.5px; color: var(--sc-dim); margin-top: 2px; }
.sc-rem-item button{ border: none; background: transparent; color: var(--sc-dim); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; flex: 0 0 28px; }
.sc-rem-item button:hover{ background: var(--sc-accent-soft); color: var(--sc-accent); }

/* ---------- Butoanele paginilor noi (.btn fără clase btn-* de Bootstrap) ----------
   Bootstrap își aplică propriile culori la hover / click pe orice .btn (fundal transparent sau text
   închis) — pe tema întunecată butonul „dispărea” când treceai cu mouse-ul peste el. */
.btn:not([class*="btn-"]):hover, .btn:not([class*="btn-"]):focus-visible, .btn:not([class*="btn-"]):active{
    background-color: var(--accent, #5b8def) !important; color: #fff !important; border-color: transparent !important; filter: brightness(1.08);
}
.btn.plain:not([class*="btn-"]):hover, .btn.plain:not([class*="btn-"]):focus-visible, .btn.plain:not([class*="btn-"]):active{
    background-color: var(--panel-2, #1b1f2a) !important; color: var(--text, #eef0f4) !important; border-color: var(--accent, #5b8def) !important; filter: none;
}
.btn.ok:not([class*="btn-"]):hover, .btn.ok:not([class*="btn-"]):active{ background-color: var(--success, #6fcf97) !important; }
.btn.bad:not([class*="btn-"]):hover, .btn.bad:not([class*="btn-"]):active,
.btn.danger:not([class*="btn-"]):hover, .btn.danger:not([class*="btn-"]):active{ background-color: var(--danger, #ef7b7b) !important; color: #fff !important; }
.btn:not([class*="btn-"])[disabled]:hover{ filter: none; }

/* ---------- Indicator de încărcare între pagini ---------- */
.sc-page-loader{ position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; visibility: hidden; transition: background-color .25s; }
.sc-page-loader.sc-active{ visibility: visible; }
.sc-page-loader-bar{
    position: absolute; top: 0; left: 0; height: 3px; width: 0; border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, var(--sc-accent), #9ec0ff); box-shadow: 0 0 12px var(--sc-accent);
}
.sc-page-loader.sc-active .sc-page-loader-bar{ animation: sc-loader-bar 8s cubic-bezier(.08, .8, .2, 1) forwards; }
@keyframes sc-loader-bar{ 0%{ width: 0; } 12%{ width: 45%; } 40%{ width: 72%; } 100%{ width: 92%; } }
.sc-page-loader-mark{
    position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
    border-radius: 18px; opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s;
}
.sc-page-loader-mark img{ width: 100%; height: 100%; border-radius: inherit; display: block; }
.sc-page-loader-mark::after{
    content: ""; position: absolute; inset: -14px; border-radius: 50%;
    border: 3px solid var(--sc-accent-soft); border-top-color: var(--sc-accent); animation: sc-loader-spin .8s linear infinite;
}
.sc-page-loader.sc-slow{ background-color: rgba(13,16,23,.45); }
[data-theme="light"] .sc-page-loader.sc-slow{ background-color: rgba(244,246,251,.55); }
.sc-page-loader.sc-slow .sc-page-loader-mark{ opacity: 1; transform: none; }
@keyframes sc-loader-spin{ to{ transform: rotate(360deg); } }
@media print{ .sc-page-loader{ display: none; } }

/* ---------- Emoticoane (textarea[data-sc-emoji]) ---------- */
.sc-emoji-wrap{ position: relative; flex: 1; min-width: 0; }
.sc-emoji-wrap > textarea{ width: 100%; padding-right: 46px !important; display: block; }
.sc-emoji-btn{
    position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 999px;
    border: none; background: var(--sc-panel-3); font-size: 17px; line-height: 1; cursor: pointer;
    display: grid; place-items: center; opacity: .85; transition: transform .15s, opacity .15s;
}
.sc-emoji-btn:hover{ opacity: 1; transform: scale(1.08); }
.sc-emoji-pop{
    position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 1060; width: 320px; max-width: calc(100vw - 32px);
    background: var(--sc-panel); border: 1px solid rgba(127,140,170,.35); border-radius: 18px;
    box-shadow: var(--sc-shadow), 0 0 0 4px var(--sc-accent-soft); padding: 8px; animation: sc-pop-in .16s ease;
}
@keyframes sc-pop-in{ from{ opacity: 0; transform: translateY(6px); } to{ opacity: 1; transform: none; } }
.sc-emoji-tabs{ display: flex; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--sc-border); }
.sc-emoji-tabs button{ flex: 1; border: none; background: transparent; border-radius: 10px; padding: 6px 0; font-size: 18px; cursor: pointer; opacity: .55; }
.sc-emoji-tabs button.sc-on{ background: var(--sc-accent-soft); opacity: 1; }
.sc-emoji-title{ font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--sc-dim); margin: 8px 4px 4px; }
.sc-emoji-grid{ display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 210px; overflow-y: auto; }
.sc-emoji-grid button{ border: none; background: transparent; border-radius: 8px; font-size: 21px; line-height: 1; padding: 6px 0; cursor: pointer; }
.sc-emoji-grid button:hover{ background: var(--sc-panel-2); }
@media (max-width: 480px){ .sc-emoji-pop{ position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; max-width: none; } }

@media (prefers-reduced-motion: reduce){
    .sc-npanel, .sc-toast, .sc-banner, .sc-bell.sc-ring i{ animation: none !important; }
    .sc-page-loader.sc-active .sc-page-loader-bar{ animation: none; width: 70%; }
    .sc-page-loader-mark::after{ animation-duration: 2.4s; }
}

/* ---------- tichete noi necitite (admini) ---------- */
.sc-tk-badge{ position:absolute; top:0; right:-6px; background:#f3c265; color:#1b1e27; font-size:10px; font-weight:800; border-radius:999px; min-width:18px; height:17px; display:inline-flex; align-items:center; justify-content:center; padding:0 5px; line-height:1; box-shadow:0 0 0 2px #161a23; pointer-events:none; }
.sc-tk-chip{ margin-left:8px; background:#f3c265; color:#1b1e27; font-size:10.5px; font-weight:800; border-radius:999px; padding:1px 7px; vertical-align:middle; }
.sc-new-star{ display:inline-block; margin-left:6px; background:rgba(243,194,101,.18); color:#b9791a; border:1px solid rgba(243,194,101,.6); font-size:10.5px; font-weight:800; border-radius:999px; padding:0 6px; line-height:16px; vertical-align:middle; white-space:nowrap; }
html[data-theme="dark"] .sc-new-star{ color:#f3c265; }
.sc-dot{ position:absolute; top:6px; right:4px; width:9px; height:9px; border-radius:50%; background:#f3c265; box-shadow:0 0 0 2px #161a23; pointer-events:none; }
@media (max-width:767px){ .sc-tk-badge{ position:static; margin-left:8px; } .sc-dot{ position:static; display:inline-block; margin-left:8px; } }

/* ---------- Regulamentul IT de confirmat ---------- */
html.sc-gated, html.sc-gated body{ overflow:hidden !important; }
.sc-rules-gate{ position:fixed; inset:0; z-index:100200; background:rgba(5,8,14,.72); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; padding:20px; }
.sc-rules-card{ width:520px; max-width:100%; background:#fff; color:#1b1e27; border-radius:24px; padding:28px; text-align:center; box-shadow:0 30px 60px -20px rgba(0,0,0,.6); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; }
html[data-theme="dark"] .sc-rules-card{ background:#161a23; color:#eef0f4; border:1px solid rgba(255,255,255,.1); }
.sc-rules-ic{ width:62px; height:62px; border-radius:20px; margin:0 auto 14px; display:grid; place-items:center; font-size:28px; background:rgba(91,141,239,.14); color:#5b8def; }
.sc-rules-card h3{ margin:0 0 8px; font-size:21px; font-weight:800; color:inherit; }
.sc-rules-card p{ margin:0 0 14px; font-size:14.5px; line-height:1.55; color:inherit; opacity:.85; }
.sc-rules-note{ text-align:left; background:rgba(243,194,101,.14); border-radius:14px; padding:10px 14px; font-size:13.5px; line-height:1.5; margin-bottom:16px; }
.sc-rules-go{ display:inline-flex; gap:8px; align-items:center; background:#2f6fed; color:#fff !important; font-weight:800; font-size:15px; padding:13px 26px; border-radius:999px; text-decoration:none !important; }
.sc-rules-go:hover{ filter:brightness(1.08); }
.sc-rules-small{ margin-top:16px; font-size:12.5px; opacity:.7; }
.sc-rules-small a{ color:inherit; text-decoration:underline; }
.sc-rules-strip{ position:fixed; left:50%; bottom:18px; transform:translateX(-50%); z-index:100050; background:#f3c265; color:#1b1e27; border-radius:999px; padding:10px 18px; font-size:13.5px; font-weight:600; box-shadow:0 14px 30px -12px rgba(0,0,0,.5); display:flex; gap:8px; align-items:center; max-width:calc(100% - 24px); }
.sc-rules-strip a{ color:#1b1e27; font-weight:800; text-decoration:underline; white-space:nowrap; }

/* ---------- Schimbă firma ---------- */
.sc-firm{ position:relative; display:flex; align-items:center; height:100%; }
.sc-firm-btn{ display:inline-flex; align-items:center; gap:7px; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06); color:#eef0f4; border-radius:999px; padding:6px 12px; font:600 12.5px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; cursor:pointer; white-space:nowrap; margin:0 6px; }
.sc-firm-btn:hover{ background:rgba(91,141,239,.18); border-color:#5b8def; }
.sc-firm-menu{ position:absolute; top:calc(100% + 8px); right:0; z-index:100060; min-width:220px; background:#161a23; border:1px solid rgba(255,255,255,.12); border-radius:14px; padding:6px; box-shadow:0 20px 40px -14px rgba(0,0,0,.6); }
.sc-firm-menu[hidden]{ display:none; }
.sc-firm-h{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:#9aa1b0; padding:6px 10px; }
.sc-firm-menu button{ display:flex; width:100%; gap:10px; align-items:center; border:none; background:transparent; color:#eef0f4; padding:9px 10px; border-radius:10px; font:600 13.5px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; cursor:pointer; text-align:left; }
.sc-firm-menu button:hover{ background:rgba(91,141,239,.16); }
.sc-firm-menu button.sc-on{ color:#6fcf97; cursor:default; background:transparent; }
.sc-firm-menu{ left:0; right:auto; }
/* pe desktop: în stânga barei, imediat după săgeata „Înapoi” (care e la 15 mm de margine) */
@media (min-width:768px){
  .navbar .sc-firm-li{ position:absolute; left:calc(15mm + 44px); top:50%; transform:translateY(-50%); z-index:5; }
  .navbar .sc-firm-li.sc-firm-noback{ left:15mm; }
}
@media (min-width:768px) and (max-width:1100px){ .sc-firm-btn span{ display:none; } }
@media (max-width:767px){ .sc-firm{ padding:6px 0; } .sc-firm-menu{ position:static; margin-top:6px; } }

/* ---------- Mesaje în colțul ecranului ---------- */
.sc-msg-fab{ position:fixed; left:20px; bottom:20px; z-index:100039; width:52px; height:52px; border-radius:50%; border:none; cursor:pointer; background:linear-gradient(135deg,#2fb383,#1f9d5c); color:#fff; font-size:20px; display:grid; place-items:center; box-shadow:0 14px 30px -10px rgba(31,157,92,.7); }
.sc-msg-fab.sc-stack{ bottom:86px; }
.sc-msg-fab:hover{ transform:scale(1.06); }
.sc-msg-n{ position:absolute; top:-3px; right:-3px; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:#ef7b7b; color:#fff; font-size:11px; font-weight:800; line-height:20px; text-align:center; }
.sc-msg-win{ position:fixed; left:20px; bottom:86px; z-index:100042; width:760px; max-width:calc(100vw - 40px); height:min(640px, calc(100vh - 120px)); background:#161a23; border:1px solid rgba(127,140,170,.3); border-radius:22px; box-shadow:0 30px 70px -20px rgba(0,0,0,.6); display:none; flex-direction:column; overflow:hidden; }
.sc-msg-win.sc-stack{ bottom:152px; height:min(600px, calc(100vh - 180px)); }
.sc-msg-win.sc-on{ display:flex; }
.sc-msg-head{ display:flex; align-items:center; gap:8px; padding:10px 12px 10px 16px; border-bottom:1px solid rgba(255,255,255,.08); color:#eef0f4; }
.sc-msg-head b{ flex:1; font-size:14.5px; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; }
.sc-msg-head a, .sc-msg-head button{ border:none; background:transparent; color:#9aa1b0; width:32px; height:32px; border-radius:10px; display:grid; place-items:center; cursor:pointer; }
.sc-msg-head a:hover, .sc-msg-head button:hover{ background:rgba(91,141,239,.16); color:#5b8def; }
.sc-msg-win iframe{ flex:1; width:100%; border:none; background:transparent; }
@media (max-width:520px){ .sc-msg-win{ left:8px; right:8px; width:auto; max-width:none; bottom:84px; height:calc(100vh - 110px); } .sc-msg-win.sc-stack{ left:8px; right:8px; width:auto; max-width:none; bottom:150px; height:calc(100vh - 170px); } }

/* pagina de mesaje deschisă în fereastra din colț */
html.sc-embed .navbar, html.sc-embed .theme-toggle-row, html.sc-embed .dash-topbar, html.sc-embed .sc-ui:not(.sc-emoji-pop):not(.sc-emoji-btn){ display:none !important; }
html.sc-embed, html.sc-embed body{ background-image:none !important; overflow:hidden; }
html.sc-embed body{ padding-top:0 !important; margin-top:0 !important; }
html.sc-embed .dash{ padding:0 !important; max-width:none !important; }
/* bara de sus nu-și închide <header> — tot conținutul paginii e înăuntru, deci ascundem doar .navbar */
html.sc-embed .header-area{ height:auto !important; min-height:0 !important; padding:0 !important; margin:0 !important; }
html.sc-embed .messenger{ height:100vh !important; min-height:0 !important; border:none !important; border-radius:0 !important; box-shadow:none !important; }

/* ---------- Anunțuri ---------- */
.sc-ann-body{ text-align:left; font-size:14.5px; line-height:1.6; white-space:pre-line; margin:0 0 12px; max-height:45vh; overflow-y:auto; padding:12px 14px; border-radius:14px; background:rgba(91,141,239,.08); }
.sc-ann-body a{ color:#5b8def; text-decoration:underline; }
.sc-rules-go[disabled]{ opacity:.7; cursor:wait; }
