/* =========================================================
   PTAT — Calm Premium SaaS Design System
   ========================================================= */

:root {
  --bg: #f5f8f7;
  --bg-muted: #edf4f1;
  --surface: #ffffff;
  --surface-soft: #f9fcfb;
  --surface-tint: #f0f8f5;

  --text: #15231f;
  --text-muted: #62716c;
  --text-light: #89958f;

  --border: #dbe7e2;
  --border-strong: #c6d8d1;

  --primary: #0e7668;
  --primary-hover: #096154;
  --primary-dark: #084b42;
  --primary-soft: #ddf4ee;
  --primary-softer: #edf9f5;

  --warning: #a86205;
  --warning-hover: #8c5102;
  --warning-soft: #fff3dd;

  --danger: #b53329;
  --danger-hover: #98271f;
  --danger-soft: #fdeae8;

  --sidebar: #113d37;
  --sidebar-deep: #0b2e2a;
  --sidebar-text: #e8f3f0;
  --sidebar-muted: #aac6bf;

  --radius-sm: 9px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --shadow-xs: 0 1px 3px rgba(13, 47, 41, 0.04);
  --shadow-sm: 0 4px 14px rgba(13, 47, 41, 0.06);
  --shadow: 0 14px 36px rgba(13, 47, 41, 0.09);
  --shadow-lg: 0 28px 70px rgba(13, 47, 41, 0.16);

  --transition: 180ms ease;
}

/* =========================================================
   Alapok
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(165, 224, 208, 0.24),
      transparent 25%
    ),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

a {
  color: inherit;
}

.icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

:focus-visible {
  outline: 3px solid rgba(14, 118, 104, 0.26);
  outline-offset: 3px;
}

/* =========================================================
   Betöltés és hiba
   ========================================================= */

.boot-page {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.boot-card {
  width: min(100%, 420px);
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.boot-logo {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 16px;
  color: var(--sidebar);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: #a3e8d9;
}

.boot-loader {
  width: 26px;
  height: 26px;
  margin: 0 auto 18px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.boot-card h1 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.boot-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.standalone-page {
  min-height: 100vh;
  padding: 40px 20px;
}

.error-box {
  width: min(760px, 100%);
  padding: 22px;
  border: 1px solid #edbbb6;
  border-radius: var(--radius);
  color: var(--danger);
  background: var(--danger-soft);
}

.error-box h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.error-box p {
  margin: 0;
  line-height: 1.6;
}

/* =========================================================
   Auth / belépés / regisztráció
   ========================================================= */

.auth-page {
  display: grid;
  min-height: 100vh;
  padding: 30px;
  place-items: center;
  background:
    radial-gradient(
      circle at 5% 5%,
      rgba(151, 230, 209, 0.45),
      transparent 28%
    ),
    radial-gradient(
      circle at 95% 95%,
      rgba(188, 231, 219, 0.36),
      transparent 30%
    ),
    var(--bg);
}

.auth-shell {
  display: grid;
  width: min(1120px, 100%);
  min-height: 690px;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  border: 1px solid rgba(194, 216, 208, 0.9);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-showcase {
  display: flex;
  flex-direction: column;
  padding: 42px;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(104, 211, 188, 0.3),
      transparent 34%
    ),
    radial-gradient(
      circle at 100% 86%,
      rgba(125, 223, 196, 0.16),
      transparent 35%
    ),
    linear-gradient(145deg, var(--sidebar), var(--sidebar-deep));
}

.auth-showcase-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: var(--sidebar);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: #a3e8d9;
}

.auth-showcase-brand p {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.auth-showcase-brand span {
  display: block;
  margin-top: 4px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.auth-showcase-content {
  max-width: 430px;
  margin: auto 0;
}

.auth-showcase-label {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid rgba(163, 232, 217, 0.3);
  border-radius: 999px;
  color: #c8f1e6;
  font-size: 12px;
  font-weight: 750;
  background: rgba(163, 232, 217, 0.1);
}

.auth-showcase h1 {
  margin: 20px 0 18px;
  color: #ffffff;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.auth-showcase-content > p {
  margin: 0;
  color: #c6ddd7;
  font-size: 15px;
  line-height: 1.7;
}

.auth-benefit-list {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.auth-benefit {
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-benefit > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #a3e8d9;
  background: rgba(163, 232, 217, 0.13);
}

.auth-benefit .icon {
  width: 15px;
  height: 15px;
}

.auth-benefit p {
  margin: 0;
  color: #e2f0ec;
  font-size: 13px;
  font-weight: 550;
}

.auth-showcase-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.auth-showcase-footer .icon {
  width: 16px;
  height: 16px;
}

.auth-form-panel {
  display: grid;
  padding: 42px;
  place-items: center;
  background: rgba(255, 255, 255, 0.98);
}

.auth-form-inner {
  width: min(100%, 390px);
}

.auth-mobile-brand {
  display: none;
}

.auth-heading {
  margin-bottom: 28px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.auth-heading h1 {
  margin: 0;
  font-size: 31px;
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.page-description {
  max-width: 710px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.auth-form,
.client-form {
  display: grid;
  gap: 17px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.form-input {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  outline: none;
  background: var(--surface);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.form-input::placeholder {
  color: #a1aaa6;
}

.form-input:hover {
  border-color: #a6c9c0;
}

.form-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(14, 118, 104, 0.12);
}

.form-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}

.form-help {
  margin: -7px 0 0;
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.button:hover {
  border-color: #a8ccc2;
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(14, 118, 104, 0.22);
}

.button-primary:hover {
  border-color: var(--primary-hover);
  color: #ffffff;
  background: var(--primary-hover);
  box-shadow: 0 10px 22px rgba(14, 118, 104, 0.26);
}

.button-secondary {
  border-color: #c9e4dc;
  color: var(--primary-dark);
  background: #ffffff;
}

.button-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-softer);
}

.button-danger {
  border-color: #e7bbb6;
  color: var(--danger);
  background: var(--danger-soft);
}

.button-danger:hover {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger);
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.auth-switch p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  background: transparent;
}

.text-button:hover {
  text-decoration: underline;
}

.auth-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 26px 0 0;
  color: var(--text-light);
  font-size: 11px;
  line-height: 1.55;
}

.auth-security-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--primary);
}

.form-message {
  margin: 0 0 18px;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.form-message.success {
  border: 1px solid #b9e2d6;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.form-message.error {
  border: 1px solid #efbcb7;
  color: var(--danger);
  background: var(--danger-soft);
}

/* =========================================================
   Bejelentkezett alkalmazásváz
   ========================================================= */

.app-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 266px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 15px 16px;
  overflow-y: auto;
  color: #ffffff;
  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(91, 202, 178, 0.23),
      transparent 30%
    ),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-deep));
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 23px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: var(--sidebar);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: #a3e8d9;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar-workspace {
  margin: 18px 5px 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
}

