:root {
  --bg: #f5f8fc;
  --panel: #ffffff;
  --text: #1a2433;
  --muted: #556176;
  --line: #d5dfeb;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff, #f0f6fc);
  min-height: 100vh;
}

.background-shape {
  position: fixed;
  inset: auto -12vw 68vh auto;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle at 30% 30%, #d1fae5, #bfdbfe);
  border-radius: 999px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1300px, calc(100vw - 24px));
  margin: 12px auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar"
    "sidebar content";
  gap: 14px;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: block;
  padding: 18px 16px 40px;
}

.login-card {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.landing-wrap {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.landing-topnav,
.landing-hero,
.landing-section,
.landing-anchor {
  background: #ffffffd9;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.landing-topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e2e4a;
  font-size: 28px;
}

.landing-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ff7a30;
  color: #fff;
  font-weight: 700;
}

.landing-mainnav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.landing-mainnav a {
  color: #44587a;
  text-decoration: none;
  font-weight: 500;
}

.landing-mainnav-btn {
  border: 0;
  background: transparent;
  color: #44587a;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}

.landing-solutions {
  position: relative;
}

.landing-solutions-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -140px;
  width: min(1080px, calc(100vw - 42px));
  background: #fff;
  border: 1px solid #d5deef;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(17, 31, 57, 0.14);
  padding: 0;
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  overflow: hidden;
  z-index: 30;
}

.solutions-menu-left {
  padding: 20px 16px;
  display: grid;
  gap: 8px;
}

.solutions-category {
  border: 1px solid transparent;
  background: transparent;
  color: #27395a;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
}

.solutions-category.active {
  background: #e8eef8;
  border-color: #d7e1f2;
}

.solutions-menu-center {
  padding: 22px 20px;
}

.solutions-center-panel {
  display: none;
}

.solutions-center-panel.active {
  display: grid;
  gap: 16px;
}

.solutions-center-panel article h4 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #2f4269;
}

.solutions-center-panel article p {
  margin: 0;
  color: #536889;
  font-size: 16px;
  line-height: 1.35;
}

.solutions-menu-right {
  background: #eef0fb;
  padding: 28px 20px;
}

.solutions-menu-right h4 {
  margin: 0 0 10px;
  font-size: 38px;
  color: #2f4269;
}

.solutions-menu-right p {
  margin: 0;
  font-size: 18px;
  color: #506286;
  line-height: 1.35;
}

.landing-phone {
  margin-left: auto;
  color: #4a5f81;
  font-weight: 700;
  white-space: nowrap;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-cta-contact {
  background: #ff7a30;
  border-color: #ff7a30;
  color: #fff;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 44px 24px 128px;
  min-height: 520px;
}

.hero-chip-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hero-chip {
  border: 1px solid #cfd9ea;
  background: #f1f5fc;
  color: #8395b3;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

.landing-hero h2 {
  margin: 8px auto 14px;
  max-width: 820px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1;
  color: #1f2b4f;
}

.landing-subtitle {
  margin: 0 auto;
  color: #536889;
  font-size: 20px;
  max-width: 860px;
}

.landing-subtitle.centered {
  text-align: center;
  margin-bottom: 14px;
}

.landing-cta {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.landing-cta-demo {
  background: #ff7a30;
  border-color: #ff7a30;
  color: #fff;
  font-size: 20px;
  padding: 14px 24px;
  border-radius: 16px;
  font-weight: 700;
}

.landing-proof {
  margin: 14px 0 0;
  color: #516482;
  font-size: 18px;
  font-weight: 700;
}

.hero-floating {
  position: absolute;
  border-radius: 999px;
  opacity: 0.72;
}

.hero-floating-left {
  width: 380px;
  height: 280px;
  left: -120px;
  top: 180px;
  background: #ffc7a6;
}

.hero-floating-right {
  width: 420px;
  height: 320px;
  right: -140px;
  top: 210px;
  background: #ffd8c2;
}

.landing-section h3 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 54px);
  text-align: center;
  color: #1f2b4f;
}

.landing-section {
  padding: 24px;
}

.landing-solution-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.solution-tab {
  border: 1px solid #cdd8ea;
  background: #e9eff8;
  color: #4f5f7e;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.solution-tab.active {
  background: #2f4269;
  border-color: #2f4269;
  color: #fff;
}

.landing-solution-panels {
  margin: 0 auto;
  width: min(980px, 100%);
}

.solution-panel {
  display: none;
  border: 1px solid #d3deef;
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  min-height: 200px;
}

.solution-panel.active {
  display: block;
}

.solution-panel h4 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 38px);
  color: #1f2b4f;
}

