/*
  InnoUnits static website
  No framework, no build step, no external runtime dependency.
  Brand colors are centralized below for easy manual editing.
*/
:root {
  --red: #C2121C;
  --red-dark: #a00e15;
  --grey: #555D60;
  --ink: #1A1C1D;
  --black: #0F1011;
  --paper: #FFFFFF;
  --soft: #F5F5F3;
  --line: rgba(85, 93, 96, 0.12);
  --line-strong: rgba(85, 93, 96, 0.25);
  --font-sans: Inter, "Segoe UI", Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --max: 1440px;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f0f0ee; }
::-webkit-scrollbar-thumb { background: var(--red); }

.container { width: min(100% - 96px, var(--max)); margin-inline: auto; }
.section { padding-block: 88px; }
.page-content { padding-block: 72px; }
.display { font-family: var(--font-display); line-height: 1.03; }
.mono { font-family: var(--font-mono); }
.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}
.grid-bg {
  background-image:
    linear-gradient(rgba(85,93,96,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85,93,96,.045) 1px, transparent 1px);
  background-size: 48px 48px;
}
.rule { position: relative; height: 1px; background: rgba(85,93,96,.15); }
.rule::before, .rule::after {
  content: ""; position: absolute; top: -3px; width: 1px; height: 7px; background: rgba(85,93,96,.3);
}
.rule::before { left: 0; }
.rule::after { right: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 0; text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-red { border: 1.5px solid var(--red); background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { border: 1.5px solid rgba(85,93,96,.35); background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: #fff; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 200;
  background: #fff; border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.site-header.scrolled {
  background: rgba(255,255,255,.97); border-bottom-color: rgba(85,93,96,.13);
  box-shadow: 0 2px 24px rgba(0,0,0,.06); backdrop-filter: blur(8px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { line-height: 0; }
.logo img { height: 40px; width: auto; }
.desktop-nav { display: flex; gap: 32px; align-items: center; }
.nav-link {
  display: inline-block; padding: 4px 0; text-decoration: none;
  font-size: 11.5px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
  color: var(--grey); border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav-link:hover, .nav-link.active { color: var(--red); }
.nav-link.active { border-bottom-color: var(--red); }
.header-cta { font-size: 11px; padding: 10px 22px; }
.hamburger {
  display: none; width: 34px; height: 34px; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--ink);
}
.hamburger span, .hamburger::before, .hamburger::after {
  content: ""; display: block; width: 20px; height: 1.5px; background: currentColor; position: absolute; transition: transform .2s, opacity .2s;
}
.hamburger { position: relative; }
.hamburger::before { transform: translateY(-6px); }
.hamburger::after { transform: translateY(6px); }
.hamburger[aria-expanded="true"] span { opacity: 0; }
.hamburger[aria-expanded="true"]::before { transform: rotate(45deg); }
.hamburger[aria-expanded="true"]::after { transform: rotate(-45deg); }
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 190; background: #fff;
  padding: 32px 24px; border-top: 2px solid var(--red);
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .28s ease, visibility .28s;
  visibility: hidden; pointer-events: none; overflow-y: auto; overscroll-behavior: contain;
}
.mobile-nav.open { transform: none; visibility: visible; pointer-events: auto; }
.mobile-nav a:not(.btn) {
  padding: 12px 0; border-bottom: 1px solid rgba(85,93,96,.1); text-decoration: none;
  font-family: var(--font-sans); font-size: 18px; letter-spacing: .02em; color: var(--ink);
}
.mobile-nav a.active, .mobile-nav a:hover { color: var(--red); }
.mobile-nav .btn { align-self: flex-start; margin-top: 24px; }


/* The supplied SVG is kept unmodified, including its A4 artboard. Crop it
   only in the on-screen header to match the site's logo.png visual size. */
.logo { position: relative; display: block; width: 129px; height: 41px; overflow: hidden; flex: 0 0 129px; }
.logo img { position: absolute; width: 150px; height: auto; max-width: none; top: -16px; left: 0; }
/* ERP content: plain, unboxed layout after the original site's fixed header. */
.page { padding-top: var(--header-h); min-height: 100vh; }
.page-content { padding-block: 72px; }
.erp-content { max-width: 100%; }
.erp-content h1 { font-family: var(--font-display); font-size: clamp(32px, 4vw, 52px); font-weight: 700; margin-bottom: 20px; }
.erp-content h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); margin-bottom: 18px; }
.erp-content p { line-height: 1.65; margin-bottom: 20px; }
.erp-content .muted, .erp-content .note { color: var(--grey); }
.erp-content .note { font-size: 12px; margin-top: 12px; }
.erp-content .error { color: var(--red-dark); font-weight: 600; }
.erp-content .card { margin-bottom: 48px; }
.erp-content .card + .card { padding-top: 36px; border-top: 1px solid var(--line); }
.erp-content .login-card { max-width: 420px; }
.erp-content .summary { border-top: 1px solid var(--line); padding-top: 22px; max-width: 650px; }
.erp-content .summary dt { color: var(--grey); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.erp-content .summary dd { font-size: 16px; font-weight: 500; margin: 0 0 22px; }
.erp-content .status { font-weight: 600; margin-bottom: 12px; }
.erp-content .time-total { margin-bottom: 26px; }
.erp-content label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.erp-content input, .erp-content select { display: block; width: 100%; max-width: 100%; min-height: 44px; margin-bottom: 17px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; }
.erp-content button { border-radius: 0; }
.erp-content button.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.erp-content button.secondary:hover { border-color: var(--red); color: var(--red); }
.erp-content .action-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 15px; }
.erp-content .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.erp-content table { border-collapse: collapse; width: 100%; min-width: 560px; }
.erp-content th, .erp-content td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 13px 10px; }
.erp-content th { color: var(--grey); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.erp-content td { font-size: 14px; overflow-wrap: anywhere; }
/* Three independent desktop areas: logo left, navigation centered, user right.
   The logout POST remains the last navigation entry, not a user-menu item. */
.erp-header-inner {
  display: grid;
  grid-template-columns: minmax(129px, 1fr) auto minmax(129px, 1fr);
  column-gap: 24px;
}
.erp-header-inner .logo { grid-column: 1; justify-self: start; }
.erp-header-inner .desktop-nav { grid-column: 2; justify-self: center; height: 100%; }
.nav-user {
  color: var(--grey); font-family: var(--font-sans);
  font-size: 11.5px; font-weight: 500; letter-spacing: .09em;
  text-transform: uppercase; white-space: nowrap;
}
.erp-header-inner .header-user {
  grid-column: 3; justify-self: end; overflow: hidden;
  text-overflow: ellipsis; max-width: 100%;
}
.logout-form { display: inline-flex; margin: 0; }
.logout-btn.nav-link {
  font-family: var(--font-sans); background: transparent;
  border-left: 0; border-right: 0; border-top: 0; cursor: pointer;
}
.logout-btn.nav-link:hover { color: var(--red); }
.mobile-nav .logout-form { display: block; }
.mobile-nav .logout-btn { display: block; padding: 12px 0; width: 100%; text-align: left; border: 0; border-bottom: 1px solid rgba(85,93,96,.1); background: none; font-family: var(--font-sans); font-size: 18px; font-weight: 400; letter-spacing: .02em; color: var(--ink); text-transform: none; }
.mobile-nav .logout-btn:hover { color: var(--red); }
@media (max-width: 960px) {
  .erp-content .action-row { flex-direction: column; align-items: stretch; }
  .erp-content .action-row form, .erp-content .action-row button { width: 100%; }
}
@media (max-width: 600px) {
  .erp-content .table-scroll { overflow: visible; }
  .erp-content table { min-width: 0; }
  .erp-content thead { display: none; }
  .erp-content tbody tr { display: block; border-bottom: 1px solid var(--line); padding: 12px 0; }
  .erp-content tbody td { display: block; border: 0; padding: 3px 0; }
  .erp-content tbody td:first-child { font-weight: 600; }
  .erp-content .slices-table tbody td:nth-child(2)::before { content: 'Kezdés: '; color: var(--grey); font-weight: 400; }
  .erp-content .slices-table tbody td:nth-child(3)::before { content: 'Befejezés: '; color: var(--grey); font-weight: 400; }
  .erp-content form.project-form .btn { width: 100%; }
}

@media (min-width: 961px) { .mobile-nav { display: none; } }
@media (max-width: 960px) {
  .container { width: min(100% - 48px, var(--max)); }
  .desktop-nav { display: none; }
  .erp-header-inner { display: flex; gap: 12px; }
  .erp-header-inner .header-user {
    margin-left: auto; max-width: min(40vw, 260px);
    font-size: 10px;
  }
  .hamburger { display: flex; flex: 0 0 34px; }
}
@media (max-width: 600px) {
  .container { width: min(100% - 32px, var(--max)); }
  .page-content { padding-block: 60px; }
}
@media (max-width: 1180px) and (min-width: 961px) {
  .desktop-nav { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Worktime admin tables. */
.erp-content .admin-table button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.erp-content .admin-table form { margin: 0; }
@media (max-width: 720px) {
  .erp-content .daily-table tbody td:nth-child(2)::before { content:'Naptípus: '; color:var(--grey); font-weight:400; }
  .erp-content .daily-table tbody td:nth-child(3)::before { content:'Munka: '; color:var(--grey); font-weight:400; }
  .erp-content .daily-table tbody td:nth-child(4)::before { content:'Távollét: '; color:var(--grey); font-weight:400; }
  .erp-content .daily-table tbody td:nth-child(5)::before { content:'Egyenleg: '; color:var(--grey); font-weight:400; }
}

/* v0.14: simple, single-font summaries and a nested worktime menu. */
.erp-content .balance-summary { font-family: var(--font-sans); margin-top: 16px; }
.erp-content .balance-summary p { margin: 0 0 9px; font-size: 15px; line-height: 1.6; }
.erp-content .balance-summary strong { font-family: inherit; font-size: inherit; font-weight: 700; }
/* Disclosure menu: hidden is the source of truth; JavaScript controls it. */
.nav-dropdown { position: relative; display: flex; align-items: center; height: 100%; }
.nav-dropdown-toggle.nav-link {
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; border-bottom: 2px solid transparent; background: transparent;
  font-family: var(--font-sans); line-height: normal; white-space: nowrap;
}
.nav-dropdown-toggle.nav-link.active { border-bottom-color: var(--red); }
.nav-chevron {
  display: inline-block; flex: 0 0 6px; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.nav-dropdown-toggle[aria-expanded="true"] .nav-chevron,
.mobile-dropdown-toggle[aria-expanded="true"] .nav-chevron {
  transform: translateY(2px) rotate(225deg);
}
.nav-submenu {
  position: absolute; z-index: 210; top: 100%; left: -12px;
  width: 240px; padding: 8px; background: #fff;
  border: 1px solid var(--line-strong); box-shadow: 0 12px 24px rgba(0,0,0,.1);
}
.nav-submenu:not([hidden]) { display: block; }
.nav-submenu a {
  display: block; padding: 10px 12px; font-size: 13px;
  font-weight: 500; text-decoration: none; color: var(--ink);
}
.nav-submenu a:hover, .nav-submenu a:focus-visible { background: var(--soft); color: var(--red); }
.submenu-separator { height: 1px; margin: 8px 12px; background: var(--line-strong); }
.mobile-dropdown-toggle {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 12px 0; border: 0;
  border-bottom: 1px solid rgba(85,93,96,.1);
  background: transparent; font-family: var(--font-sans);
  font-size: 18px; font-weight: 400; color: var(--ink); text-align: left;
}
.mobile-dropdown-toggle.active, .mobile-dropdown-toggle:hover { color: var(--red); }
.mobile-submenu { padding: 4px 0 12px 18px; }
.mobile-submenu:not([hidden]) { display: block; }
.mobile-nav .mobile-submenu a {
  display: block; padding: 10px 0; font-family: var(--font-sans);
  font-size: 16px; border-bottom: 0; text-decoration: none; color: var(--ink);
}
.mobile-submenu a:hover, .mobile-submenu a:focus-visible { color: var(--red); }
.mobile-submenu .submenu-separator { margin: 8px 0; }
.erp-content .admin-slice-form { border-top: 1px solid var(--line); padding-block: 16px; }
.erp-content .admin-slice-form input, .erp-content .admin-slice-form select { margin-bottom: 10px; }
.erp-content .admin-slice-form .secondary { margin-top: 8px; }
.erp-content .admin-slice-form .slice-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.erp-content .admin-slice-form .slice-actions form { display: inline-block; }
@media (max-width: 720px) {
  .erp-content .admin-slice-table tbody td:nth-child(2)::before { content: 'Projekt: '; color: var(--grey); font-weight:400; }
}
