:root {
  --bg: #f7f6f2;
  --bg-2: #efe9dd;
  --card: #ffffff;
  --card-2: #f3f1ea;
  --ink: #1e2a25;
  --muted: #6b7a72;
  --brand: #1f3a32;
  --accent: #c9a14a;
  --border: #e7e2d8;
  --shadow: 0 12px 24px rgba(31, 58, 50, 0.08);
  --space-0: clamp(4px, 0.8vw, 8px);
  --space-1: clamp(6px, 1vw, 10px);
  --space-2: clamp(10px, 2vw, 18px);
  --space-3: clamp(14px, 2.6vw, 24px);
  --space-4: clamp(18px, 3.2vw, 32px);
  --radius-0: clamp(8px, 1.2vw, 12px);
  --radius-1: clamp(10px, 1.6vw, 14px);
  --radius-2: clamp(12px, 2vw, 18px);
  --radius-3: clamp(16px, 2.6vw, 22px);
  --text-xs: clamp(10px, 1.4vw, 11px);
  --text-sm: clamp(11px, 1.6vw, 12px);
  --text-md: clamp(12px, 1.9vw, 14px);
  --text-lg: clamp(16px, 2.8vw, 22px);
  --text-xl: clamp(18px, 3.2vw, 26px);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(600px 400px at 5% 0%, rgba(31, 58, 50, 0.08), transparent 60%),
              radial-gradient(600px 400px at 95% 20%, rgba(201, 161, 74, 0.12), transparent 65%),
              linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overscroll-behavior: none;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(200px, 22vw) 1fr;
  gap: var(--space-2);
  padding: var(--space-3);
  height: var(--tg-viewport-height, 100vh);
  min-height: 100vh;
  overflow: hidden;
  max-width: 100vw;
  width: 100%;
}

.wrap > * {
  min-width: 0;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 24px rgba(31, 58, 50, 0.08);
  display: none;
  gap: 6px;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

.bottom-nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.bottom-nav-btn .icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--card-2);
  color: var(--ink);
  font-size: 14px;
}

.bottom-nav-btn.active {
  color: var(--brand);
}

.bottom-nav-btn.active .icon {
  background: rgba(31, 58, 50, 0.12);
}

.sidebar {
  background: var(--brand);
  border-radius: var(--radius-2);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow);
  color: #f6f4ef;
  min-width: 0;
}

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

.brand-mark {
  width: clamp(34px, 4.2vw, 44px);
  height: clamp(34px, 4.2vw, 44px);
  border-radius: var(--radius-1);
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--accent);
  color: #2a2212;
}

.brand-title { font-weight: 700; font-size: clamp(14px, 2vw, 17px); }

.brand-sub { font-size: var(--text-sm); color: rgba(246, 244, 239, 0.7); }

.section-title {
  color: rgba(246, 244, 239, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.menu {
  display: grid;
  gap: 8px;
}

.sidebar-periods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar .periods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar .period-btn {
  padding: 6px 10px;
  font-size: 11px;
}

.sidebar .calendar {
  margin-top: 6px;
}

.sidebar .calendar-field input {
  width: 100%;
}

.menu-btn {
  border: 1px solid transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f6f4ef;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.menu-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.14); }
.menu-btn.active { background: #f6f4ef; color: var(--brand); }

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #f6f4ef;
  font-size: 11px;
  font-weight: 600;
}

.footnote { color: rgba(246, 244, 239, 0.6); font-size: 11px; }

.main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding-right: 2px;
  min-width: 0;
}

.main > * {
  min-width: 0;
  max-width: 100%;
}

.main * {
  max-width: 100%;
}

img, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* Adaptive scale overrides */
.panel,
.dash-card,
.salary-hero,
.penalties-hero,
.meals-hero,
.conversion-hero,
.revenue-hero,
.profile-hero,
.docs-card,
.admin-card {
  border-radius: var(--radius-2);
  padding: var(--space-2);
}

