/*
 * Shared office stylesheet. Rebrand 2026-08-31 (owner spec): palette moves
 * to the official varnavas.gr identity — brand navy #002E6E, hover/secondary
 * #234E96, blue/white/gray only. The former gold accent is removed
 * everywhere; the historical demo-derived :root block is superseded.
 */
:root{ --navy:#002E6E; --navy2:#234E96; --bg:#eceff3; --border:#d5dbe3; --err:#c0392b; --ok:#1e7d46; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* Greek text falls back to the system sans — same stack as varnavas.gr;
     there is no Greek Poppins subset (self-hosted latin only). */
  font-family: 'Poppins', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: #222;
  min-height: 100vh;
}

.navbar {
  background: var(--navy);
  color: #fff;
  padding: 0 22px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 60;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  text-decoration: none;
}

.brand .logo {
  height: 30px;
  width: auto;
  display: block;
}

/* Full-lockup brand (owner 2026-08-31): official white wordmark, a hairline
   divider, then the product name — classic primary-logo + product pattern. */
.brand .logo-full {
  height: 34px;
  width: auto;
  display: block;
}

.brand .brand-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.35);
  flex: none;
}

.brand .brand-app {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.8px;
  line-height: 1.25;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  opacity: 0.75;
  letter-spacing: 1.5px;
}

.userchip {
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 13px;
  border-radius: 20px;
}

/* profile (2026-08-31): the chip is a link to /profile, optionally with
   the user's photo (a small round thumbnail) beside the display name */
a.userchip {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
a.userchip:hover {
  background: rgba(255, 255, 255, 0.22);
}
.userchip .chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Horizontal nav strip directly under the navy bar (rebrand 2026-08-31:
   replaces the left sidebar). Both bars are sticky — navbar at top:0
   (z-index 60), the strip right under it — so page content scrolls
   beneath them. Height is fixed at 44px: sticky offsets elsewhere
   (admin.css .tabs, wizard.css .powiz-progress) rely on 56px + 44px. */
.subnav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: #f4f5f7;
  border-bottom: 1px solid #e2e5ea;
  padding: 0 22px;
  height: 44px;
  position: sticky;
  top: 56px;
  z-index: 58;
}

.subnav-link {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #33404f;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.subnav-link:hover {
  color: var(--navy);
}

.subnav-link.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* .side-link survives as the shared inline-link style used across office
   templates (cases/review/case detail/documents); only the sidebar
   container is gone. Active accent is brand navy now, not gold. */
.side-link {
  display: block;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: #5a6572;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.side-link:hover {
  color: var(--navy);
  background: #f8fafc;
}

.side-link.active {
  color: var(--navy);
  border-left-color: var(--navy);
  background: #f6f8fb;
}

.shell-content {
  min-width: 0;
}

/* Language toggle flags (rebrand 2026-08-31): the two text buttons became
   flag buttons — same POST form, same name=lang contract. */
.flag-btn {
  border: none;
  background: transparent;
  padding: 3px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: 0.55;
}

.flag-btn img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  display: block;
}

.flag-btn:hover {
  opacity: 1;
}

.flag-btn.active {
  opacity: 1;
}

.flag-btn.active img {
  box-shadow: 0 0 0 2px #ffffff;
}

.wrap {
  max-width: 1060px;
  margin: 16px auto 70px;
  padding: 0 14px;
}

.hint {
  font-size: 11.5px;
  color: #8a94a0;
  margin-top: 3px;
}

.recovery-code-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.recovery-code {
  font-family: "Courier New", monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  background: #f6f8fb;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 46, 110, 0.06);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.btn {
  border: none;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--navy2);
}

.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid #c3ccd6;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #c3ccd6;
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--navy2);
  box-shadow: 0 0 0 3px rgba(35, 78, 150, 0.15);
}

label.fl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #33404f;
  margin: 12px 0 5px;
}

.form-error {
  color: var(--err);
  font-size: 13px;
  margin-bottom: 12px;
}

.login-wrap {
  max-width: 380px;
  margin: 90px auto;
  padding: 0 14px;
}

/*
 * Scenario-by-mandate default matrix (Plan 02-05) -- extracted verbatim
 * from demos/admin_panel_demo.html lines 60-67 (Pattern 3), the same
 * provenance convention as the :root palette block above. The sticky
 * label column keeps the mandate name legible while the scenario columns
 * scroll horizontally on a narrow viewport.
 */
.mtxwrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
}
table.mtx {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.5px;
  min-width: 760px;
}
table.mtx th,
table.mtx td {
  border: 1px solid #e7ebf0;
  padding: 7px 9px;
  text-align: center;
}
table.mtx th.lbl {
  text-align: left;
  background: #f6f8fb;
  font-weight: 600;
  color: var(--navy);
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 250px;
}
table.mtx td.lbl {
  text-align: left;
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
  font-weight: 600;
  color: #33404f;
}
table.mtx th {
  background: #f6f8fb;
  color: var(--navy);
  font-size: 11.5px;
  line-height: 1.3;
  vertical-align: bottom;
}
table.mtx input {
  width: 17px;
  height: 17px;
  accent-color: var(--navy);
  cursor: pointer;
}
table.mtx tr:hover td {
  background: #f8fafc;
}
table.mtx tr:hover td.lbl {
  background: #f2f6fb;
}

/* Narrow screens: the two-line brand cannot fit the 56px bar — keep the
   mark + firm name, drop the subtitle, tighten the chip (2026-08-31). */
@media (max-width: 760px) {
  /* Narrow screens: the full lockup collapses to logo-only. */
  .brand small { display: none; }
  .brand .brand-app { display: none; }
  .brand .brand-divider { display: none; }
  .brand .logo-full { height: 28px; }
  .userchip { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
