/* ==========================================================================
   NotePlus UI — componente comune, folosite în toate paginile aplicației.
   Regula: un ecran nou se compune din aceste clase, nu din spațieri
   locale (mb-2, mr-1 etc.), ca alinierea să fie la fel peste tot.

   np-panel      card cu antet (iconiță + titlu + informație în dreapta)
   np-copy       câmp doar-citire + buton lipit (ex. linkul public)
   np-switch     comutator pe tot rândul, cu text și explicație
   np-actions    rând de butoane cu spațiere egală (--stack = unul sub altul)
   np-rows       listă de rânduri: text în stânga, acțiuni în dreapta
   np-more       <details> pentru opțiuni secundare
   np-field      etichetă + câmp, cu spațiere fixă
   ========================================================================== */

:root {
	--np-ink: #1f1c2f;
	--np-muted: #535f6b;
	--np-faint: #8a92a6;
	--np-line: #eef0f5;
	--np-soft: #f5f6fa;
	--np-accent: #1f8a5b;
	--np-accent-soft: #e8f6ef;
	--np-danger: #d9363e;
	--np-danger-soft: #fdecec;
	--np-radius: 12px;
	--np-gap: .75rem;
}

/* --- panel ---------------------------------------------------------------- */
.np-panel { background: #fff; border-radius: 14px; padding: 1.25rem; margin-bottom: 1rem; }
.np-panel > :last-child { margin-bottom: 0; }
.np-panel-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.np-panel-head > i { font-size: 20px; color: var(--np-ink); flex: 0 0 auto; }
.np-panel-head h6 { margin: 0; font-family: Jost, sans-serif; font-size: 1.05rem; color: var(--np-ink); flex: 1; min-width: 0; }
.np-panel-head .aside { font-size: .82rem; color: var(--np-faint); white-space: nowrap; }
.np-panel-desc { color: var(--np-muted); font-size: .88rem; line-height: 1.45; margin: 0 0 var(--np-gap); }
.np-panel-sub { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--np-faint); margin: 1.1rem 0 .5rem; }
.np-panel .btn { border-radius: 10px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font-weight: 500; }
.np-panel .btn-sm { min-height: 36px; }
.np-panel .form-control { border-radius: 10px; }