.kpi,
.salary-card,
.penalties-card,
.meals-card,
.conversion-card,
.profile-row,
.admin-row,
.att-card,
.salary-item,
.penalty-item,
.meals-item,
.conv-day,
.dash-list-item {
  border-radius: var(--radius-1);
  padding: var(--space-1);
}

.btn,
.chip,
.menu-btn,
.period-btn {
  font-size: var(--text-sm);
  border-radius: 999px;
}

.panel-title,
.dash-card-title,
.salary-title,
.penalties-title,
.meals-title,
.conversion-title,
.revenue-title,
.docs-title,
.admin-title {
  font-size: var(--text-lg);
}

.panel-note,
.period-line,
.hero-sub,
.dash-sub,
.salary-bonus,
.penalties-sub,
.meals-sub,
.conversion-sub,
.revenue-sub {
  font-size: var(--text-sm);
}

.kpi-label,
.dash-card-sub,
.salary-card-label,
.penalties-card-label,
.meals-card-label,
.conversion-card-label {
  font-size: var(--text-xs);
}

.kpi-value,
.dash-card-value,
.salary-amount,
.penalties-amount,
.meals-amount,
.conversion-rate,
.revenue-amount {
  font-size: var(--text-xl);
  white-space: nowrap;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title { font-size: var(--text-lg); font-weight: 700; }
.subtitle { color: var(--muted); font-size: clamp(14px, 2.2vw, 18px); font-weight: 600; }
.period-line { font-size: var(--text-sm); color: var(--muted); margin-top: 4px; cursor: pointer; }
.top-right { display: flex; gap: 10px; flex-wrap: wrap; }
.menu-top-btn { white-space: nowrap; }

.chip {
  padding: clamp(6px, 1.3vw, 8px) clamp(8px, 1.6vw, 12px);
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  position: relative;
}

.chip-button {
  cursor: pointer;
  border: 1px solid var(--border);
}

.period-dropdown {
  position: relative;
  display: inline-flex;
}

.period-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  max-width: min(260px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: none;
  gap: 6px;
  z-index: 1200;
}

.period-menu.show {
  display: grid;
}

.period-menu-item {
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 10px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
}

.period-menu-item.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #f6f4ef;
}

.chip.loading {
  padding-right: 30px;
}

.chip.loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(31, 58, 50, 0.35);
  border-top-color: var(--brand);
  transform: translateY(-50%);
  animation: spin 0.8s linear infinite;
}

.data-loading {
  position: relative;
}

.data-loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(31, 58, 50, 0.25);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
  z-index: 5;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