.solution-panel p {
  margin: 0;
  font-size: 18px;
  color: #4b5f7f;
  line-height: 1.5;
}

.landing-grid {
  display: none;
}

.landing-card {
  display: none;
}

.landing-card h4 {
  margin: 0 0 6px;
  font-size: 17px;
}

.landing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.pricing-card {
  border: 1px solid #d3deef;
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}

.pricing-card.featured {
  border-color: #0f766e;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.16);
}

.pricing-badge {
  margin: 0 0 8px;
  display: inline-block;
  background: #0f766e;
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}

.pricing-card h4 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #1f2b4f;
}

.price {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 700;
  color: #22345a;
}

.price span {
  font-size: 14px;
  color: var(--muted);
}

.pricing-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #233047;
  font-size: 16px;
}

.hero-widget {
  position: absolute;
  background: #fff;
  border: 1px solid #d6e1f1;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  text-align: left;
  width: 260px;
}

.hero-widget h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #1f2b4f;
}

.hero-widget p {
  margin: 0;
  font-size: 13px;
  color: #5a6f90;
}

.hero-widget-profile {
  top: 170px;
  left: 36px;
}

.hero-widget-wallet {
  left: 72px;
  bottom: 40px;
}

.hero-widget-calendar {
  top: 210px;
  right: 70px;
}

.landing-footnote {
  text-align: center;
}

.landing-footnote p {
  margin: 0;
  color: #4f6487;
  font-size: 16px;
}

.landing-anchor {
  display: none;
}

.sidebar {
  grid-area: sidebar;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  height: calc(100vh - 24px);
  position: sticky;
  top: 12px;
  overflow: auto;
}

.brand {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar-company {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sidebar-company span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: 22px;
}

.menu {
  margin: 12px 0;
  display: block;
}

.sidebar-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: none;
}

.sidebar-section.is-active-submenu {
  display: block;
}

.sidebar-section-summary {
  display: none;
  list-style: none;
  padding: 0;
  cursor: default;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  align-items: center;
  justify-content: space-between;
}

.sidebar-section-summary::-webkit-details-marker {
  display: none;
}

.sidebar-section-summary::after {
  content: '▾';
  font-size: 11px;
  color: var(--muted);
}

.sidebar-section:not([open]) .sidebar-section-summary::after {
  transform: rotate(-90deg);
}

.sidebar-section-items {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.menu-link {
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.menu-link.active {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.menu-link:focus-visible,
.sidebar-section-summary:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 1px;
}

.menu-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  padding: 0 6px;
}

.sidebar-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sidebar-footer .btn {
  width: 100%;
}

.context-box {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 8px;
}

.context-box h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.api-target {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.context-box .btn {
  width: 100%;
}

.api-target code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}

.content {
  grid-area: content;
  display: block;
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: #ffffffd9;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.topbar-brand {
  display: grid;
  gap: 2px;
  padding-right: 14px;
  margin-right: 8px;
  border-right: 1px solid var(--line);
}

.topbar-brand .eyebrow {
  margin: 0;
}

.topbar-brand strong {
  font-size: 20px;
  line-height: 1.1;
}

.hidden-context {
  display: none;
}

.top-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-menu {
  position: relative;
  margin-left: auto;
}

.profile-avatar-btn {
  border: 0;
  background: transparent;
  padding: 2px;
  border-radius: 999px;
  cursor: pointer;
}

.profile-avatar-btn:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 1px;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0f766e;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 25;
  display: grid;
  gap: 4px;
}

