* { box-sizing: border-box; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  /* background:#f8f9fa;  <-- scos (ai fundalul premium mai jos) */
  color:#111827;
}

a{ color:inherit; text-decoration:none; }

.app{
  min-height: 100vh;
  display:flex;
  flex-direction:column;
}

/* ===== Header ===== */
.app-header{
  position: sticky;
  top:0;
  z-index: 50;
  background:#ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand img{
  height: 60px;
  width:auto;
  display:block;
}

/* mobile hamburger */
.hamburger{
  display:none;
  border:none;
  background:transparent;
  font-size: 22px;
  cursor:pointer;
  padding: 6px 8px;
  border-radius:10px;
}
.hamburger:hover{ background:#f3f4f6; }

/* user dropdown */
.user-menu{
  position: relative;
  display:flex;
  align-items:center;
  gap:10px;
}
.user-btn{
  display:flex;
  align-items:center;
  gap:10px;
  border: 1px solid #e5e7eb;
  background:#fff;
  padding: 6px 10px;
  border-radius: 999px;
  cursor:pointer;
}
.user-icon{
  width: 28px; height: 28px;
  border-radius:999px;
  background:#132665;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size: 13px;
}

.user-avatar-img{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  background: #fff;
}

.user-name{
  font-weight:700;
  font-size:14px;
  color:#111827;
}
.user-caret{ opacity:.7; font-size:12px; }

.user-dropdown{
  position:absolute;
  right:0;
  top: 110%;
  background:#fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  min-width: 220px;
  padding: 8px;
  display:none;
}
.user-dropdown a{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 10px;
  font-size:14px;
}
.user-dropdown a:hover{ background:#f3f4f6; }

.user-menu.open .user-dropdown{ display:block; }

/* ===== Top nav (desktop) ===== */
.top-nav{
  border-top: 1px solid #f1f5f9;
  background:#ffffff;
}
.top-nav-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 14px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.nav-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 12px;
  color:#0f172a;
  border: 1px solid transparent;
}
.nav-item:hover{
  background:#f3f6fb;
  border-color:#e5eaf5;
}
.nav-ico{ width: 18px; text-align:center; opacity:.85; }

/* ===== Drawer (mobile) ===== */
.drawer-bg{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,0.45);
  display:none;
  z-index: 80;
}
.drawer{
  position: fixed;
  top:0; left:0;
  height:100vh;
  width: min(320px, 86vw);
  background:#fff;
  box-shadow: 10px 0 30px rgba(0,0,0,0.18);
  padding: 12px;
  transform: translateX(-105%);
  transition: transform .18s ease;
  z-index: 90;
}
.drawer.open{ transform: translateX(0); }
.drawer-bg.open{ display:block; }

