/* ================================
   AUTH ONLY (login/register)
   ================================ */

body.is-auth {
  margin: 0;
  min-height: 100vh;
}

/* pagina full screen */
body.is-auth .auth-page{
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* overlay subtil animat peste fundal */
body.is-auth .auth-bg{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
}

body.is-auth .auth-bg::before{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255,255,255,0.08) 0px,
      rgba(255,255,255,0.08) 22px,
      transparent 44px,
      transparent 90px
    );
  opacity:.35;
  animation: forestLight 18s linear infinite;
}

@keyframes forestLight{
  0%   { transform: translate(-6%, -2%); }
  50%  { transform: translate(6%, 2%); }
  100% { transform: translate(-6%, -2%); }
}

/* CENTRARE GARANTATA */
body.is-auth .auth-shell{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 16px;
  position: relative;
  z-index: 2;
}

/* CARD GLASS */
body.is-auth .auth-card{
  width: 100%;
  max-width: 560px;
  border-radius: 26px;
  padding: 26px 26px 20px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 40px 120px rgba(0,0,0,0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* brand */
body.is-auth .auth-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-bottom: 14px;
  text-align:left;
}

body.is-auth .auth-logo{
  width: 200px;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25));
}

body.is-auth .auth-brand-name{
  font-weight: 900;
  font-size: 16px;
  color: #082015;
  line-height: 1.15;
}

body.is-auth .auth-brand-sub{
  font-size: 12.5px;
  color: rgba(17,24,39,0.65);
}

body.is-auth .auth-title{
  text-align:center;
  font-size: 28px;
  font-weight: 950;
  margin: 8px 0 4px;
  color: #071a12;
}

body.is-auth .auth-subtitle{
  text-align:center;
  font-size: 13.5px;
  margin: 0 0 16px;
  color: rgba(17,24,39,0.65);
}

/* fields */
body.is-auth .form-row{ margin-bottom: 12px; }

body.is-auth .label{
  display:block;
  font-size: 12.5px;
  font-weight: 900;
  margin-bottom: 6px;
  color: #0b1f16;
}

body.is-auth .input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.16);
  background: rgba(255,255,255,0.90);
  font-size: 14px;
}

body.is-auth .input:focus{
  outline: none;
  border-color: rgba(16,185,129,0.55);
  box-shadow: 0 0 0 5px rgba(16,185,129,0.16);
}

/* buttons */
body.is-auth .actions-vertical{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 14px;
}

body.is-auth .auth-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 13px 14px;
  border-radius: 14px;
  font-weight: bold;
  text-decoration:none;
  border: 0;
  cursor:pointer;
}

body.is-auth .auth-btn-primary{
  background: linear-gradient(180deg, #1f7a46, #16663a);
  color: #fff;
  box-shadow: 0 14px 30px rgba(6,78,59,0.24);
}

body.is-auth .auth-btn-secondary{
  background: #CCD9CC;
  color: black;

}

/* hint */
body.is-auth .hint{
  margin-top: 14px;
  text-align:center;
  font-size: 13px;
  color: rgba(17,24,39,0.65);
}

/* alerts (auth only) */
body.is-auth .auth-alert{
  border-radius: 14px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  font-size: 13px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.76);
}

body.is-auth .auth-alert-error{
  border-color: rgba(220,38,38,.25);
  background: rgba(254,242,242,.92);
  color: #7f1d1d;
}

body.is-auth .auth-alert-success{
  border-color: rgba(22,163,74,.22);
  background: rgba(240,253,244,.92);
  color: #14532d;
}

body.is-auth .auth-alert-info{
  border-color: rgba(2,132,199,.22);
  background: rgba(239,246,255,.92);
  color: #0c4a6e;
}








/* ================================
   DASHBOARD – Sage Green Business UI (FULL HEIGHT CARD)
   Cerinta: card pe toata inaltimea ecranului cu 20px margin sus/jos
   ================================ */

.dash-page{
  min-height: 100vh;
  position: relative;
  overflow: hidden;

  /* Sage Green vibe */
  background:
    radial-gradient(900px 600px at 12% 0%, rgba(134, 170, 150, 0.35), transparent 60%),
    radial-gradient(800px 600px at 88% 8%, rgba(170, 199, 178, 0.28), transparent 60%),
    linear-gradient(180deg, #eaf2ed 0%, #e1ece6 55%, #dbe8e1 100%);
}

.dash-bg{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
}

.dash-bg::before{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(34, 78, 52, 0.10) 0px,
      rgba(34, 78, 52, 0.10) 18px,
      transparent 42px,
      transparent 92px
    );
  opacity:.22;
  animation: dashLight 22s linear infinite;
}