.profile-menu-identity {
  margin: 0 0 4px;
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.profile-menu-item {
  border: 1px solid transparent;
  background: #fff;
  color: #0f172a;
  text-align: left;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.profile-menu-item:hover {
  background: #f3f7fd;
}

.profile-menu-item.danger {
  color: #991b1b;
}

.top-menu-link {
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.top-menu-link.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  font-size: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

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

.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.kpi span {
  font-size: 12px;
  color: var(--muted);
}

.kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.form {
  display: grid;
  gap: 10px;
  max-width: 640px;
}

.compact-form {
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: #0f172a;
}

input:focus,
select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.toolbar {
  display: flex;
  gap: 8px;
  width: min(100%, 760px);
}

.toolbar input {
  flex: 1;
}

.btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn.ghost {
  background: #eef6f5;
  color: #134e4a;
}

.btn.danger {
  background: var(--danger);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
}

.cards-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.console-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.console-sidebar {
  height: fit-content;
  position: sticky;
  top: 12px;
}

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

.console-menu-link {
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.console-menu-link.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.console-pane {
  display: none;
}

.console-pane.active {
  display: block;
}

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

.ta-main {
  min-width: 0;
}

.ta-sidebar {
  height: fit-content;
  position: sticky;
  top: 12px;
}

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

.ta-menu-link {
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.ta-menu-link.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.ta-pane {
  display: none;
}

.ta-pane.active {
  display: block;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.mini-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-text {
  margin: 0;
  color: var(--muted);
}

.contract-editor-shell {
  height: 72vh;
  min-height: 640px;
  max-height: 900px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  background: #eef2f9;
  padding: 10px;
  overflow: auto;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  position: sticky;
  top: 0;
  z-index: 25;
  background: #eef2f9;
  border: 1px solid #d7deea;
  border-radius: 10px;
  padding: 8px;
}

.toolbar-icon-btn {
  width: 38px;
  height: 34px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-icon-btn:hover {
  border-color: #64748b;
  background: #f8fafc;
}

.toolbar-icon-btn:active {
  transform: translateY(1px);
}

.toolbar-icon-btn:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 1px;
}

.contract-template-editor {
  min-height: 0;
  border: none;
  border-radius: 0;
  padding: 8px 0 12px;
  background: transparent;
  overflow: visible;
}

.contract-template-editor:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  outline-offset: 2px;
}

.contract-template-editor .contract-page {
  position: relative;
  width: min(794px, calc(100% - 16px));
  height: 1123px;
  min-height: 1123px;
  margin: 0 auto 22px;
  background: #fff;
  border: 1px solid #d7deea;
  border-radius: 6px;
  padding: 56px 52px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}

.template-draggable {
  position: absolute;
  min-width: 120px;
  max-width: 85%;
  border: 1px dashed #94a3b8;
  background: rgba(248, 250, 252, 0.92);
  border-radius: 6px;
  padding: 6px;
  z-index: 5;
}

.template-block-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 8;
}

.template-remove-btn {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
}

.template-remove-btn:hover {
  background: #ffe4e6;
}

.template-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #334155;
  background: #e2e8f0;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: move;
  user-select: none;
  margin-bottom: 6px;
}

.template-draggable.logo-block {
  width: 220px;
  max-width: none;
  padding-bottom: 14px;
}

.template-draggable.logo-block img {
  display: block;
  width: 100%;
  max-width: none;
  max-height: 220px;
  object-fit: contain;
}

.template-resize-handle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #475569;
  border-bottom: 2px solid #475569;
  cursor: nwse-resize;
  z-index: 8;
}

.template-draggable.text-block .text-content {
  min-height: 40px;
  outline: none;
  padding: 4px;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 4px;
}

.contract-template-editor .contract-page:last-child {
  margin-bottom: 8px;
}

.contract-template-editor .contract-page-break {
  width: min(794px, calc(100% - 16px));
  margin: 0 auto 22px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  border-top: 1px dashed #94a3b8;
  padding-top: 8px;
  user-select: none;
}

@media print {
  .contract-template-editor {
    background: #fff;
    border: none;
    padding: 0;
  }
  .contract-template-editor .contract-page {
    width: 100%;
    min-height: auto;
    border: none;
    box-shadow: none;
    margin: 0;
    page-break-after: always;
  }
  .contract-template-editor .contract-page-break {
    display: none;
  }
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.time-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.time-actions .section-text {
  margin-right: 8px;
}

.expense-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.expense-summary .mini-card {
  padding: 10px 12px;
}

.expense-summary .mini-card h4 {
  margin-bottom: 6px;
  font-size: 13px;
}

.expense-summary .mini-card p {
  font-size: 16px;
  color: #0f172a;
  font-weight: 700;
}

.panel-collapse {
  margin-top: 10px;
}

.panel-collapse summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #0f172a;
  padding: 8px 0;
}

.panel-collapse summary::-webkit-details-marker {
  display: none;
}

.panel-collapse summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
  transition: transform 120ms ease;
}

.panel-collapse[open] summary::before {
  transform: rotate(90deg);
}

.vat-custom {
  transition: opacity 120ms ease;
}

.submit-hint.error {
  color: var(--danger);
}

#manager-pane-my-timesheet #managerTimesheetForm,
#manager-pane-my-timesheet #managerTimesheetEntryForm,
#employee-pane-my-timesheet #employeeTimesheetForm,
#employee-pane-my-timesheet #employeeTimesheetEntryForm {
  display: none;
}