.drawer-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 6px 4px 10px;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 10px;
}
.drawer-close{
  border:none;
  background:transparent;
  font-size: 22px;
  cursor:pointer;
  padding: 6px 8px;
  border-radius: 10px;
}
.drawer-close:hover{ background:#f3f4f6; }

.drawer a{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 10px;
  border-radius: 12px;
  margin: 4px 0;
}
.drawer a:hover{ background:#f3f6fb; }

/* ===== Main ===== */
.main{
  flex:1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 18px 14px 26px;
}

.page-title{
  font-size: 22px;
  margin: 6px 0 14px;
  color:#0f172a;
}

/* ===== Cards / Stats ===== */
.grid{
  display:grid;
  gap: 12px;
}
.grid.stats{
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px){
  .grid.stats{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 760px){
  .grid.stats{ grid-template-columns: 1fr; }
}

.card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.stat-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
.stat-icon{
  width: 38px; height: 38px;
  border-radius: 12px;
  background:#f3f6fb;
  border: 1px solid #e5eaf5;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#132665;
}
.stat-title{
  font-size: 13px;
  color:#475569;
  font-weight:700;
}
.stat-value{
  font-size: 26px;
  font-weight: 900;
  color:#0f172a;
}

.small-note{
  margin-top: 8px;
  font-size: 13px;
  color:#475569;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* ===== Footer ===== */
.app-footer{
  border-top: 1px solid #e5e7eb;
  background:#fff;
}
.footer-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 14px;
  font-size: 13px;
  color:#64748b;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

/* ===== Responsive: desktop top-nav vs mobile drawer ===== */
@media (max-width: 900px){
  .top-nav{ display:none; }
  .hamburger{ display:inline-flex; }

  /* DOAR hamburger mai mare pe mobil */
  .hamburger{
    font-size: 32px;
    padding: 12px 14px;
    border-radius: 14px;
  }
}

/* Ascunde "Management pacienți" pe mobile */
@media (max-width: 900px){
  .brand__sub{
    display: none;
  }
}

/* =========================================================
   PREMIUM UPGRADE (App-wide, safe)
   - subtle gradient background
   - softer shadows
   - elegant sticky header (blur)
   - micro animations (0.15s)
   - focus rings
========================================================= */

/* 1) Fundal discret (nu alb plat) */
body{
  background:
    radial-gradient(1200px 700px at 50% -220px, rgba(19,38,101,.08), transparent 60%),
    radial-gradient(900px 600px at 85% 20%, rgba(30,136,202,.06), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 60%, #ffffff 100%);
}

/* 2) Header sticky elegant (glass) */
.app-header{
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,.10);
}

/* linie foarte discretă între header și nav */
.top-nav{
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(15,23,42,.06);
}

/* 3) Card shadow mai premium (soft) */
.card{
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

/* 4) Micro-animații pe elementele interactive */
.card,
.nav-item,
.user-btn,
.hamburger,
.drawer a{
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15,23,42,.10);
}

.nav-item:hover{
  transform: translateY(-1px);
}

.user-btn:hover,
.hamburger:hover{
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}

/* 5) Focus states (tab / accesibilitate) */
.user-btn:focus,
.hamburger:focus,
.nav-item:focus,
.drawer a:focus,
a:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(19,38,101,.14);
  border-color: rgba(19,38,101,.25);
}

/* 6) Inputs default (dacă vrei consistență globală) */
input[type="text"],
input[type="search"],
input[type="date"],
textarea,
select{
  transition: box-shadow .15s ease, border-color .15s ease;
}
input[type="text"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus{
  outline: none;
  border-color: rgba(19,38,101,.35);
  box-shadow: 0 0 0 4px rgba(19,38,101,.12);
}

/* 7) Dropdown shadow mai “clean” */
.user-dropdown{
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 18px 44px rgba(15,23,42,.14);
}

/* 8) Respectă reduce motion */
@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* FIX dropdown admin peste meniul principal */
.app-header,
.header-inner,
.top-nav,
.top-nav-inner{
  overflow: visible;
}

.user-menu{ 
  position: relative;
  z-index: 1000;
}

.user-dropdown{
  z-index: 9999;
}

/* ===== Mobile header: text lung / nume lung / logo fără overflow ===== */
@media (max-width: 900px){
  .header-inner{
    gap: 8px;
  }

  .brand{
    min-width: 0;            /* permite shrink */
  }

  .brand img{
    height: 44px;            /* puțin mai mic pe mobil */
  }

  .user-btn{
    min-width: 0;            /* permite shrink */
    max-width: 58vw;         /* nu lăsa să mănânce tot rândul */
  }

  .user-name{
    max-width: 34vw;         /* ajustezi dacă vrei */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Touch-friendly (opțional, dar foarte util pe mobil) */
  .user-btn, .hamburger{
    min-height: 44px;
  }
}

/* ===== Statistici pacienti ===== */

.stats-bar{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:18px;
  margin-bottom:28px;
}

.stat-card{
  background: linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border-radius:16px;
  padding:18px;
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid #e6edf7;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 14px rgba(19,38,102,0.06);
  transition: all .25s ease;
}

.stat-card:hover{
  transform: translateY(-3px);
  box-shadow:
    0 4px 10px rgba(19,38,102,0.08),
    0 10px 28px rgba(19,38,102,0.12);
}

.stat-icon{
  width:46px;
  height:46px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  color:white;
}

.stat-blue{
  background: linear-gradient(135deg,#3b82f6,#1d4ed8);
}

.stat-green{
  background: linear-gradient(135deg,#22c55e,#15803d);
}

.stat-orange{
  background: linear-gradient(135deg,#f59e0b,#b45309);
}

.stat-purple{
  background: linear-gradient(135deg,#8b5cf6,#5b21b6);
}

.stat-content{
  display:flex;
  flex-direction:column;
}

.stat-value{
  font-size:26px;
  font-weight:900;
  color:#0f172a;
  line-height:1;
}

.stat-label{
  font-size:13px;
  font-weight:700;
  color:#64748b;
}