@keyframes dashLight{
  0%   { transform: translate(-6%, -2%); }
  50%  { transform: translate(6%, 2%); }
  100% { transform: translate(-6%, -2%); }
}

/* IMPORTANT: shell ocupa tot ecranul si lasa 20px margin sus/jos */
.dash-shell{
  min-height: 100vh;
  min-height: 100dvh; /* mobile safe */

  display:flex;
  align-items: stretch;         /* ✅ nu mai centram pe verticala */
  justify-content:center;

  padding: 20px 16px;           /* ✅ margin vizual sus/jos 20px */
  position:relative;
  z-index:2;
}

/* CARD = full height cu 20px sus/jos (deci -40px total) */
.dash-card{
  width:100%;
  max-width: 980px;

  /* ✅ inaltime fixa pe viewport */
  height: calc(100vh - 40px);

  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;

  padding: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 100px rgba(2,6,23,.12);

  /* ✅ card devine layout pe coloana */
  display:flex;
  flex-direction: column;

  /* ✅ daca ai continut mare, se va scrola in interior */
  overflow: hidden;
}

/* header */
.dash-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 14px;
  flex-wrap:wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  margin-bottom: 12px;

  flex: 0 0 auto; /* ✅ head ramane sus */
}

.dash-title{
  margin:0;
  font-size: 22px;
  font-weight: 950;
  color:#0c1f15;
  letter-spacing: -0.02em;
}

.dash-subtitle{
  margin: 6px 0 0 0;
  font-size: 13.5px;
  color: rgba(17,24,39,.62);
}

.dash-head-right{
  display:flex;
  align-items:flex-start;
  gap: 12px;
  flex-wrap:wrap;
}

.dash-user{
  text-align:right;
  line-height:1.1;
}

.dash-user-name{
  font-weight: 950;
  font-size: 13.5px;
  color:#0c1f15;
}

.dash-user-meta{
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(17,24,39,.60);
}

