:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#6b7280;
  --line:#e5e7eb;
  --blue:#2563eb;
  --shadow: 0 10px 30px rgba(15,23,42,.06);
  --radius:14px;
}
html{
  font-size: clamp(14px, 1.1vw, 16px);
}

*{box-sizing:border-box}
html,body{
  margin:0;
   font-family: "Inter Tight", sans-serif !important;
  background:var(--bg);
  color:var(--text);
}
body{
  font-family: 'Inter Tight', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

button,
input,
textarea,
select,
option {
  font-family: inherit !important;
}

.layout{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:260px;
  background:#fff;
  border-right:1px solid var(--line);
  padding:18px;
}

.brand{
  font-weight:800;
  letter-spacing:.5px;
  margin-bottom:16px;
}

.nav{display:flex; flex-direction:column; gap:6px;}
.nav-item{
  padding:10px 12px;
  border-radius:10px;
  color:var(--text);
  text-decoration:none;
  font-weight:600;
}
.nav-item:hover{background:#f3f4f6;}
.nav-item.active{background:#eef2ff; color:#1d4ed8;}

.main{
  flex:1;
  padding:22px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}
.topbar h1{margin:0; font-size:22px;}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}

.filters{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}

.input{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  outline:none;
  min-width:240px;
  background:#fff;
}
.input:focus{border-color:#bfdbfe; box-shadow:0 0 0 4px rgba(37,99,235,.12);}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:10px;
  background:var(--blue);
  color:#fff;
  text-decoration:none;
  border:1px solid transparent;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{filter:brightness(.96);}

.btn-outline{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
}
.btn-outline:hover{background:#f9fafb;}

.btn-small{
  padding:7px 10px;
  font-size:12px;
  border-radius:9px;
}

.table-wrap{overflow:auto; border-radius:12px; border:1px solid var(--line);}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
}
.table thead th{
  text-align:left;
  font-size:12px;
  color:var(--muted);
  padding:12px;
  border-bottom:1px solid var(--line);
  background:#f9fafb;
}
.table tbody td{
  padding:12px;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
}
.table tbody tr:hover{background:#fafafa;}
.muted{color:var(--muted);}
.link{color:var(--blue); font-weight:700; text-decoration:none;}
.link:hover{text-decoration:underline;}
.actions-cell{display:flex; gap:8px; flex-wrap:wrap;}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  color:var(--c);
  border:1px solid color-mix(in srgb, var(--c) 25%, #fff);
  background: color-mix(in srgb, var(--c) 10%, #fff);
}

code{
  background:#f3f4f6;
  padding:3px 7px;
  border-radius:8px;
  font-weight:700;
}
/* --- Auth (login) page --- */
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background: var(--bg);
  position:relative;
}
.auth-wrap:before{
  content:"";
  position:absolute; inset:0;
  background-image: radial-gradient(#dbeafe 1px, transparent 1px);
  background-size: 18px 18px;
  opacity:.45;
  pointer-events:none;
}
.auth-card{
  position:relative;
  width:100%;
  max-width: 520px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.auth-title{
  margin:0 0 4px 0;
  font-size: 26px;
  font-weight: 850;
}
.auth-sub{
  margin:0 0 18px 0;
  color: var(--muted);
}
.form{
  display:grid;
  gap:12px;
}
.label{
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.input, textarea.input{
  width:100%;
}
.row{
  display:grid;
  gap:10px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px){
  .sidebar{display:none;}
  .main{padding:16px;}
  .filters{flex-direction:column; align-items:stretch;}
  .input{min-width:unset;}
  .row{grid-template-columns:1fr;}
}

/* --- Page header inside cards --- */
.card-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 12px;
}
.card-title h2{
  margin:0;
  font-size: 18px;
}
.helper{
  color: var(--muted);
  font-size: 13px;
}

/* --- Alerts --- */
.alert{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  margin: 8px 0;
  font-weight:700;
}
.alert.ok{
  background:#ecfdf5;
  border-color:#a7f3d0;
  color:#065f46;
}
.alert.err{
  background:#fef2f2;
  border-color:#fecaca;
  color:#991b1b;
}

/* --- Links --- */
a{ color: inherit; }

.card.small_card {
    max-width: 700px;
}

/* --- Responsive helpers --- */
.table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.table{
  min-width: 900px; /* forțează scroll pe mobil */
}

/* Sidebar drawer (mobil) */
.mobile-bar{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.mobile-title{
  font-weight:900;
  font-size:18px;
}

.drawer-toggle{ display:none; }

@media (max-width: 900px){
  .sidebar{ display:none; }      /* ascundem sidebar-ul clasic */
  .mobile-bar{ display:flex; }   /* arătăm bara de mobil */
  .main{ padding:16px; }
  .topbar{ flex-wrap:wrap; gap:10px; }
  .filters{ flex-direction:column; align-items:stretch; }
}

/* Drawer overlay + panel */
.drawer-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  z-index:50;
}
.drawer{
  position:fixed;
  top:0; left:0;
  height:100%;
  width: 280px;
  background: var(--card);
  border-right:1px solid var(--line);
  box-shadow: var(--shadow);
  padding:16px;
  transform: translateX(-105%);
  transition: transform .2s ease;
  z-index:51;
}

.drawer-toggle:checked ~ .drawer-overlay{ display:block; }
.drawer-toggle:checked ~ .drawer{ transform: translateX(0); }

.drawer .brand{ margin-bottom:12px; }
.drawer .nav{ margin-top:10px; }

/* Tabel: ascundem coloane pe mobil (dashboard) */
@media (max-width: 720px){
  .col-pdf, .col-qr, .col-public{ display:none; }
  .actions-cell{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
    white-space:normal;
  }
  .btn.btn-small{ width: 100%; justify-content:center; }
}