#manager-pane-my-timesheet .time-actions .section-text,
#employee-pane-my-timesheet .time-actions .section-text {
  display: none;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-nav strong {
  min-width: 170px;
  text-align: center;
}

.timesheet-calendar {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.sheet-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 260px;
}

.sheet-mini-calendar {
  border-right: 1px solid var(--line);
  background: #eef3f8;
  padding: 14px;
}

.sheet-mini-calendar h4 {
  margin: 0;
  text-transform: capitalize;
  font-size: 17px;
}

.mini-month-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.mini-month-nav .btn {
  min-width: 34px;
  padding: 4px 8px;
}

.mini-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
}

.mini-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.mini-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 4px;
  font-size: 11px;
  color: #64748b;
  background: #fff;
}

.mini-grid span.has-data {
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 600;
}

.sheet-main {
  overflow-x: auto;
  background: #fff;
}

.sheet-week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.sheet-week-nav strong {
  min-width: 170px;
  text-align: center;
  font-size: 14px;
}

.sheet-total-actions {
  margin-bottom: 6px;
}

.project-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: grid;
  place-items: center;
  z-index: 40;
}

.project-picker-modal {
  width: min(460px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.project-picker-modal h4 {
  margin: 0;
}

.project-picker-modal label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.project-picker-modal input,
.project-picker-modal select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}

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

.sheet-table {
  min-width: 900px;
  border-collapse: collapse;
}

.sheet-table th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #475569;
  background: #eef2f7;
  border-bottom: 1px solid var(--line);
}

.sheet-table td {
  border-bottom: 1px solid #e8edf3;
  border-right: 1px solid #f1f5f9;
  vertical-align: top;
}

.sheet-table td:last-child,
.sheet-table th:last-child {
  border-right: 0;
}

.sheet-day-cell {
  min-width: 60px;
  padding: 2px;
  background: #fcfdff;
}

.sheet-project-cell {
  min-width: 220px;
  padding: 8px;
  background: #f8fafc;
  display: flex;
  gap: 8px;
  align-items: center;
}

.sheet-project-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-day-cell.is-weekend {
  background: #f1f5f9;
}

.sheet-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 4px;
}

.sheet-weekday {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
}

.sheet-daynum {
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
}

.day-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 4px;
  background: #fff;
  font-size: 10px;
  height: 24px;
}

.sheet-empty {
  background: #f8fafc;
}

.mini-grid .mini-empty {
  background: transparent;
}