.dash-badge{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.dash-badge-admin{ color:#8a2c0a; }
.dash-badge-manager{ color:#1d4ed8; }
.dash-badge-user{ color:#16663a; }

/* alerts */
.dash-alert{
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin: 10px 0;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.75);

  flex: 0 0 auto; /* ✅ nu intra in scroll area */
}

.dash-alert-success{ border-color: rgba(16,185,129,.22); }
.dash-alert-error{ border-color: rgba(239,68,68,.22); }
.dash-alert-info{ border-color: rgba(59,130,246,.20); }

/* ✅ CONTINUTUL PRINCIPAL din card (dashboard tiles / cazuri) trebuie sa poata scrola
   Cum nu ai wrapper in HTML, facem regula “generic”: tot ce vine dupa header+alerte scroleaza.
   Practic: primul element “mare” ramas (grid sau zona cazuri) va primi overflow. */

/* Face scroll pe continutul ramas, dar pastreaza head + alerte fixe */
.dash-card > :not(.dash-head):not(.dash-alert){
  /* nu vrem sa afectam fiecare element mic individual, dar in layout-ul tau
     urmatorul element mare e grid-ul sau view-ul de cazuri */
}

/* 1) Dashboard view: grid-ul devine scroll area daca e nevoie */
.dash-grid{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;

  /* ✅ cheie: ocupa spatiul ramas + scroll */
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px; /* mic hack sa nu “taie” scroll-ul */
}

/* 2) Cases view: zona cu toolbar + list trebuie sa poata scrola.
      Nu ai wrapper comun, deci facem list-ul scrollabil, toolbar ramane sus */
.cases-toolbar{
  flex: 0 0 auto;
}

.cases-list{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

/* responsive */
@media (max-width: 820px){
  .dash-grid{ grid-template-columns: 1fr; }
  .dash-user{ text-align:left; }

  /* pe mobil, padding mai mic ca sa nu “manance” spatiul */
  .dash-shell{ padding: 20px 12px; }
  .dash-card{ padding: 14px; }
}

/* buttons */
.dash-btn{
  appearance:none;
  border: 0;
  cursor:pointer;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13.5px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
}

.dash-btn-ghost{
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.10);
  color:#0c1f15;
}

.dash-btn-ghost:hover{
  border-color: rgba(34,197,94,.22);
}

/* footer (daca exista) */
.dash-foot{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.08);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;

  flex: 0 0 auto;
}

.dash-muted{ color: rgba(17,24,39,.62); font-size: 13px; }
.dash-dot{ color: rgba(17,24,39,.35); }



/* === STATISTICI === */

.stats-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
  margin-top:20px;
}

.stat-card{
  background:#f4faf6;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:18px;
}

.stat-label{
  font-size:13px;
  color:#4b5563;
}

.stat-value{
  font-size:26px;
  font-weight:900;
  color:#065f46;
  margin-top:6px;
}

.stats-table{
  width:100%;
  border-collapse:collapse;
  margin-top:12px;
}

.stats-table th,
.stats-table td{
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
}

.stats-table th{
  font-size:13px;
  text-transform:uppercase;
  color:#374151;
}

.stats-table td{
  font-size:14px;
}

/* =========================================================
   ✅ FIX: ECRANE MARI (27"-32") - fara sa atingem telefonul
   Pune acest bloc la FINAL de tot in CSS
   ========================================================= */

/* Laptop/desktop > 1200px: doar mai lat putin */
@media (min-width: 1200px){
  .dash-page .dash-card{
    max-width: 1160px !important;
  }
}

/* Desktop mare > 1500px: card mai lat + nu mai sta “pierdut” pe mijloc */
@media (min-width: 1500px){
  .dash-page .dash-shell{
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 48px 24px !important;
  }

  .dash-page .dash-card{
    max-width: 1380px !important;
    padding: 26px !important;
    border-radius: 24px !important;
  }

  .dash-page .dash-title{
    font-size: 30px !important;
  }

  .dash-page .dash-subtitle{
    font-size: 14.5px !important;
  }

  .dash-page .dash-head{
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
  }

  .dash-page .dash-grid{
    gap: 14px !important;
    margin-top: 16px !important;
  }

  .dash-page .dash-tile{
    padding: 18px !important;
    border-radius: 20px !important;
  }

  .dash-page .dash-tile-title{
    font-size: 15px !important;
  }

  .dash-page .dash-tile-sub{
    font-size: 14px !important;
  }
}

/* Ultra-wide > 1800px: si mai lat, dar elegant */
@media (min-width: 1800px){
  .dash-page .dash-shell{
    padding: 56px 28px !important;
  }

  .dash-page .dash-card{
    max-width: 1560px !important;
    padding: 30px !important;
  }

  .dash-page .dash-title{
    font-size: 32px !important;
  }
}





/* === STATISTICI === */

.stats-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
  margin-top:20px;
}

.stat-card{
  background:#f4faf6;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:18px;
}

.stat-label{
  font-size:13px;
  color:#4b5563;
}

.stat-value{
  font-size:26px;
  font-weight:900;
  color:#065f46;
  margin-top:6px;
}

.stats-table{
  width:100%;
  border-collapse:collapse;
  margin-top:12px;
}

.stats-table th,
.stats-table td{
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
}

.stats-table th{
  font-size:13px;
  text-transform:uppercase;
  color:#374151;
}

.stats-table td{
  font-size:14px;
}





/* ================================
   AUTH ONLY (login/register)
   ================================ */

body.is-auth {
  margin: 0;
  min-height: 100vh;
}

/* pagina full screen */
body.is-auth .auth-page{
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* overlay subtil animat peste fundal */
body.is-auth .auth-bg{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
}

body.is-auth .auth-bg::before{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255,255,255,0.08) 0px,
      rgba(255,255,255,0.08) 22px,
      transparent 44px,
      transparent 90px
    );
  opacity:.35;
  animation: forestLight 18s linear infinite;
}

@keyframes forestLight{
  0%   { transform: translate(-6%, -2%); }
  50%  { transform: translate(6%, 2%); }
  100% { transform: translate(-6%, -2%); }
}

/* CENTRARE GARANTATA */
body.is-auth .auth-shell{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 16px;
  position: relative;
  z-index: 2;
}

/* CARD GLASS */
body.is-auth .auth-card{
  width: 100%;
  max-width: 560px;
  border-radius: 26px;
  padding: 26px 26px 20px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 40px 120px rgba(0,0,0,0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* brand */
body.is-auth .auth-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-bottom: 14px;
  text-align:left;
}

body.is-auth .auth-logo{
  width: 200px;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25));
}