.workspace-single {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #a3e8d9;
  background: rgba(163, 232, 217, 0.12);
}

.workspace-icon .icon {
  width: 16px;
  height: 16px;
}

.workspace-label {
  margin: 0 0 3px;
  color: var(--sidebar-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-workspace-name {
  overflow: hidden;
  margin: 0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-role {
  margin: 10px 0 0;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar-select-label {
  display: block;
  margin-bottom: 7px;
  color: var(--sidebar-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.14);
}

.sidebar-select option {
  color: var(--text);
  background: #ffffff;
}

.menu {
  display: grid;
  gap: 5px;
  margin-top: 25px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.menu-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.menu-item:active {
  transform: translateY(1px);
}

.menu-item.active {
  color: #ffffff;
  font-weight: 750;
  background: rgba(163, 232, 217, 0.18);
  box-shadow: inset 0 0 0 1px rgba(163, 232, 217, 0.08);
}

.menu-icon {
  display: grid;
  width: 20px;
  color: #afe4d6;
  place-items: center;
}

.menu-icon .icon {
  width: 17px;
  height: 17px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px 5px 0;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.user-avatar,
.topbar-profile-avatar {
  display: grid;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 850;
  background: #bcebdd;
  place-items: center;
}

.user-avatar {
  width: 31px;
  height: 31px;
}

.sidebar-user-copy {
  min-width: 0;
}

.sidebar-user,
.sidebar-user-email {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user {
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

.sidebar-user-email {
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 10px;
}

.sidebar-signout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--sidebar-muted);
  font-size: 11px;
  background: transparent;
}

.sidebar-signout:hover {
  color: #ffffff;
}

.sidebar-signout .icon {
  width: 15px;
  height: 15px;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 38px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.topbar-kicker {
  margin: 0 0 3px;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 780;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.topbar-secure .icon {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-profile-avatar {
  width: 33px;
  height: 33px;
}

.topbar-profile p,
.topbar-profile span {
  display: block;
  margin: 0;
}

.topbar-profile p {
  font-size: 12px;
  font-weight: 750;
}

.topbar-profile span {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 10px;
}

.main-content {
  width: 100%;
  max-width: 1540px;
  padding: 36px 38px 50px;
}

.page-content {
  width: 100%;
}

/* =========================================================
   Dashboard
   ========================================================= */

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  padding: 30px 32px;
  overflow: hidden;
  border: 1px solid #cde8df;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(140, 222, 198, 0.38),
      transparent 32%
    ),
    linear-gradient(135deg, #e7f8f2, #f9fdfb 65%);
}

.dashboard-hero-copy {
  max-width: 690px;
}

.dashboard-hero-copy .eyebrow {
  color: var(--primary-dark);
}

.dashboard-hero-copy .eyebrow .icon {
  width: 15px;
  height: 15px;
}

.dashboard-hero h1,
.page-hero-header h1,
.client-profile-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 790;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.dashboard-hero-copy > p:last-child {
  margin: 14px 0 0;
  color: #49645c;
  font-size: 14px;
  line-height: 1.68;
}

.dashboard-hero-actions {
  display: grid;
  justify-items: end;
  gap: 14px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #c7e5db;
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.68);
}

.hero-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a87b;
  box-shadow: 0 0 0 3px rgba(34, 168, 123, 0.14);
}

.hero-status.subtle {
  color: var(--text-muted);
  background: var(--surface);
}

.hero-status .icon {
  width: 14px;
  height: 14px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.quick-action:hover {
  border-color: #abd2c6;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.quick-action-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.quick-action-icon .icon {
  width: 19px;
  height: 19px;
}

.quick-action strong,
.quick-action small {
  display: block;
}

.quick-action strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

.quick-action small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.quick-action-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--text-light);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.metric-card {
  position: relative;
  min-height: 176px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.metric-card::after {
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  content: "";
  opacity: 0.72;
}

.metric-primary::after {
  background: #dcf4ed;
}

.metric-warning::after {
  background: #fff2dc;
}

.metric-neutral::after {
  background: #e9f0ee;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px;
}

.metric-primary .metric-icon {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.metric-warning .metric-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.metric-neutral .metric-icon {
  color: #50655e;
  background: var(--bg-muted);
}

.metric-icon .icon {
  width: 18px;
  height: 18px;
}

.metric-trend {
  color: var(--text-light);
  font-size: 10px;
  font-weight: 700;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin: 22px 0 3px;
  font-size: 34px;
  font-weight: 820;
  letter-spacing: -0.06em;
}

.metric-label {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 760;
}

.metric-help {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.focus-card,
.readiness-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.section-badge {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  background: var(--bg-muted);
}

.section-badge.success {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.focus-empty {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 22px;
  padding: 18px;
  border: 1px dashed #bdd7ce;
  border-radius: 13px;
  background: var(--surface-soft);
}

.focus-empty-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.focus-empty-icon .icon {
  width: 20px;
  height: 20px;
}

.focus-empty h3 {
  margin: 0;
  font-size: 14px;
}

.focus-empty p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.readiness-list {
  display: grid;
  gap: 11px;
  margin-top: 21px;
}

.readiness-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.readiness-item span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
}

.readiness-item.done span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.readiness-item.pending span {
  color: var(--text-light);
  background: var(--bg-muted);
}

.readiness-item .icon {
  width: 13px;
  height: 13px;
}

.readiness-item p {
  margin: 0;
}

.dashboard-alert-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.dashboard-alert {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid #f0dcb6;
  border-radius: 12px;
  background: #fffaf0;
}

.dashboard-alert.warning {
  border-color: #f0dcb6;
  background: var(--warning-soft);
}

.dashboard-alert-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--warning);
  background: rgba(255, 255, 255, 0.7);
}

.dashboard-alert-icon .icon {
  width: 16px;
  height: 16px;
}

.dashboard-alert strong,
.dashboard-alert p {
  display: block;
  margin: 0;
}

.dashboard-alert strong {
  color: var(--text);
  font-size: 12px;
}

.dashboard-alert p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.dashboard-alert a {
  display: grid;
  margin-left: auto;
  color: var(--warning);
  place-items: center;
}

.dashboard-alert a .icon {
  width: 16px;
  height: 16px;
}

/* =========================================================
   Általános oldalak és üres állapotok
   ========================================================= */

.page-hero-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.empty-state {
  padding: 52px 24px;
  border: 1px dashed #bfd7ce;
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(217, 244, 236, 0.65),
      transparent 45%
    ),
    var(--surface);
}

.empty-state-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 16px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.empty-state-icon .icon {
  width: 24px;
  height: 24px;
}

.empty-state h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.empty-state p {
  max-width: 590px;
  margin: 11px auto 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.empty-state-action {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.module-card {
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.module-card-number {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.module-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 780;
}

.module-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.page-return {
  margin-top: 20px;
}

/* =========================================================
   Ügyfélkezelés
   ========================================================= */

.client-list-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.client-tabs {
  display: flex;
  gap: 7px;
  padding: 4px;
  border-radius: 11px;
  background: var(--bg-muted);
}

.client-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  background: transparent;
}

.client-tab span {
  display: inline-grid;
  min-width: 18px;
  min-height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: var(--text-light);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.client-tab.active {
  color: var(--primary-dark);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.client-tab.active span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.client-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 310px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
}

.client-search > span {
  display: grid;
  color: var(--text-light);
}

.client-search > span .icon {
  width: 16px;
  height: 16px;
}

.client-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  outline: 0;
  font-size: 12px;
  background: transparent;
}

.client-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 118, 104, 0.1);
}

.clients-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.client-list-header,
.client-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) 120px 170px 100px;
  gap: 16px;
  align-items: center;
}

.client-list-header {
  padding: 13px 22px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-soft);
}

.client-row {
  min-height: 78px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.client-row:last-child {
  border-bottom: 0;
}

.client-row:hover {
  background: var(--surface-soft);
}

.client-primary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.client-avatar,
.client-profile-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-dark);
  font-weight: 850;
  background: var(--primary-soft);
}

.client-avatar {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.client-profile-avatar {
  width: 62px;
  height: 62px;
  font-size: 18px;
}

.client-name-link {
  color: var(--text);
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
}

.client-name-link:hover {
  color: var(--primary);
}

.client-contact {
  overflow: hidden;
  max-width: 260px;
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.client-status.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.client-status.archived {
  color: var(--text-muted);
  background: var(--bg-muted);
}

.client-date-cell p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.client-date-cell span {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 10px;
}

.client-open-button {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.client-open-button:hover {
  text-decoration: underline;
}

.client-flash {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.client-flash.success {
  border: 1px solid #b9e2d6;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.client-flash.error {
  border: 1px solid #efbcb7;
  color: var(--danger);
  background: var(--danger-soft);
}

/* =========================================================
   Modal és formok
   ========================================================= */

.client-modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 20px;
  overflow-y: auto;
  place-items: center;
  background: rgba(8, 34, 29, 0.42);
  backdrop-filter: blur(4px);
}

.client-modal {
  width: min(100%, 590px);
  margin: auto;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.pass-modal {
  width: min(100%, 620px);
}

.client-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.client-modal-header h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.client-modal-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--text-muted);
  background: var(--bg-muted);
}

.client-modal-close:hover {
  color: var(--text);
  background: #e4eeea;
}

.client-modal-close .icon {
  width: 17px;
  height: 17px;
}

.client-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.client-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.penalty-description {
  margin: -8px 0 18px;
  padding: 11px 12px;
  border: 1px solid #f0d8aa;
  border-radius: 10px;
  color: #76541c;
  font-size: 12px;
  line-height: 1.55;
  background: var(--warning-soft);
}

/* =========================================================
   Ügyfélprofil
   ========================================================= */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 750;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.client-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 25px;
}

.client-profile-identity {
  display: flex;
  align-items: center;
  gap: 15px;
}

.client-profile-identity h1 {
  margin: 0 0 10px;
}

.client-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.client-detail-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.client-detail-card h2 {
  margin: 0;
  font-size: 18px;
}

.client-detail-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.client-detail-list > div {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.client-detail-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.client-detail-list span {
  color: var(--text-light);
  font-size: 11px;
  font-weight: 750;
}

.client-detail-list strong {
  color: var(--text);
  font-size: 13px;
}

.client-next-module {
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(221, 244, 238, 0.8),
      transparent 42%
    ),
    var(--surface);
}

.client-next-module p:last-child {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

/* =========================================================
   Bérletkártyák
   ========================================================= */

.profile-section {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.pass-summary-card {
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(221, 244, 238, 0.88),
      transparent 46%
    ),
    var(--surface);
}

.client-pass-summary {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin: 22px 0 8px;
}

.client-pass-summary strong {
  color: var(--primary-dark);
  font-size: 38px;
  font-weight: 820;
  letter-spacing: -0.06em;
}

.client-pass-summary span {
  padding-bottom: 7px;
  color: var(--text-muted);
  font-size: 12px;
}

.pass-summary-card > p:last-child {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pass-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.pass-card {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.pass-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pass-card-label {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.pass-card-date,
.pass-card-client {
  display: block;
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.pass-card-client {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.pass-card-client:hover {
  text-decoration: underline;
}

.pass-status {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.pass-status.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.pass-status.low {
  color: var(--warning);
  background: var(--warning-soft);
}

.pass-status.expired,
.pass-status.depleted,
.pass-status.archived {
  color: var(--text-muted);
  background: var(--bg-muted);
}

.pass-balance {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 21px 0 12px;
}

.pass-balance strong {
  color: var(--primary-dark);
  font-size: 30px;
  font-weight: 830;
  letter-spacing: -0.05em;
}

.pass-balance span {
  color: var(--text-muted);
  font-size: 11px;
}

.pass-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfece7;
}

.pass-progress-value {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #57bba6);
}

.pass-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--text-light);
  font-size: 10px;
  line-height: 1.4;
}

/* =========================================================
   Alkalomkezelő gyorsműveletek
   ========================================================= */

.activity-actions-section {
  margin-top: 20px;
}

.activity-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.activity-action {
  display: grid;
  min-height: 148px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: left;
  background: var(--surface-soft);
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.activity-action:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.activity-action > span {
  display: grid;
  width: 35px;
  height: 35px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 10px;
}

.activity-action > span .icon {
  width: 18px;
  height: 18px;
}

.activity-action strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.activity-action small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.activity-action.primary {
  border-color: #c7e6dc;
  background: #f4fbf8;
}

.activity-action.primary > span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.activity-action.warning {
  border-color: #f0d8aa;
  background: #fffaf0;
}

.activity-action.warning > span {
  color: var(--warning);
  background: var(--warning-soft);
}

.activity-action.neutral {
  background: var(--surface-soft);
}

.activity-action.neutral > span {
  color: #50655e;
  background: var(--bg-muted);
}

/* =========================================================
   Edzés- és alkalomnapló
   ========================================================= */

.profile-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.history-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.history-card .section-heading {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.history-empty {
  padding: 24px 20px;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.session-list,
.ledger-list {
  display: grid;
}

.session-row,
.ledger-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.session-row:last-child,
.ledger-row:last-child {
  border-bottom: 0;
}

.session-row.voided {
  opacity: 0.72;
  background: #fcfafa;
}

.session-date {
  display: grid;
  flex: 0 0 auto;
  min-width: 82px;
  gap: 3px;
}

.session-date strong {
  color: var(--text);
  font-size: 11px;
}

.session-date span {
  color: var(--text-light);
  font-size: 10px;
}

.session-main,
.ledger-main {
  min-width: 0;
  flex: 1;
}

.session-main strong,
.ledger-main strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.session-main p,
.ledger-main p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.session-void-reason {
  color: var(--danger) !important;
}

.session-actions {
  display: grid;
  justify-items: end;
  gap: 7px;
  flex: 0 0 auto;
}

.session-credits {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 750;
}

.text-action {
  padding: 0;
  border: 0;
  font-size: 10px;
  font-weight: 750;
  background: transparent;
}

.text-action.danger {
  color: var(--danger);
}

.text-action:hover {
  text-decoration: underline;
}

.ledger-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
}

.ledger-icon.positive {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.ledger-icon.negative {
  color: var(--warning);
  background: var(--warning-soft);
}

.ledger-icon .icon {
  width: 15px;
  height: 15px;
}

.ledger-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 0 0 auto;
}

.ledger-side strong {
  font-size: 13px;
}

.ledger-side strong.positive {
  color: var(--primary);
}

.ledger-side strong.negative {
  color: var(--danger);
}

.ledger-side span {
  color: var(--text-light);
  font-size: 10px;
}

/* =========================================================
   Bérletek listaoldal
   ========================================================= */

.pass-list-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.pass-list-header,
.pass-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) 150px 160px 130px 90px;
  gap: 14px;
  align-items: center;
}

.pass-list-header {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-soft);
}

.pass-list-row {
  min-height: 75px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.pass-list-row:last-child {
  border-bottom: 0;
}

.pass-list-row:hover {
  background: var(--surface-soft);
}

.pass-list-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.pass-list-name:hover {
  color: var(--primary);
}

.pass-list-row p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.pass-list-row > div:nth-child(2) {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pass-list-row > div:nth-child(2) strong {
  color: var(--primary-dark);
  font-size: 16px;
}

.pass-list-row > div:nth-child(2) span,
.pass-list-row > div:nth-child(3) {
  color: var(--text-muted);
  font-size: 11px;
}

.pass-list-row > div:last-child a {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.pass-list-row > div:last-child a:hover {
  text-decoration: underline;
}

/* =========================================================
   Mobil / tablet
   ========================================================= */

@media (max-width: 1050px) {
  .auth-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-form-panel {
    min-height: 100%;
    padding: 46px 30px;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
  }

  .auth-mobile-brand > span:last-child {
    display: grid;
    gap: 3px;
  }

  .auth-mobile-brand strong {
    font-size: 16px;
    letter-spacing: -0.02em;
  }

  .auth-mobile-brand small {
    color: var(--text-muted);
    font-size: 11px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 15px;
    overflow: visible;
  }

  .sidebar-workspace,
  .sidebar-footer {
    display: none;
  }

  .brand {
    display: none;
  }

  .menu {
    display: grid;
    margin: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .menu-item {
    justify-content: center;
    min-height: 40px;
    padding: 9px 6px;
    font-size: 11px;
    text-align: center;
  }

  .menu-icon {
    display: none;
  }

  .app-topbar {
    min-height: 62px;
    padding: 0 20px;
  }

  .main-content {
    padding: 24px 20px 42px;
  }

  .quick-actions,
  .metric-grid,
  .dashboard-content-grid,
  .module-grid,
  .client-detail-grid,
  .pass-grid,
  .activity-action-grid,
  .profile-history-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero-actions {
    justify-items: start;
  }
}

@media (max-width: 850px) {
  .pass-list-header {
    display: none;
  }

  .pass-list-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .pass-list-row > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .client-list-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .client-search {
    min-width: 0;
  }

  .client-list-header {
    display: none;
  }

  .client-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .client-primary {
    grid-column: 1 / -1;
  }

  .client-row-actions {
    text-align: right;
  }

  .client-form-grid {
    grid-template-columns: 1fr;
  }

  .client-profile-header {
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .auth-page {
    padding: 0;
  }

  .auth-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .auth-form-panel {
    padding: 30px 21px;
  }

  .auth-heading h1 {
    font-size: 28px;
  }

  .menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .topbar-secure,
  .topbar-profile > div:last-child {
    display: none;
  }

  .app-topbar {
    padding: 0 15px;
  }

  .main-content {
    padding: 20px 14px 34px;
  }

  .dashboard-hero {
    padding: 24px 20px;
  }

  .dashboard-hero h1,
  .page-hero-header h1,
  .client-profile-header h1 {
    font-size: 30px;
  }

  .page-hero-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero-header .button {
    width: 100%;
  }

  .focus-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-tabs {
    width: 100%;
  }

  .client-tab {
    flex: 1;
    justify-content: center;
  }

  .client-row {
    grid-template-columns: 1fr;
  }

  .client-row-actions {
    text-align: left;
  }

  .client-form-actions {
    flex-direction: column-reverse;
  }

  .client-form-actions .button {
    width: 100%;
  }

  .session-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .session-main {
    min-width: calc(100% - 96px);
  }

  .session-actions {
    width: 100%;
    justify-items: start;
    margin-left: 82px;
  }

  .ledger-row {
    align-items: flex-start;
  }

  .ledger-side {
    min-width: 38px;
  }

  .pass-list-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Bérletelőzmények – ügyfélprofil */

.pass-empty-state {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 24px;
  border: 1px dashed #bfd7ce;
  border-radius: 13px;
  color: var(--text-muted);
  background: var(--surface-soft);
}

.pass-empty-state strong {
  color: var(--text);
  font-size: 13px;
}

.pass-empty-state span {
  font-size: 12px;
  line-height: 1.55;
}

.pass-history-details {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.pass-history-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.pass-history-details summary::-webkit-details-marker {
  display: none;
}

.pass-history-details summary::before {
  content: "›";
  margin-right: 8px;
  color: var(--primary);
  font-size: 18px;
  transition: transform var(--transition);
}

.pass-history-details[open] summary::before {
  transform: rotate(90deg);
}

.pass-history-details summary > span:first-of-type {
  margin-right: auto;
}

.pass-history-details summary > span:last-child {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 10px;
  background: var(--bg-muted);
}

.pass-history-content {
  padding: 0 16px 18px;
  border-top: 1px solid var(--border);
}

.pass-history-content > p {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pass-history-content .pass-grid {
  margin-top: 14px;
}

.pass-card.history {
  background: #fbfcfb;
  box-shadow: none;
}

.pass-card.history .pass-balance strong {
  color: var(--text-muted);
}

.pass-card.history .pass-progress {
  background: #e4ece9;
}

.pass-card.history .pass-progress-value {
  background: #aabdb6;
}
/* =========================================================
   TEENDŐK: életciklus, szerkesztés, lezárás
   ========================================================= */

.task-row-wrapper {
  border-bottom: 1px solid var(--border);
}

.task-row-wrapper:last-child {
  border-bottom: 0;
}

.task-row-wrapper .task-row {
  border-bottom: 0;
}

.task-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.task-action-button {
  padding: 5px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 750;
  background: var(--surface);
}

.task-action-button:hover {
  border-color: var(--primary);
  background: var(--primary-softer);
}

.task-action-button.complete {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.task-action-button.cancel {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #e7bbb6;
}

.task-action-panel {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.task-action-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.task-action-panel-header > div {
  display: grid;
  gap: 4px;
}

.task-action-panel-header strong {
  color: var(--text);
  font-size: 13px;
}

.task-action-panel-header span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.task-action-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--bg-muted);
}

.task-action-close:hover {
  color: var(--text);
  background: #e4eeea;
}

.task-action-form {
  display: grid;
  gap: 14px;
}

.task-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.task-action-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.task-action-summary strong {
  color: var(--text);
  font-size: 13px;
}

.task-action-summary span {
  color: var(--text-muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  .task-row-actions {
    justify-content: flex-start;
  }

  .task-action-buttons {
    flex-direction: column-reverse;
  }

  .task-action-buttons .button {
    width: 100%;
  }
}
/* =========================================================
   TEENDŐ ELŐZMÉNYEK: indoklás és visszanyitás
   ========================================================= */

.task-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.task-action-button.reopen {
  color: var(--primary-dark);
  border-color: #b9e2d6;
  background: var(--primary-soft);
}

.task-action-button.reopen:hover {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.task-history-reason {
  display: grid;
  gap: 4px;
  max-width: 520px;
  margin: 9px 0 0;
  padding: 9px 11px;
  border: 1px solid #eadfca;
  border-left: 3px solid #c69b58;
  border-radius: 8px;
  color: #6a5a42;
  font-size: 11px;
  line-height: 1.5;
  background: #fffaf1;
}

.task-history-reason strong {
  color: #795d2a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .task-history-actions {
    justify-content: flex-start;
  }

  .task-history-reason {
    padding-left: 22px;
  }
}
/* =========================================================
   TEENDŐ UX FINOMÍTÁS
   ========================================================= */

.task-page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.task-create-card {
  margin: 18px 0 22px;
  padding: 22px;
  border: 1px solid #bfe3d8;
  border-radius: var(--radius);
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(221, 244, 238, 0.9),
      transparent 42%
    ),
    var(--surface);
  box-shadow: var(--shadow-xs);
}

.task-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.task-create-header > div {
  display: grid;
  gap: 5px;
}

.task-create-header h2 {
  margin: 0;
  font-size: 19px;
}

.task-create-header p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.task-create-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--text-muted);
  background: var(--bg-muted);
}

.task-create-close:hover {
  color: var(--text);
  background: #e4eeea;
}

.task-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.task-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.task-action-button.reopen {
  color: var(--primary-dark);
  border-color: #b9e2d6;
  background: var(--primary-soft);
}

.task-action-button.reopen:hover {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.task-history-reason {
  max-width: 520px;
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
}

.task-history-reason strong {
  color: var(--text);
  font-size: 11px;
}

@media (max-width: 760px) {
  .task-page-header-actions {
    width: 100%;
  }

  .task-page-header-actions .button {
    flex: 1;
  }

  .task-create-actions {
    flex-direction: column-reverse;
  }

  .task-create-actions .button {
    width: 100%;
  }

  .task-history-actions {
    justify-content: flex-start;
  }
}