/* --- copy ----------------------------------------------------------------- */
.np-copy { display: flex; align-items: stretch; border: 1px solid #dfe3ec; border-radius: 10px; overflow: hidden; background: var(--np-soft); margin-bottom: var(--np-gap); }
.np-copy input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 .8rem; height: 42px; color: var(--np-muted); font-size: .9rem; text-overflow: ellipsis; outline: none; }
.np-copy button { flex: 0 0 auto; border: 0; background: var(--np-ink); color: #fff; padding: 0 1rem; font-weight: 500; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; transition: background .15s; }
.np-copy button:hover { background: #2d2944; }
.np-copy button.is-done { background: var(--np-accent); }

/* --- switch --------------------------------------------------------------- */
.np-switch { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem 0; margin: 0; cursor: pointer; }
.np-switch + .np-switch { border-top: 1px solid var(--np-line); }
.np-switch input { position: absolute; opacity: 0; pointer-events: none; }
.np-switch .track { flex: 0 0 40px; width: 40px; height: 24px; border-radius: 12px; background: #d3d7e1; position: relative; transition: background .15s; margin-top: 1px; }
.np-switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.np-switch input:checked + .track { background: var(--np-accent); }
.np-switch input:checked + .track::after { transform: translateX(16px); }
.np-switch input:focus-visible + .track { outline: 2px solid var(--np-accent); outline-offset: 2px; }
.np-switch input:disabled + .track { opacity: .45; }
.np-switch input:disabled ~ .txt { opacity: .55; }
.np-switch .txt { flex: 1; min-width: 0; color: var(--np-ink); line-height: 1.35; }
.np-switch .txt small { display: block; color: var(--np-faint); font-size: .8rem; margin-top: .15rem; }

/* --- actions -------------------------------------------------------------- */
.np-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--np-gap); }
.np-actions > * { margin: 0 !important; }
.np-actions > .btn, .np-actions > form > .btn { flex: 1 1 auto; }
.np-actions--stack { flex-direction: column; }
.np-actions--stack > .btn, .np-actions--stack > form, .np-actions--stack > form > .btn { width: 100%; }
.np-actions--end { justify-content: flex-end; }
.np-actions--end > .btn { flex: 0 0 auto; }

/* Buton de acțiune distructivă, discret: nu concurează cu acțiunea principală. */
.btn.np-btn-danger { background: transparent; border: 1px solid transparent; color: var(--np-danger); }
.btn.np-btn-danger:hover { background: var(--np-danger-soft); color: var(--np-danger); }
.btn.np-btn-ghost { background: var(--np-soft); border: 1px solid var(--np-soft); color: var(--np-ink); }
.btn.np-btn-ghost:hover { background: var(--np-accent-soft); color: var(--np-accent); }

/* --- rows ----------------------------------------------------------------- */
.np-rows { list-style: none; padding: 0; margin: 0 0 var(--np-gap); }
.np-rows > li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--np-line); min-height: 44px; }
.np-rows > li:last-child { border-bottom: 0; }
.np-rows .main { flex: 1; min-width: 0; }
.np-rows .main > * { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-rows .main > :first-child { color: var(--np-ink); }
.np-rows .main small { color: var(--np-faint); font-size: .8rem; }
.np-rows .side { flex: 0 0 auto; display: flex; align-items: center; gap: .35rem; }
.np-rows .side .form-control { height: 34px; padding: 0 .5rem; width: auto; }
.np-icon-btn { border: 0; background: transparent; color: #a0a7b8; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; padding: 0; }
.np-icon-btn:hover { background: var(--np-soft); color: var(--np-ink); }
.np-icon-btn.danger:hover { background: var(--np-danger-soft); color: var(--np-danger); }

/* --- more (details) ------------------------------------------------------- */
.np-more { margin-top: var(--np-gap); border-top: 1px solid var(--np-line); padding-top: .6rem; }
.np-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; color: var(--np-ink); font-weight: 500; font-size: .92rem; padding: .25rem 0; }
.np-more > summary::-webkit-details-marker { display: none; }
.np-more > summary::after { content: "\ea4e"; font-family: remixicon; font-size: 18px; color: var(--np-faint); transition: transform .15s; }
.np-more[open] > summary::after { transform: rotate(180deg); }
.np-more > summary:hover { color: var(--np-accent); }
.np-more > :not(summary) { margin-top: .6rem; }

/* --- field ---------------------------------------------------------------- */
.np-field { margin-bottom: var(--np-gap); }
.np-field > label:not([class]), .np-field > .lbl { display: block; font-size: .82rem; font-weight: 600; color: var(--np-muted); margin-bottom: .3rem; }
.np-field .form-control { height: 42px; }
.np-field textarea.form-control { height: auto; }
.np-field small { display: block; color: var(--np-faint); font-size: .8rem; margin-top: .3rem; }
.np-inline { display: flex; gap: .5rem; align-items: stretch; }
.np-inline > .form-control { flex: 1; min-width: 0; }
.np-inline > .btn { flex: 0 0 auto; }

/* Grilă de alegeri (culori, iconițe): mereu pe rând, cu spațiere egală. */
.np-picks { display: flex; flex-wrap: wrap; gap: .4rem; }
.np-picks > label { margin: 0 !important; }

/* Culorile butoanelor în panouri: accentul aplicației, nu verdele pal al temei. */
.np-panel .btn-success { background: var(--np-accent); border-color: var(--np-accent); color: #fff; }
.np-panel .btn-success:hover { background: #18734b; border-color: #18734b; color: #fff; }
.np-panel .btn-primary { background: var(--np-ink); border-color: var(--np-ink); }

/* Alegere de culoare / iconiță (radio ascuns, accesibil din tastatură). */
.np-swatch, .np-iconpick { position: relative; margin: 0; cursor: pointer; }
.np-swatch input, .np-iconpick input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.np-swatch span { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #e3e7ef; transition: box-shadow .12s; }
.np-swatch input:checked + span { box-shadow: 0 0 0 2px var(--np-ink); }
.np-swatch input:focus-visible + span, .np-iconpick input:focus-visible + span { outline: 2px solid var(--np-accent); outline-offset: 2px; }
.np-iconpick span { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid #e3e7ef; border-radius: 10px; font-size: 20px; }
.np-iconpick input:checked + span { background: var(--np-ink); color: #fff; border-color: var(--np-ink); }

/* Pastilă de număr (ex. „3 notițe”). */
.np-count { display: inline-flex; align-items: center; height: 22px; padding: 0 .55rem; border-radius: 11px; background: var(--np-soft); color: var(--np-muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }

/* Stare goală, folosită în orice listă fără elemente. */
.np-blank { text-align: center; padding: 2rem 1rem; color: var(--np-muted); }
.np-blank .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--np-accent-soft); color: var(--np-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: .8rem; }
.np-blank strong { display: block; color: var(--np-ink); font-family: Jost, sans-serif; font-size: 1.1rem; font-weight: 500; margin-bottom: .25rem; }

/* Panou de pericol (ștergere cont etc.). */
.np-panel--danger { border: 1px solid #f6d3d5; }
.np-panel--danger .np-panel-head > i, .np-panel--danger .np-panel-head h6 { color: var(--np-danger); }
.btn.np-btn-danger-solid { background: var(--np-danger); border-color: var(--np-danger); color: #fff; }
.btn.np-btn-danger-solid:hover { background: #b9272f; border-color: #b9272f; color: #fff; }

/* Grilă de carduri care se adaptează (caiete, șabloane). */
.np-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.np-grid > .np-panel { margin-bottom: 0; }

/* Bară de utilizare (stocare). --ok / --warn / --full după procent. */
.np-meter { height: 8px; border-radius: 4px; background: var(--np-line); overflow: hidden; }
.np-meter > span { display: block; height: 100%; border-radius: 4px; background: var(--np-accent); transition: width .3s; }
.np-meter.warn > span { background: #e8742e; }
.np-meter.full > span { background: var(--np-danger); }
.np-meter-row { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--np-muted); margin-bottom: .35rem; }
.np-meter-row strong { color: var(--np-ink); font-variant-numeric: tabular-nums; }

/* KPI-uri (admin, Acasă). */
.np-kpis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.np-kpi-box { background: #fff; border-radius: 14px; padding: 1rem 1.1rem; }
.np-kpi-box .l { color: var(--np-muted); font-size: .85rem; display: flex; align-items: center; gap: .4rem; }
.np-kpi-box .v { font-family: Jost, sans-serif; font-size: 1.8rem; color: var(--np-ink); line-height: 1.15; font-variant-numeric: tabular-nums; margin: .2rem 0; }
.np-kpi-box .s { color: var(--np-faint); font-size: .8rem; }
.np-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 .5rem; border-radius: 10px; font-size: .72rem; font-weight: 700; }
.np-badge.admin { background: #f1eafe; color: #6d3fd6; }
.np-badge.off { background: var(--np-danger-soft); color: var(--np-danger); }
.np-badge.custom { background: #e9f2fe; color: #2f6fc8; }
.np-alert { display: flex; gap: .75rem; align-items: flex-start; border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; background: #fff5ec; color: #7a3f0c; }
.np-alert.full { background: var(--np-danger-soft); color: #8a1f24; }
.np-alert i { font-size: 20px; line-height: 1.2; }
.np-alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.np-alert.info { background: #eef4ff; color: #1f3f7a; }
.np-alert .np-icon-btn { color: inherit; opacity: .7; margin: -.3rem -.4rem -.3rem 0; }
.np-alert .np-icon-btn:hover { opacity: 1; background: rgba(0,0,0,.05); }