body.is-auth .auth-brand-name{
  font-weight: 900;
  font-size: 16px;
  color: #082015;
  line-height: 1.15;
}

body.is-auth .auth-brand-sub{
  font-size: 12.5px;
  color: rgba(17,24,39,0.65);
}

body.is-auth .auth-title{
  text-align:center;
  font-size: 28px;
  font-weight: 950;
  margin: 8px 0 4px;
  color: #071a12;
}

body.is-auth .auth-subtitle{
  text-align:center;
  font-size: 13.5px;
  margin: 0 0 16px;
  color: rgba(17,24,39,0.65);
}

/* fields */
body.is-auth .form-row{ margin-bottom: 12px; }

body.is-auth .label{
  display:block;
  font-size: 12.5px;
  font-weight: 900;
  margin-bottom: 6px;
  color: #0b1f16;
}

body.is-auth .input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.16);
  background: rgba(255,255,255,0.90);
  font-size: 14px;
}

body.is-auth .input:focus{
  outline: none;
  border-color: rgba(16,185,129,0.55);
  box-shadow: 0 0 0 5px rgba(16,185,129,0.16);
}

/* buttons */
body.is-auth .actions-vertical{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 14px;
}

body.is-auth .auth-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 13px 14px;
  border-radius: 14px;
  font-weight: bold;
  text-decoration:none;
  border: 0;
  cursor:pointer;
}

body.is-auth .auth-btn-primary{
  background: linear-gradient(180deg, #1f7a46, #16663a);
  color: #fff;
  box-shadow: 0 14px 30px rgba(6,78,59,0.24);
}

body.is-auth .auth-btn-secondary{
  background: #CCD9CC;
  color: black;
}

/* hint */
body.is-auth .hint{
  margin-top: 14px;
  text-align:center;
  font-size: 13px;
  color: rgba(17,24,39,0.65);
}

/* alerts (auth only) */
body.is-auth .auth-alert{
  border-radius: 14px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  font-size: 13px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.76);
}

body.is-auth .auth-alert-error{
  border-color: rgba(220,38,38,.25);
  background: rgba(254,242,242,.92);
  color: #7f1d1d;
}

body.is-auth .auth-alert-success{
  border-color: rgba(22,163,74,.22);
  background: rgba(240,253,244,.92);
  color: #14532d;
}

body.is-auth .auth-alert-info{
  border-color: rgba(2,132,199,.22);
  background: rgba(239,246,255,.92);
  color: #0c4a6e;
}

/* ================================
   DASHBOARD – Sage Green Business UI
   ================================ */

.dash-page{
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 12% 0%, rgba(134, 170, 150, 0.35), transparent 60%),
    radial-gradient(800px 600px at 88% 8%, rgba(170, 199, 178, 0.28), transparent 60%),
    linear-gradient(180deg, #eaf2ed 0%, #e1ece6 55%, #dbe8e1 100%);
}

.dash-bg{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
}

.dash-bg::before{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(34, 78, 52, 0.10) 0px,
      rgba(34, 78, 52, 0.10) 18px,
      transparent 42px,
      transparent 92px
    );
  opacity:.22;
  animation: dashLight 22s linear infinite;
}

@keyframes dashLight{
  0%   { transform: translate(-6%, -2%); }
  50%  { transform: translate(6%, 2%); }
  100% { transform: translate(-6%, -2%); }
}

.dash-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 26px 16px;
  position:relative;
  z-index:2;
}

.dash-card{
  width:100%;
  max-width: 980px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;
  padding: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 100px rgba(2,6,23,.12);
}

/* header */
.dash-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 14px;
  flex-wrap:wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  margin-bottom: 12px;
}

.dash-title{
  margin:0;
  font-size: 22px;
  font-weight: 950;
  color:#0c1f15;
  letter-spacing: -0.02em;
}

.dash-subtitle{
  margin: 6px 0 0 0;
  font-size: 13.5px;
  color: rgba(17,24,39,.62);
}

.dash-head-right{
  display:flex;
  align-items:flex-start;
  gap: 12px;
  flex-wrap:wrap;
}

.dash-user{
  text-align:right;
  line-height:1.1;
}