.hero-left {
  background: var(--card);
  border-radius: var(--radius-2);
  padding: var(--space-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-title { font-size: 16px; font-weight: 700; }
.hero-sub { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }

.periods { display: flex; flex-wrap: wrap; gap: 8px; }

.period-btn {
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--ink);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.period-btn.active { background: var(--brand); color: #f6f4ef; border-color: var(--brand); }

.calendar {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 8px 10px;
}

.calendar.show { display: flex; }

.calendar-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.calendar-field label {
  background: rgba(255, 255, 255, 0.16);
  color: #f6f4ef;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.calendar-field input {
  padding: 7px 10px 7px 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  min-width: 140px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2355675b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
  background-repeat: no-repeat;
  background-position: 8px 50%;
}

.calendar .btn {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
}

.hero-right { display: grid; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  background: var(--card);
  border-radius: var(--radius-1);
  padding: var(--space-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.kpi.hidden { display: none; }
.kpi-grid.hidden { display: none; }
.kpi-label { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.kpi-value { font-size: clamp(16px, 2.4vw, 18px); font-weight: 700; margin-top: 6px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.dashboard { display: none; flex-direction: column; gap: 14px; }
.dashboard.show { display: flex; }

.attendance-view {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.attendance-view.show {
  display: flex;
}

.salary-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.salary-view.show {
  display: flex;
}

.premium-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.premium-view.show {
  display: flex;
}

.salary-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.salary-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
}

.salary-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.salary-amount {
  font-size: 26px;
  font-weight: 700;
  white-space: nowrap;
}

.salary-bonus {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.salary-coin {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, #f5e1b1, #c9a14a);
  display: grid;
  place-items: center;
  color: #6b4c12;
  font-weight: 700;
}

.salary-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 110px;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.salary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.salary-card-label {
  font-size: 10px;
  color: var(--muted);
}

.salary-card-value {
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
}

.salary-card.neg .salary-card-value {
  color: #a1554b;
}

.salary-toggle {
  margin-top: 6px;
  border: none;
  background: none;
  padding: 0;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.salary-expand {
  display: none;
  margin-top: 8px;
  gap: 6px;
}

.salary-expand.show {
  display: grid;
}

.salary-expand-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink);
}

.salary-expand-empty {
  font-size: 12px;
  color: var(--muted);
}

.salary-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.salary-list {
  display: grid;
  gap: 8px;
}

.salary-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.salary-item-date {
  font-size: 13px;
  font-weight: 600;
}

.salary-item-sub {
  font-size: 12px;
  color: var(--muted);
}

.salary-min-applied {
  display: inline-flex;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #e6d8ab;
  background: #fff7df;
  color: #8a6b14;
  font-size: 11px;
  font-weight: 600;
}

.salary-item-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.salary-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.salary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
}

.salary-pill strong {
  font-weight: 700;
  color: var(--ink);
}

.salary-pill.neg {
  background: #fff1f0;
  border-color: #f2d7d4;
  color: #a1554b;
}

.salary-pill.neg strong {
  color: #a1554b;
}

.salary-item-amount {
  font-weight: 700;
  white-space: nowrap;
}

.penalties-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.penalties-view.show {
  display: flex;
}

.penalties-title {
  font-size: 20px;
  font-weight: 700;
}

.penalties-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
}

.penalties-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.penalties-amount {
  font-size: 24px;
  font-weight: 700;
  color: #a1554b;
  white-space: nowrap;
}

.penalties-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.penalties-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, #f3b7ad, #d57b6f);
  display: grid;
  place-items: center;
  color: #7a3b33;
  font-weight: 700;
  font-size: 20px;
}

.penalties-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.penalties-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.penalties-card-label {
  font-size: 11px;
  color: var(--muted);
}

.penalties-card-value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  color: #a1554b;
  white-space: nowrap;
}

.penalties-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.penalties-list {
  display: grid;
  gap: 8px;
}

.penalty-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  box-shadow: var(--shadow);
}

.penalty-item > div:first-child {
  flex: 1 1 100%;
  min-width: 0;
}

.penalty-item-title {
  font-size: 13px;
  font-weight: 600;
}

.penalty-item-sub {
  font-size: 12px;
  color: var(--muted);
}

.penalty-item-amount {
  font-weight: 700;
  color: #a1554b;
  white-space: nowrap;
  margin-left: auto;
}

.penalty-empty {
  font-size: 12px;
  color: var(--muted);
}

.meals-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.meals-view.show {
  display: flex;
}

.meals-title {
  font-size: 20px;
  font-weight: 700;
}

.meals-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
}

.meals-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.meals-amount {
  font-size: 24px;
  font-weight: 700;
  color: #a1554b;
  white-space: nowrap;
}

.meals-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.meals-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, #f6e7c7, #d6b374);
  display: grid;
  place-items: center;
  color: #7a5a21;
  font-weight: 700;
  font-size: 20px;
}

.meals-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meals-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.meals-card-label {
  font-size: 11px;
  color: var(--muted);
}

.meals-card-value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  color: #a1554b;
  white-space: nowrap;
}

.meals-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.meals-list {
  display: grid;
  gap: 8px;
}

.meals-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.meals-item-title {
  font-size: 13px;
  font-weight: 600;
}

