:root {
  --brand-teal: #00878b;
  --brand-teal-dark: #006e72;
  --brand-sky: #F1BF87;
  --brand-navy-deep: #0b2540;
  --border: #e5e7eb;
  --muted: #6b7280;
  --secondary: #f3f4f6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #111827; }
a { text-decoration: none; }
body { background: #f8fafc; min-height: 100vh; display: flex; flex-direction: column; }

/* ============ NAVBAR (sticky, not absolute — internal pages have no hero behind it) ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--brand-teal);
}
.site-header .container-nav {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
}
.site-header .brand img { height: 36px; width: auto; display: block; }
@media (min-width: 992px) { .site-header .brand img { height: 40px; } }

.nav-main {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
@media (min-width: 992px) { .nav-main { display: flex; } }

.nav-item { position: relative; }
.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  position: relative;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--brand-sky);
}

.nav-tools { display: none; align-items: center; gap: 8px; }
@media (min-width: 992px) { .nav-tools { display: flex; } }

.icon-btn {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icon-btn:hover { color: #fff; }

.nav-caret { width: 10px; height: 10px; opacity: 0.7; }

.submenu {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  min-width: 180px;
  padding-top: 12px;
  display: none;
  z-index: 40;
}
.nav-item:hover .submenu { display: block; }
.submenu-inner {
  background: var(--brand-teal);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.35);
}
.submenu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.submenu a:hover, .submenu a.active { background: rgba(255,255,255,0.1); color: #fff; }

/* nav-tools items sit at the far right edge of the header, not centered like the main nav's
   submenus, so their panel aligns to the right instead of centering under the trigger. */
.nav-tools .nav-item .submenu { left: auto; right: 0; transform: none; }

.burger { display: inline-flex; background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 22px; }
@media (min-width: 992px) { .burger { display: none; } }

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: var(--brand-teal);
}
.mobile-menu.open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; padding: 16px; }
.mobile-menu a {
  color: rgba(255,255,255,0.85);
  padding: 12px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu a.active { color: #fff; }

.mobile-accordion { border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.85);
  padding: 12px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}
.mobile-accordion-toggle .nav-caret { transition: transform 0.2s ease; }
.mobile-accordion.open .mobile-accordion-toggle { color: #fff; }
.mobile-accordion.open .mobile-accordion-toggle .nav-caret { transform: rotate(180deg); }
.mobile-accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s ease;
}
.mobile-accordion.open .mobile-accordion-panel { grid-template-rows: 1fr; }
.mobile-accordion-panel-inner { overflow: hidden; }
.mobile-accordion-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 10px 16px;
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.mobile-accordion-panel a:hover, .mobile-accordion-panel a.active { color: #fff; }

/* ============ TABLE / CARD ============ */
.table-card {
  background: rgb(248,248,248);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border: 1px solid var(--border);
}
@media (min-width: 992px) { .table-card { padding: 28px; } }
.table-toolbar {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 640px) { .table-toolbar { flex-direction: row; align-items: center; justify-content: space-between; } }
.search-wrap { position: relative; width: 100%; }
@media (min-width: 640px) { .search-wrap { max-width: 320px; } }
.search-wrap input {
  height: 40px;
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 12px 0 36px;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}
.search-wrap input:focus { border-color: var(--brand-sky); }
.search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 14px; }
.data-table thead { background: var(--secondary); }
.data-table th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-navy-deep); }
.data-table td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: top; }
.data-table tbody tr:hover { background: rgba(243,244,246,0.4); }
.data-table td a:not(.btn), .mobile-card a:not(.btn) { color: var(--brand-navy-deep); font-weight: 600; }
.data-table td a:not(.btn):hover, .mobile-card a:not(.btn):hover { color: var(--brand-teal-dark); text-decoration: underline; }
.data-table th a { color: inherit; }
.data-table th a:hover { color: var(--brand-teal-dark); }
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; }
.badge-active { background: rgba(0,135,139,0.15); color: var(--brand-teal-dark); }
.badge-done { background: rgba(16,185,129,0.15); color: #047857; }
.badge-draft { background: rgba(245,158,11,0.15); color: #b45309; }
.badge-cancel { background: rgba(239,68,68,0.15); color: #b91c1c; }
.badge-muted { background: rgba(107,114,128,0.15); color: #374151; }

@media (max-width: 767px) {
  .data-table { display: none; }
}
.mobile-cards { display: none; }
@media (max-width: 767px) { .mobile-cards { display: block; } }
.mobile-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.mobile-card .kv-row { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.mobile-card .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.info-list { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.info-list .kv-row { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--border); }
.info-list .kv-row:first-child { border-top: 0; }
.info-list .kv-row > span:last-child { text-align: right; }
.info-list .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ============ COMPACT PAGE HEADER (new — internal pages, not the mockup's full hero) ============ */
.page-topbar {
  padding: 20px 0 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-topbar .breadcrumb { font-size: 12px; margin-bottom: 6px; }
.page-topbar .breadcrumb a { color: var(--brand-navy-deep); font-weight: 600; }
.page-topbar .breadcrumb a:hover { color: var(--brand-teal-dark); }
.page-title { margin: 0; font-size: 22px; font-weight: 600; color: var(--brand-navy-deep); }

/* ============ FOOTER ============ */
.site-footer { background: var(--brand-teal); color: #fff; margin-top: auto; }
.site-footer .inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--brand-sky); }

/* ============ LOGIN PAGE ============ */
.login-page {
  position: relative;
  flex: 1;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 48px 16px 64px;
  background: rgb(36, 73, 49);
}
.login-page .bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.2;
}
.login-page .overlay {
  position: absolute; inset: 0;
  background: rgba(22, 45, 38, 0.7);
}
.login-page-inner {
  position: relative;
  width: 100%;
  max-width: 384px;
}
.login-card {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
}
.field { position: relative; margin-bottom: 16px; }
.field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field input {
  height: 48px;
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(243,244,246,0.4);
  padding: 0 12px 0 40px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus { border-color: var(--brand-teal); background: #fff; box-shadow: 0 0 0 3px rgba(0,135,139,0.2); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.check-row input { width: 14px; height: 14px; accent-color: var(--brand-teal); }
.submit-btn {
  height: 48px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #3a8489;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2);
  margin-top: 8px;
}
.submit-btn:hover { opacity: 0.95; }
.forgot { display: block; text-align: center; margin-top: 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(17,24,39,0.7); }
.forgot:hover { color: var(--brand-teal); }

/* ============ GENERIC CARD / BUTTON (reused as content wrapper on non-table pages) ============ */
.comp-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.btn-primary-brand {
  background: #00878b;
  border-color: #00878b;
  color: #fff;
}
.btn-primary-brand:hover,
.btn-primary-brand:focus {
  background: #006e72;
  border-color: #006e72;
  color: #fff;
}

/* ============ PRELOADER ============ */
body.np-lock { overflow: hidden; }
.np-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00878b;
  opacity: 1;
  transition: opacity 51ms ease-out;
}
.np-root.s7 { opacity: 0; pointer-events: none; }

.np-frame {
  width: min(900px, 92vw);
  aspect-ratio: 1420 / 635;
  position: relative;
  overflow: visible;
}
.np-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  transition: transform 51ms cubic-bezier(.2,.7,.2,1);
}
.np-n {
  position: relative;
  height: 100%;
  flex-shrink: 0;
}
.np-slice {
  position: absolute;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transform: scale(0.2);
  opacity: 0;
  transform-origin: center center;
  transition: transform 40ms cubic-bezier(.2,.7,.2,1), opacity 34ms ease-out;
}
.np-stanga  { background-image: url("../assets/preloader/linie_stanga.png");  z-index: 3; }
.np-mijloc  { background-image: url("../assets/preloader/linie_mijloc.png");  z-index: 2; }
.np-dreapta { background-image: url("../assets/preloader/linie_dreapta.png"); z-index: 1; }

.np-root.s1 .np-stanga  { transform: scale(1); opacity: 1; }
.np-root.s2 .np-mijloc  { transform: scale(1); opacity: 1; }
.np-root.s3 .np-dreapta { transform: scale(1); opacity: 1; }

.np-text {
  position: relative;
  height: 100%;
  flex-shrink: 0;
  padding-left: 2%;
}
.np-text img {
  position: absolute;
  left: 2%;
  top: 50%;
  width: 96%;
  opacity: 0;
  transform: translateY(-50%);
}
.np-novera  { transition: opacity 136ms ease-out, transform 51ms cubic-bezier(.2,.7,.2,1); }
.np-tagline { transition: opacity 51ms ease-out; }

.np-root.s5 .np-novera  { opacity: 1; }
.np-root.s6 .np-novera  { opacity: 1; transform: translateY(calc(-50% - 40.386px)); }
.np-root.s6 .np-tagline { opacity: 1; transform: translateY(calc(-50% + 44.45px)); }