.dash-user-name{
  font-weight: 950;
  font-size: 13.5px;
  color:#0c1f15;
}

.dash-user-meta{
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(17,24,39,.60);
}

.dash-badge{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.dash-badge-admin{ color:#8a2c0a; }
.dash-badge-manager{ color:#1d4ed8; }
.dash-badge-user{ color:#16663a; }

/* alerts */
.dash-alert{
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin: 10px 0;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.75);
}

.dash-alert-success{ border-color: rgba(16,185,129,.22); }
.dash-alert-error{ border-color: rgba(239,68,68,.22); }
.dash-alert-info{ border-color: rgba(59,130,246,.20); }

/* grid tiles */
.dash-grid{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 820px){
  .dash-grid{ grid-template-columns: 1fr; }
  .dash-user{ text-align:left; }
}

.dash-tile{
  display:block;
  text-decoration:none;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 50px rgba(2,6,23,.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.dash-tile:hover{
  transform: translateY(-2px);
  border-color: rgba(34,197,94,.22);
  box-shadow: 0 22px 70px rgba(2,6,23,.10);
}

.dash-tile-title{
  font-weight: 950;
  font-size: 14px;
  color:#0c1f15;
}

.dash-tile-sub{
  margin-top: 6px;
  font-size: 13.5px;
  color: rgba(17,24,39,.62);
}

.dash-tile-admin{
  background: rgba(255,255,255,.86);
  border-color: rgba(124,58,237,.18);
}

/* buttons */
.dash-btn{
  appearance:none;
  border: 0;
  cursor:pointer;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13.5px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
}

.dash-btn-ghost{
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.10);
  color:#0c1f15;
}

.dash-btn-ghost:hover{
  border-color: rgba(34,197,94,.22);
}

/* footer */
.dash-foot{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.08);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
}

.dash-muted{ color: rgba(17,24,39,.62); font-size: 13px; }
.dash-dot{ color: rgba(17,24,39,.35); }

/* === STATISTICI === */

.stats-grid{
  display:grid;
  /*grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); */
  gap:16px;
  margin-top:20px;
}

.stat-card{
  background:#f4faf6;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:18px;
}

.stat-label{
  font-size:13px;
  color:#4b5563;
}

.stat-value{
  font-size:26px;
  font-weight:900;
  color:#065f46;
  margin-top:6px;
}

.stats-table{
  width:100%;
  border-collapse:collapse;
  margin-top:12px;
}

.stats-table th,
.stats-table td{
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
}

.stats-table th{
  font-size:13px;
  text-transform:uppercase;
  color:#374151;
}

.stats-table td{
  font-size:14px;
}

/* ================================
   CASES – match Dashboard UI
   (NO CSS GRID here, only flex)
   ================================ */

.cases-card{ max-width: 1180px; }

.cases-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.cases-btn-primary{
  background: linear-gradient(180deg, #1f7a46, #16663a);
  color:#fff;
  box-shadow: 0 14px 30px rgba(6,78,59,0.18);
}

.cases-toolbar{
  margin-top: 10px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 12px;
  flex-wrap:wrap;
}

.cases-search{ flex: 1; min-width: 280px; }

.cases-search-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.cases-label{
  display:block;
  font-size: 12.5px;
  font-weight: 900;
  margin-bottom: 6px;
  color:#0b1f16;
}

.cases-input{
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.16);
  background: rgba(255,255,255,0.90);
  font-size: 14px;
  box-sizing: border-box;
}

.cases-input:focus{
  outline:none;
  border-color: rgba(16,185,129,0.55);
  box-shadow: 0 0 0 5px rgba(16,185,129,0.16);
}

.cases-search .cases-input{ max-width: 560px; }

.cases-textarea{ resize: vertical; min-height: 110px; }

.cases-total{
  font-size: 13.5px;
  color: rgba(17,24,39,.70);
}

.cases-table-wrap{
  margin-top: 14px;
  overflow:auto;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
}

.cases-table{
  width:100%;
  border-collapse:collapse;
  min-width: 1080px;
}

.cases-table th,
.cases-table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  text-align:left;
  vertical-align:top;
  font-size: 13.5px;
}

.cases-table th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(17,24,39,.72);
  background: rgba(234,242,237,.65);
}

.cases-empty{
  padding: 18px 12px;
  color: rgba(17,24,39,.60);
}

.cases-mono{ font-variant-numeric: tabular-nums; }
.cases-muted{ color: rgba(17,24,39,.55); }

.cases-truncate{
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cases-pill{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.78);
  font-weight: 900;
  font-size: 12px;
  text-transform: lowercase;
}

.cases-actions-cell{ white-space: nowrap; }
.cases-link{
  color:#14532d;
  text-decoration:none;
  font-weight:900;
}
.cases-link:hover{ text-decoration: underline; }
.cases-sep{ color: rgba(17,24,39,.35); padding: 0 6px; }

/* ================================
   MODAL (premium)
   ================================ */

.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;

  /* fundal */
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  /* centrare panel */
  padding: 24px 14px;

  /* IMPORTANT: NU mai facem scroll pe modal, ci pe content */
  overflow: hidden;
}