.meals-item-sub {
  font-size: 12px;
  color: var(--muted);
}

.meals-item-amount {
  font-weight: 700;
  color: #a1554b;
  white-space: nowrap;
}

.meals-empty {
  font-size: 12px;
  color: var(--muted);
}

.revenue-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.revenue-view.show {
  display: flex;
}

.revenue-title {
  font-size: 20px;
  font-weight: 700;
}

.revenue-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
}

.revenue-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.revenue-amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.revenue-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.revenue-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: radial-gradient(circle at 30% 30%, #f3e4c2, #c9a14a);
  display: grid;
  place-items: center;
  color: #6b4c12;
  font-size: 22px;
  font-weight: 700;
}

.revenue-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.revenue-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: hidden;
}

.rev-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 6px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.rev-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rev-label {
  display: none;
  font-size: 10px;
  color: var(--muted);
}

.rev-dep .rev-main {
  font-weight: 600;
}

.rev-row > div,
.conv-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rev-row.head {
  font-size: 11px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.2px;
  background: var(--card-2);
  border-radius: 10px;
  border-bottom: none;
  margin-bottom: 6px;
}

.rev-row:last-child {
  border-bottom: none;
}

.rev-delta.pos {
  color: #2f7a52;
  font-weight: 600;
}

.rev-delta.neg {
  color: #a1554b;
  font-weight: 600;
}

.rev-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rev-main {
  font-weight: 600;
  color: var(--ink);
}

.rev-sub {
  font-size: 10px;
  color: var(--muted);
}

.revenue-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 2px 0;
}

.revenue-total strong {
  color: var(--ink);
  font-size: 15px;
}

.conversion-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.conversion-view.show {
  display: flex;
}

.profile-view {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.profile-view.show {
  display: flex;
}

.profile-hero {
  background: linear-gradient(120deg, #1e4b3b, #2f6b54);
  border-radius: 18px;
  padding: 10px 16px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.profile-hero-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.profile-main {
  background: linear-gradient(160deg, #f3f7f1, #ffffff 60%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f2f0e6, #d3d9d4);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 26px;
  color: #2a3a33;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
}

.profile-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e7f2ea;
  color: #2f6b54;
  font-size: 12px;
  font-weight: 600;
}

.profile-list {
  display: grid;
  gap: 10px;
}

.profile-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
}

.profile-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e8f4ec;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.profile-row-content {
  display: grid;
  gap: 2px;
}

.profile-row-label {
  font-size: 11px;
  color: var(--muted);
}

.profile-row-value {
  font-size: 14px;
  font-weight: 600;
}

.profile-row-sub {
  font-size: 13px;
  color: var(--ink);
}

.profile-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  padding: 2px 2px 0;
}

.profile-history {
  display: grid;
  gap: 8px;
}

.profile-history-list {
  display: grid;
  gap: 8px;
}

.profile-history-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}

.profile-history-main {
  font-size: 14px;
  font-weight: 600;
}

.profile-history-sub {
  font-size: 12px;
  color: var(--muted);
}

.profile-history-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.profile-history-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 4px;
}

.admin-view {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.admin-view.show {
  display: flex;
}

.docs-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.docs-view.show {
  display: flex;
}

.feedback-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.feedback-view.show {
  display: flex;
}

.feedback-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.feedback-tab-btn {
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--muted);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.feedback-tab-btn.active {
  background: var(--brand-weak);
  color: var(--brand-ink);
  border-color: var(--brand-strong);
}

.feedback-list {
  display: grid;
  gap: 10px;
}

.feedback-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.feedback-title {
  font-size: 13px;
  font-weight: 600;
}

.feedback-sub {
  font-size: 12px;
  color: var(--muted);
}

.feedback-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--ink);
  white-space: nowrap;
}

.feedback-status.pending {
  color: #8a6a2f;
  background: #fbf1d8;
  border-color: #f0dfb4;
}