.mini-day-btn {
  border: 0;
  cursor: pointer;
}

.mini-day-btn.is-weekend {
  background: #e2e8f0;
  color: #475569;
}

.mini-day-btn.has-data {
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 600;
}

.mini-day-btn.is-weekend.has-data {
  background: #cbd5e1;
  color: #334155;
}

.mini-day-btn.active {
  outline: 2px solid #0ea5e9;
  outline-offset: -1px;
}

.sheet-week-total {
  width: 100px;
  text-align: right;
  font-weight: 700;
  font-size: 13px;
  background: #f8fafc;
}

.code-block {
  margin: 0;
  border-radius: 10px;
  border: 1px solid #d6e0ec;
  background: #f8fbff;
  color: #243041;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  padding: 12px;
  white-space: pre;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

th {
  color: var(--muted);
  background: #f8fbff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

.status.active {
  background: #d1fae5;
  color: #065f46;
}

.status.pre_hire {
  background: #e0f2fe;
  color: #075985;
}

.status.suspended {
  background: #fef3c7;
  color: #92400e;
}

.status.terminated {
  background: #fee2e2;
  color: #991b1b;
}

.status.submitted {
  background: #e0f2fe;
  color: #075985;
}

.status.draft {
  background: #e2e8f0;
  color: #334155;
}

.status.in_review {
  background: #fef3c7;
  color: #92400e;
}

.status.applied,
.status.approved {
  background: #d1fae5;
  color: #065f46;
}

.status.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status.locked {
  background: #e5e7eb;
  color: #374151;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.inline-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 6px;
}

.inline-link {
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  font-size: 20px;
  line-height: 1;
  border-radius: 8px;
  background: #eef6f5;
}

.actions-cell {
  white-space: nowrap;
}

.icon-btn {
  min-width: 34px;
  padding: 6px 7px;
  font-size: 14px;
  line-height: 1;
  margin-right: 4px;
}

.danger-outline {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff5f5;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f8fffd;
}

pre {
  margin: 0;
  border-radius: 12px;
  border: 1px solid #1f2937;
  background: #0b1222;
  color: #c7f9cc;
  font-family: 'IBM Plex Mono', monospace;
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
}

.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #0f172a;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
  pointer-events: none;
  z-index: 9;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}

.modal-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}

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

.modal-head h3 {
  margin: 0;
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "sidebar"
      "content";
    width: min(1200px, calc(100vw - 16px));
  }

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-topnav {
    gap: 12px;
  }

  .landing-mainnav {
    display: none;
  }

  .landing-phone {
    display: none;
  }

  .hero-widget {
    display: none;
  }

  .landing-hero {
    min-height: auto;
    padding-bottom: 34px;
  }

  .solution-tab {
    font-size: 15px;
  }

  .ta-layout {
    grid-template-columns: 1fr;
  }

  .ta-sidebar {
    position: relative;
    top: 0;
  }

  .ta-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console-layout {
    grid-template-columns: 1fr;
  }

  .console-sidebar {
    position: relative;
    top: 0;
  }

  .console-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-layout {
    grid-template-columns: 1fr;
  }

  .sheet-mini-calendar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .kpis {
    grid-template-columns: 1fr;
  }

  .landing-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .landing-topnav {
    flex-wrap: wrap;
  }

  .landing-actions {
    width: 100%;
    margin-left: 0;
  }

  .landing-actions .btn {
    flex: 1;
    text-align: center;
  }

  .hero-chip-row {
    flex-wrap: wrap;
  }

  .landing-hero h2 {
    font-size: clamp(34px, 10vw, 52px);
  }

  .landing-subtitle {
    font-size: 16px;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  h2 {
    font-size: 20px;
  }

  .sheet-table {
    min-width: 780px;
  }
}

.tab-inline-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.payroll-config-pane {
  display: none;
}

.payroll-config-pane.active {
  display: block;
}

.config-preview {
  background: #0b1220;
  color: #dbeafe;
  padding: 10px;
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
  margin-bottom: 12px;
}