.modal.is-open{ display:block; }

/* overlay separat (pentru click close) */
.modal__overlay{
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: pointer;
}

/* panel */
.modal__panel{
  position: relative;
  z-index: 1;

  width: min(920px, 100%);
  margin: 0 auto;

  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;
  box-shadow: 0 40px 140px rgba(2,6,23,.35);

  /* cheia: panelul NU depaseste viewport-ul */
  max-height: calc(100vh - 48px);

  /* layout: head + body(form) */
  display: flex;
  flex-direction: column;

  overflow: hidden; /* taie orice bleed, scroll-ul e doar in content */
}

/* header */
.modal__head{
  flex: 0 0 auto;

  padding: 16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;

  border-bottom: 1px solid rgba(15,23,42,.08);
  background: rgba(234,242,237,.55);
}

.modal__title{
  font-weight: 950;
  font-size: 16px;
  color:#0c1f15;
}

.modal__subtitle{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(17,24,39,.62);
}

.modal__x{
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.85);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 900;
  line-height: 1;
}

/* FORM = containerul principal (fara padding aici!) */
.modal__body{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;

  /* ca sa functioneze overflow pe copil (modal__content) */
  min-height: 0;
  padding: 0;
}

/* DOAR aici este scroll-ul */
.modal__content{
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  padding: 16px 18px;
}

/* footer mereu vizibil */
.modal__foot{
  flex: 0 0 auto;

  padding: 14px 18px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;

  border-top: 1px solid rgba(15,23,42,.08);

  /* premium: usor "glass" + separare */
  background: rgba(255,255,255,.88);
}

/* optional: separator intre base si phase */
.phase-sep{
  height: 1px;
  background: rgba(15,23,42,.10);
  margin: 14px 0;
}

/* form layout */
.form-grid{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
}

.form-row{ width: calc(50% - 6px); }
.form-row-full{ width: 100%; }

/* mici ajustari pentru textareas */
.cases-textarea{
  resize: vertical;
  min-height: 110px;
}

/* ================================
   TABLETA
   ================================ */
@media (max-width: 920px){
  .modal{ padding: 18px 10px; }
  .modal__panel{
    border-radius: 18px;
    max-height: calc(100vh - 36px);
  }
  .modal__head{ padding: 14px 16px; }
  .modal__content{ padding: 14px 16px; }
  .modal__foot{ padding: 12px 16px; }
}

/* ================================
   TELEFON
   ================================ */
@media (max-width: 520px){
  .modal{ padding: 12px 8px; }
  .modal__panel{
    border-radius: 16px;
    max-height: calc(100vh - 24px);
  }

  /* 1 coloana */
  .form-row{ width: 100%; }

  .modal__x{ padding: 10px 12px; } /* tap-friendly */
}



/* FORM LAYOUT (no grid) */
.form-grid{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
}

.form-row{
  width: calc(50% - 6px);
}

.form-row-full{
  width: 100%;
}

@media (max-width: 820px){
  .form-row{ width: 100%; }
}






/* ================================
   MODAL (generic) - if not already
   ================================ 

.modal{ position: fixed; inset: 0; z-index: 9999; display:none; }
.modal.is-open{ display:block; }

.modal__overlay{
  position:absolute;
  inset:0;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal__panel{
  position:relative;
  width: calc(100% - 26px);
  max-width: 860px;
  margin: 7vh auto;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;
  box-shadow: 0 40px 140px rgba(2,6,23,.30);
  overflow:hidden;
}

.modal__head{
  padding: 16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: rgba(234,242,237,.55);
}

.modal__title{ font-weight: 950; font-size: 16px; color:#0c1f15; }
.modal__subtitle{ margin-top: 6px; font-size: 13px; color: rgba(17,24,39,.62); }

.modal__x{
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 900;
}

.modal__body{ padding: 16px 18px; }

.form-grid{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
}

.form-row{ width: calc(50% - 6px); }
.form-row-full{ width: 100%; }

@media (max-width: 820px){
  .form-row{ width: 100%; }
}

.modal__foot{
  padding: 14px 18px 18px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  border-top: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.75);
}
*/