.feedback-status.approved {
  color: #2f6b54;
  background: #e7f2ea;
  border-color: #cfe3d7;
}

.feedback-status.rejected {
  color: #8a3c36;
  background: #f9e2df;
  border-color: #f0c8c4;
}

.appeal-btn {
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.att-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.appeal-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 1300;
  padding: 16px;
}

.appeal-card {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.appeal-title {
  font-size: 16px;
  font-weight: 700;
}

.appeal-form {
  display: grid;
  gap: 10px;
}

.appeal-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.appeal-field input,
.appeal-field select,
.appeal-field textarea {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: inherit;
}

.appeal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.docs-title {
  font-size: 20px;
  font-weight: 700;
}

.docs-sub {
  font-size: 12px;
  color: var(--muted);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.docs-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.docs-card.wide {
  grid-column: span 2;
}

.docs-card-title {
  font-size: 14px;
  font-weight: 600;
}

.docs-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
}

.docs-text {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

.docs-formula {
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
}

.docs-note {
  font-size: 12px;
  color: var(--muted);
}

.admin-title {
  font-size: 20px;
  font-weight: 700;
}

.admin-sub {
  font-size: 12px;
  color: var(--muted);
}

.admin-subline {
  font-size: 12px;
  color: var(--muted);
}

.admin-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.admin-section-title {
  font-size: 14px;
  font-weight: 600;
}

.admin-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-card {
  display: grid;
  gap: 8px;
}

.admin-appeals-list {
  display: grid;
  gap: 8px;
}

.admin-appeal-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.admin-appeal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-appeal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-appeal-actions .btn.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-card-title {
  font-size: 14px;
  font-weight: 700;
}

.admin-card-block {
  display: grid;
  gap: 6px;
}

.admin-card-block-title {
  font-size: 12px;
  color: var(--muted);
}

.admin-card-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.admin-card-main {
  font-size: 13px;
  font-weight: 600;
}

.admin-card-sub {
  font-size: 12px;
  color: var(--muted);
}

.admin-card-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.admin-table {
  display: grid;
  gap: 6px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 8px;
  align-items: center;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--ink);
}

.admin-row.head {
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  font-size: 11px;
}

.admin-row.two {
  grid-template-columns: 1fr 0.7fr;
}

.admin-empty {
  font-size: 12px;
  color: var(--muted);
}

.admin-form {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.8fr auto auto;
  gap: 8px;
  align-items: center;
}

.admin-form.compact {
  grid-template-columns: 1fr auto;
}

.admin-form.two-cols {
  grid-template-columns: 1fr 1fr;
}

.admin-form input,
.admin-form select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 12px;
}

.admin-form .btn {
  padding: 8px 10px;
}

.btn.mini {
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.1;
}

.admin-cell-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn.ghost {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--border);
}

.admin-sync {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.admin-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-chart {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-chart-title {
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-bar-list {
  display: grid;
  gap: 10px;
}

.admin-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.admin-bar-meta {
  display: grid;
  gap: 6px;
}

.admin-bar-label {
  font-size: 12px;
  font-weight: 600;
}

.admin-bar-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.admin-bar-track {
  height: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.admin-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1f7a5d, #63b792);
  border-radius: 999px;
}

.admin-bar-fill.alt {
  background: linear-gradient(90deg, #b58a3b, #e3c27a);
}
.conversion-title {
  font-size: 20px;
  font-weight: 700;
}

.conversion-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
}

.conversion-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}

.conversion-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.conversion-rate {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.conversion-rate.neg {
  color: #a1554b;
}

.conversion-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.conversion-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, #dff2e6, #7bbf98);
  display: grid;
  place-items: center;
  color: #1f3a32;
  font-size: 22px;
  font-weight: 700;
}

.conversion-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.conversion-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.conversion-card-label {
  font-size: 11px;
  color: var(--muted);
}

.conversion-card-value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
}

.conversion-card.pos .conversion-card-value {
  color: #2f7a52;
}

.conversion-card.neg .conversion-card-value {
  color: #a1554b;
}

.conversion-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.conversion-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
  overflow: auto;
}