/* ================================
   DASHBOARD TOGGLE + CASE LIST
   ================================ */

.dash-title-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.dash-arrow{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#0c1f15;
  font-weight: 950;
}

.dash-arrow:hover{
  border-color: rgba(34,197,94,.22);
}

.dash-arrow-right{
  margin-left: 4px;
}

/* CASES UI in dashboard card */
.cases-toolbar{
  margin-top: 12px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 12px;
  flex-wrap:wrap;
}

.cases-search{ flex: 1; min-width: 280px; }

.cases-filters-row{
  display:flex;
  gap: 10px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.cases-field{ min-width: 220px; }
.cases-field-small{ min-width: 140px; }
.cases-field-actions{ min-width: 180px; }

.cases-label{
  display:block;
  font-size: 12.5px;
  font-weight: 900;
  margin-bottom: 6px;
  color:#0b1f16;
}

.cases-input{
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.16);
  background: rgba(255,255,255,0.90);
  font-size: 14px;
  box-sizing: border-box;
}

.cases-input:focus{
  outline:none;
  border-color: rgba(16,185,129,0.55);
  box-shadow: 0 0 0 5px rgba(16,185,129,0.16);
}

.cases-actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

.cases-btn-primary{
  background: linear-gradient(180deg, #1f7a46, #16663a);
  color:#fff;
  box-shadow: 0 14px 30px rgba(6,78,59,0.18);
}

.cases-total{
  font-size: 13.5px;
  color: rgba(17,24,39,.70);
}

.cases-list{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.cases-empty{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  color: rgba(17,24,39,.70);
}

.case-row{
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  padding: 12px;
  box-shadow: 0 14px 50px rgba(2,6,23,.06);
}

.case-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
}

.case-left{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
}

.case-id{
  font-weight: 950;
  color:#0c1f15;
}

.case-number{
  font-weight: 900;
  color:#0c1f15;
  font-variant-numeric: tabular-nums;
}

.case-badge{
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
  color:#16663a;
}

.case-year{
  color: rgba(17,24,39,.65);
  font-variant-numeric: tabular-nums;
}

.case-title{
  margin-top: 8px;
  font-weight: 950;
  color:#0c1f15;
}

.case-desc{
  margin-top: 6px;
  color: rgba(17,24,39,.70);
  font-size: 13.5px;
  line-height: 1.35;
  max-width: 980px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ================================
   CASES INLINE FILTER ROW (one line)
   ================================ */

.cases-inline{
  display:flex;
  gap: 10px;
  align-items:flex-end;
  flex-wrap:wrap; /* pe ecrane mici coboara frumos */
}

.cases-inline-item{ min-width: 160px; }
.cases-inline-grow{ min-width: 260px; flex: 1; }
.cases-inline-year{ min-width: 120px; }
.cases-inline-actions{ min-width: 120px; }

.cases-textarea{ resize: vertical; min-height: 110px; }

/* =========================
   Case view (NO GRID, NO WARNINGS)
   ========================= */

.casev-wrap { padding-top: 6px; }

.casev-section { margin-top: 18px; }
.casev-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.casev-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.casev-box {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(25,35,45,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  flex: 1 1 220px;     /* card-uri flexibile */
  min-width: 220px;
}

.casev-box-wide {
  flex: 1 1 100%;
  min-width: 0;
}

.casev-label { font-size: 12px; opacity: .65; margin-bottom: 6px; }
.casev-value { font-size: 14px; font-weight: 600; }

.casev-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.casev-phase {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(25,35,45,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  flex: 1 1 380px;   /* 2 coloane pe desktop, 1 pe mobil */
  min-width: 280px;
}

.casev-phase-title { font-weight: 800; margin-bottom: 10px; }

.casev-pre {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: .9;
}

.casev-empty { opacity: .7; padding: 6px 0; }

.casev-upload { margin-bottom: 10px; }
.casev-upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.casev-hint { font-size: 12px; opacity: .65; margin-top: 6px; }

.casev-docs { display: flex; flex-direction: column; gap: 10px; }

.casev-doc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(25,35,45,0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.casev-doc-left { min-width: 0; }
.casev-doc-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.casev-doc-meta { font-size: 12px; opacity: .65; margin-top: 4px; }

@media (max-width: 700px) {
  .casev-doc { flex-direction: column; align-items: flex-start; }
  .casev-doc-name { max-width: 100%; }
}

.casev-wrap { padding-top: 6px; }
.casev-section { margin-top: 18px; }
.casev-section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }

.casev-row { display:flex; flex-wrap:wrap; gap:12px; }

.casev-box{
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(25,35,45,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  flex: 1 1 220px;
  min-width: 220px;
}
.casev-box-wide{ flex: 1 1 100%; min-width:0; }

.casev-label{ font-size:12px; opacity:.65; margin-bottom:6px; }
.casev-value{ font-size:14px; font-weight:600; }

.casev-phases{ display:flex; flex-wrap:wrap; gap:12px; }
.casev-phase{
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(25,35,45,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  flex: 1 1 380px;
  min-width: 280px;
}
.casev-phase-title{ font-weight:800; margin-bottom:10px; }
.casev-pre{ margin:0; font-size:12px; line-height:1.35; white-space:pre-wrap; word-break:break-word; opacity:.9; }
.casev-empty{ opacity:.7; padding:6px 0; }

.casev-upload{ margin-bottom:10px; }
.casev-upload-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.casev-hint{ font-size:12px; opacity:.65; }

.casev-docs{ display:flex; flex-direction:column; gap:10px; }
.casev-doc{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(25,35,45,0.08);
  border-radius: 14px;
  padding: 12px 14px;
}
.casev-doc-left{ min-width:0; }
.casev-doc-name{ font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:520px; }
.casev-doc-meta{ font-size:12px; opacity:.65; margin-top:4px; }

@media (max-width:700px){
  .casev-doc{ flex-direction:column; align-items:flex-start; }
  .casev-doc-name{ max-width:100%; }
}

/* ================================
   CASE VIEW – Phase table (clear + defined)
   ================================ */

.casev-phase-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;

  border: 1px solid rgba(15,23,42,.14);
  border-radius: 14px;
  overflow: hidden;

  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 40px rgba(2,6,23,.05);
}

/* randuri zebra foarte subtil */
.casev-phase-table tr:nth-child(even) td{
  background: rgba(255,255,255,.72);
}
.casev-phase-table tr:nth-child(odd) td{
  background: rgba(255,255,255,.86);
}

/* borduri clare intre randuri */
.casev-phase-table tr + tr td{
  border-top: 1px solid rgba(15,23,42,.10);
}

/* celule */
.casev-phase-table td{
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 13.5px;
  line-height: 1.25;
}

/* coloana stanga = label */
.casev-phase-k{
  width: 42%;
  min-width: 210px;

  color: rgba(17,24,39,.78);
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;

  background: rgba(234,242,237,.75) !important; /* ca header din dashboard */
  border-right: 1px solid rgba(15,23,42,.10);
}

/* coloana dreapta = valoare */
.casev-phase-v{
  width: 58%;
  color: #0c1f15;
  font-weight: 800;

  word-break: break-word;
}

.casev-phase-v.is-muted{
  color: rgba(17,24,39,.55);
  font-weight: 700;
}

/* empty state */
.casev-phase-empty{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(15,23,42,.16);
  background: rgba(255,255,255,.65);
  color: rgba(17,24,39,.65);
  font-size: 13.5px;
}

/* Mobil: ramane tabel, dar label/value se pun pe randuri */
@media (max-width: 680px){
  .casev-phase-table td{
    display:block;
    width: 100%;
  }

  .casev-phase-k{
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid rgba(15,23,42,.10);
    background: rgba(234,242,237,.75) !important;
  }

  .casev-phase-v{
    padding-top: 10px;
  }

  .casev-phase-table tr + tr td{
    border-top: none; /* ca avem separare in blocuri */
  }

  .casev-phase-table tr{
    display:block;
    border-top: 1px solid rgba(15,23,42,.10);
  }
  .casev-phase-table tr:first-child{
    border-top: none;
  }
}