.conv-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 6px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.conv-row.head {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--card-2);
  border-radius: 10px;
  border-bottom: none;
  margin-bottom: 6px;
}

.conv-row:last-child {
  border-bottom: none;
}

.conv-delta.pos {
  color: #2f7a52;
  font-weight: 600;
}

.conv-delta.neg {
  color: #a1554b;
  font-weight: 600;
}

.conversion-days {
  display: grid;
  gap: 8px;
}

.conv-day {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow);
}

.conv-day-title {
  font-size: 13px;
  font-weight: 600;
}

.conv-day-sub {
  font-size: 12px;
  color: var(--muted);
}

.conv-day-metrics {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.conv-day-metrics strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.conv-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dash-title {
  font-size: 20px;
  font-weight: 700;
}

.dash-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.dash-period {
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dash-card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
}

.dash-card.salary {
  background: linear-gradient(160deg, #f5f9f3, #ffffff 60%);
}

.dash-card.penalties {
  background: linear-gradient(160deg, #fff1f0, #ffffff 60%);
}

.dash-card.meals {
  background: linear-gradient(160deg, #fff6ed, #ffffff 60%);
}

.dash-card.premium {
  background: linear-gradient(160deg, #f9f5ea, #ffffff 60%);
}

.dash-card.conversion {
  background: linear-gradient(160deg, #f3f4fb, #ffffff 60%);
}

.dash-card.goals {
  background: linear-gradient(160deg, #eef6f8, #ffffff 60%);
}

.dash-card.cash {
  background: linear-gradient(160deg, #f5f7f6, #ffffff 60%);
}

.dash-card.pay {
  background: linear-gradient(160deg, #f1f7f0, #ffffff 60%);
}

.dash-card.full {
  grid-column: span 2;
}

.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.dash-card-title {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.dash-card-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

.dash-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.dash-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: var(--shadow);
}

.dash-card-list {
  display: grid;
  gap: 6px;
}

.dash-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--ink);
}

.dash-list-item span {
  color: var(--muted);
}

.dash-list-item .num {
  text-align: right;
  color: var(--ink);
}

.dash-list-item.conv {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  gap: 6px;
}

.dash-list-item.conv.head {
  background: var(--card-2);
  border-color: var(--border);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dash-list-item.conv.head span {
  color: var(--muted);
}


.conv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-2);
  font-weight: 700;
  font-size: 11px;
  color: var(--ink);
}

.conv-badge.pos {
  background: #e9f6ee;
  border-color: #cfe7d7;
  color: #2f7a52;
}

.conv-badge.neg {
  background: #fff1f0;
  border-color: #f2d7d4;
  color: #a1554b;
}

.conv-badge.cash {
  background: #f1f5f4;
  border-color: #dfe7e4;
  color: #47524c;
}

.dash-list-empty {
  font-size: 12px;
  color: var(--muted);
}

.goal-wrap {
  display: grid;
  gap: 10px;
}

.goal-wrap.is-loading {
  opacity: 0.65;
}

.goal-wrap.profile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.goal-caption {
  font-size: 12px;
  color: var(--muted);
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.goal-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.goal-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.goal-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.goal-item-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.goal-item-status.good {
  color: #2f7a52;
}

.goal-item-status.mid {
  color: #8a6b14;
}

.goal-item-status.low {
  color: #a1554b;
}

.goal-item-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.goal-item-values strong {
  color: var(--ink);
  font-size: 12px;
}

.goal-progress {
  height: 8px;
  border-radius: 999px;
  background: #edf2ef;
  border: 1px solid #dde7e2;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  width: 0;
  background: #b9c6c0;
  border-radius: 999px;
}

.goal-progress-fill.good {
  background: linear-gradient(90deg, #2f7a52, #63b792);
}

.goal-progress-fill.mid {
  background: linear-gradient(90deg, #a98a3e, #e0c074);
}

.goal-progress-fill.low {
  background: linear-gradient(90deg, #a1554b, #d28a7f);
}

.goal-empty {
  font-size: 12px;
  color: var(--muted);
}

.panel {
  background: var(--card);
  border-radius: var(--radius-2);
  padding: var(--space-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel.wide { grid-column: span 2; }

.panel-title { font-size: var(--text-md); font-weight: 700; margin-bottom: 10px; }
.panel-note { color: var(--muted); font-size: var(--text-sm); margin-top: 8px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.panel-actions { display: flex; gap: 10px; align-items: center; }

.panel-actions input {
  padding: clamp(6px, 1.2vw, 8px) clamp(8px, 1.4vw, 10px);
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: var(--text-md);
}

.btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #2a2212;
  font-weight: 700;
  cursor: pointer;
}

.report {
  min-height: 260px;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 520px;
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-line { padding: 2px 0; border-bottom: 1px dashed rgba(31, 58, 50, 0.08); }
.report-empty { color: var(--muted); font-style: italic; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.att-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.att-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.att-field input,
.att-field select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
}

.att-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 12.5px;
}

.att-table th,
.att-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.att-table th {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--card-2);
}

.att-table tbody tr:hover {
  background: #f7f4ee;
}

.att-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 12px 0;
}

.summary { color: var(--muted); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

.att-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.att-period-line {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.att-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.att-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: var(--shadow);
}

.att-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--card-2);
  font-size: 13px;
}

.att-kpi-value {
  font-weight: 700;
  font-size: 14px;
}

.att-kpi-label {
  font-size: 11px;
  color: var(--muted);
}

.att-periods {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.att-periods .period-btn {
  padding: 6px 10px;
  font-size: 11px;
}

.att-controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}

.att-list {
  display: grid;
  gap: 8px;
}

.att-card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.att-date {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}

.att-main {
  font-weight: 600;
  font-size: 13px;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.att-time {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  max-width: 100%;
}

.att-real-line {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink);
  opacity: .86;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.att-counted-line {
  margin-top: 4px;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.att-comment {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.att-title {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 8px;
}

.att-period-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.att-period-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--card-2);
  font-size: 12px;
}

.att-chevron {
  margin-left: auto;
  color: var(--muted);
}

.att-list {
  display: grid;
  gap: 10px;
}

.att-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: block;
}

.att-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.att-card-hours {
  font-weight: 600;
  color: var(--ink);
}

.att-card-hours .att-badge {
  margin-left: 6px;
}

.att-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.att-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
  margin-right: 6px;
}

.att-main {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.att-time {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  max-width: 100%;
}

#chartTooltip {
  position: absolute;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(31, 58, 50, 0.92);
  color: #f6f4ef;
  font-size: 12px;
  pointer-events: none;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.12s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 9999;
  white-space: nowrap;
}

#reportView { display: block; }

@media (max-width: 1024px) {
  .wrap { grid-template-columns: 1fr; padding: 18px; }
  .hero, .grid, .dash-grid-2 { grid-template-columns: 1fr; }
  .panel.wide { grid-column: span 1; }
  .dash-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .wrap { padding: 10px; gap: 10px; }
  .menu-fab { display: none; }
  .menu-top-btn { display: inline-flex; }
  .sidebar {
    padding: 10px;
    gap: 12px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(84vw, 320px);
    transform: translateX(-110%);
    transition: transform 0.2s ease;
    z-index: 1150;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open { transform: translateX(0); }
  .brand { gap: 8px; }
  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }
  .brand-title { font-size: 14px; }
  .brand-sub { display: none; }
  .section-title { display: none; }
  .sidebar-footer { display: none; }
  .menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }
  .menu-btn {
    width: 100%;
    text-align: center;
    white-space: normal;
    font-size: 11px;
    padding: 7px 8px;
  }
  .sidebar-periods {
    flex-direction: column;
  }
  .sidebar .periods {
    overflow: visible;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar .period-btn {
    flex: 1 1 auto;
    white-space: normal;
    padding: 6px 8px;
    font-size: 10px;
  }
  .top { flex-direction: column; align-items: flex-start; }
  .top-right { width: 100%; }
  .chip { font-size: 10px; padding: 6px 8px; }
  .title { font-size: 18px; }
  .subtitle { font-size: 13px; }
  .period-line { font-size: 11px; }
  .hero-sub,
  .dash-sub,
  .panel-note,
  .salary-bonus,
  .penalties-sub,
  .meals-sub,
  .conversion-sub,
  .revenue-sub,
  .docs-sub,
  .admin-sub {
    display: none;
  }
  .dash-card-sub,
  .kpi-label,
  .salary-card-label,
  .penalties-card-label,
  .meals-card-label,
  .conversion-card-label {
    font-size: 9px;
  }
  .kpi-value,
  .dash-card-value,
  .salary-amount,
  .penalties-amount,
  .meals-amount,
  .conversion-rate,
  .revenue-amount {
    font-size: 18px;
  }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .admin-appeal-head { flex-direction: column; align-items: flex-start; }
  .feedback-tabs { grid-template-columns: 1fr 1fr; }
  .feedback-tab-btn { font-size: 12px; padding: 8px 8px; }
  .hero { grid-template-columns: 1fr; }
  .hero-left { padding: 10px; }
  .hero-title { font-size: 14px; }
  .hero-sub { font-size: 11px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-card.full { grid-column: span 1; }
  .goal-grid { grid-template-columns: 1fr; }
  .att-card { grid-template-columns: 1fr; }
  .att-card > div:last-child { text-align: left; }
  .att-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .salary-hero { grid-template-columns: 1fr; }
  .salary-cards {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .penalties-hero { grid-template-columns: 1fr; }
  .penalties-cards { grid-template-columns: 1fr; }
  .meals-hero { grid-template-columns: 1fr; }
  .meals-cards { grid-template-columns: 1fr; }
  .conversion-hero { grid-template-columns: 1fr; }
  .conversion-cards { grid-template-columns: 1fr; }
  .conv-row { grid-template-columns: 1fr 1fr; }
  .conv-row.head { font-size: 10px; }
  .revenue-hero { grid-template-columns: 1fr; }
  .revenue-table { background: transparent; border: none; padding: 0; box-shadow: none; }
  .rev-row { grid-template-columns: 1fr; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; }
  .rev-row.head { display: none; }
  .rev-row:last-child { border-bottom: 1px solid var(--border); }
  .rev-label { display: block; }
  .profile-list { gap: 8px; }
  .admin-row { grid-template-columns: 1fr 1fr; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-form.compact { grid-template-columns: 1fr; }
  .admin-form.two-cols { grid-template-columns: 1fr; }
  .admin-charts { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .docs-card.wide { grid-column: span 1; }
  .bottom-nav { display: flex; }
  .main { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .table-wrap, .revenue-table, .conversion-table { overflow-x: hidden; }
  .att-table, .conversion-table, .admin-table { width: 100%; min-width: 0; table-layout: fixed; }
  .att-table th, .att-table td,
  .conversion-table th, .conversion-table td,
  .admin-table th, .admin-table td { word-break: break-word; }
  .period-menu { right: auto; left: 0; min-width: 180px; }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .chip { font-size: 11px; }
  .att-filters { gap: 8px; }
  .att-field input, .att-field select { width: 100%; }
  .salary-cards { grid-auto-columns: 84px; }
  .calendar { gap: 6px; padding: 6px 8px; }
  .calendar-field input { min-width: 120px; font-size: 11px; }
  .period-btn { font-size: 10px; padding: 6px 8px; }
}

.menu-fab {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 10px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  display: none;
  place-items: center;
  z-index: 1200;
  box-shadow: var(--shadow);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1100;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
