@font-face {
  font-family: "Lato";
  src: url("./assets/brand/Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Lato";
  src: url("./assets/brand/Lato-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Lato";
  src: url("./assets/brand/Lato-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
}

:root {
  --bg: #f3f3f1;
  --bg-deep: #222321;
  --panel: rgba(255, 255, 255, 0.97);
  --panel-soft: #f6f4ef;
  --line: #ded9ce;
  --line-strong: #cfc6b7;
  --text: #242420;
  --muted: #69675f;
  --nav: #262723;
  --nav-light: #b8b5ad;
  --brand: #f27b24;
  --brand-rgb: 242, 123, 36;
  --brand-strong: #d96712;
  --brand-soft: #fff0e4;
  --secondary: #454843;
  --secondary-rgb: 69, 72, 67;
  --secondary-soft: #ece9e3;
  --vacation: #f27b24;
  --holiday: #636861;
  --absence: #be4338;
  --danger: #b9372d;
  --success: #2d8b57;
  --shadow: 0 20px 48px rgba(27, 24, 17, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Lato", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(var(--brand-rgb), 0.16), transparent 24%),
    linear-gradient(180deg, #faf8f3 0%, #f2f1ec 100%);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(34, 35, 33, 0.98) 0%, rgba(34, 35, 33, 0.9) 56%, rgba(var(--brand-rgb), 0.12) 100%),
    linear-gradient(180deg, #2d2d29 0%, #181916 100%);
  padding: 32px 20px;
}

.login-card {
  width: min(1180px, 100%);
  min-height: 620px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
}

.login-brand-panel {
  position: relative;
  padding: 56px 52px;
  background:
    linear-gradient(140deg, rgba(34, 35, 33, 0.9) 0%, rgba(34, 35, 33, 0.58) 100%),
    linear-gradient(180deg, #2b2c29 0%, #181916 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.login-brand-panel::before,
.panel::before,
.simple-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(124deg, transparent 22%, rgba(255, 255, 255, 0.08) 22%, rgba(255, 255, 255, 0.08) 28%, transparent 28%, transparent 44%, rgba(var(--brand-rgb), 0.16) 44%, rgba(var(--brand-rgb), 0.16) 51%, transparent 51%);
  opacity: 0.8;
}

.panel::before,
.simple-header::before {
  display: none;
}

.login-brand-panel > * {
  position: relative;
  z-index: 1;
}

.login-form-panel {
  padding: 54px 52px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.login-form-panel .request-form {
  padding: 0;
}

.login-company-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.login-company-name {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
}

.login-brand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.connexa-logo-login {
  width: 190px;
  height: auto;
  display: block;
  opacity: 0.85;
}

.connexa-logo-sidebar {
  width: 148px;
  height: auto;
  display: block;
  opacity: 0.92;
}

.brand-mark {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  position: relative;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.28), rgba(var(--brand-rgb), 0.12));
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.brand-mark.small {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.2), rgba(var(--brand-rgb), 0.08));
  border-color: rgba(var(--brand-rgb), 0.18);
}

.brand-text {
  font-size: 2.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #232320;
}

.login-brand-panel .brand-text {
  color: #ffffff;
}

.simple-brand .brand-text {
  font-size: 1.7rem;
}

.nav-brand-textonly {
  display: block;
}

.brand-subtitle {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.08rem;
  max-width: 24rem;
}

.brand-subtitle-highlight {
  margin-top: 16px;
  color: #ffffff;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.login-company-brand {
  margin-top: 10px;
}

.login-company-logo {
  width: 180px;
  height: 90px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
}

.login-company-logo-fallback {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.company-brand-block {
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.company-brand-logo {
  height: 78px;
  min-height: 78px;
  max-height: 78px;
  border-radius: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

.company-brand-logo-fallback {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.company-brand-meta .section-kicker {
  margin-bottom: 6px;
  font-size: 0.66rem;
  opacity: 0.85;
}

.company-brand-meta strong {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.brand-kicker {
  color: rgba(var(--brand-rgb), 0.84);
}

.bolt-shape {
  width: 34px;
  height: 52px;
  display: block;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.72) 0%, var(--brand) 100%);
  clip-path: polygon(48% 0, 88% 0, 58% 40%, 100% 40%, 26% 100%, 46% 58%, 0 58%);
  transform: skew(-8deg);
  filter: drop-shadow(0 6px 10px rgba(var(--brand-rgb), 0.34));
}

.brand-hero,
.brand-hero::before,
.brand-hero-card,
.brand-hero-icon,
.small-bolt {
  display: none;
}

.login-title {
  font-size: 3rem;
  margin: 0 0 20px;
  color: #171714;
  letter-spacing: -0.02em;
}

.login-version {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remember-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-strong);
  font-weight: 600;
}

.remember-toggle input {
  width: auto;
}

.app-shell {
  min-height: 100vh;
  padding: 0;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.side-nav {
  background:
    linear-gradient(180deg, rgba(34, 35, 33, 0.98) 0%, rgba(24, 25, 22, 0.98) 100%);
  color: #f2efe8;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  min-height: 100vh;
}

.side-brand {
  padding: 6px 4px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 14px;
}

.nav-brand .brand-text,
.nav-brand .hero-copy {
  color: #fff;
}

.nav-brand {
  align-items: flex-start;
  gap: 12px;
  margin-top: 0;
}

.nav-brand .brand-mark.small {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  flex: 0 0 auto;
}

.nav-brand .brand-text {
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.03em;
}

.nav-brand .hero-copy {
  margin-top: 8px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.84);
}

.brand-fixed-slogan {
  color: #ffffff;
  font-weight: 800;
  margin-top: 6px;
}

.nav-tree {
  display: grid;
  align-content: start;
  gap: 10px;
}

.menu-footer-brand {
  padding: 16px 4px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
}

.brand-footer-lockup {
  padding: 0 2px;
  margin-left: 0;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-submenu {
  display: grid;
  gap: 8px;
  margin-left: 18px;
  padding: 6px 0 4px 18px;
  border-left: 1px solid rgba(var(--brand-rgb), 0.28);
}

.nav-link,
.nav-sublink,
.topbar-tab {
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ded8cb;
  padding: 14px 16px;
  border-radius: 16px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.nav-link-subtle {
  margin-top: -6px;
  margin-left: 14px;
  width: calc(100% - 14px);
  opacity: 0.88;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-sublink:hover {
  transform: translateX(1px);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.26) 0%, rgba(var(--brand-rgb), 0.12) 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.18);
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.72) 0%, var(--brand) 100%);
}

.nav-link-group[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-link-group {
  justify-content: space-between;
}

.nav-caret {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  transition: transform 0.18s ease;
}

.nav-link-group[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.nav-icon {
  width: 20px;
  min-width: 20px;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-icon i {
  font-size: 20px;
  line-height: 1;
}

.nav-sublink {
  color: #c8c2b6;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.98rem;
  line-height: 1.25;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-sublink.active {
  background: rgba(var(--brand-rgb), 0.12);
  color: #fff;
}

.nav-sublink:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.workspace-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.content-shell {
  padding: 20px 22px 28px;
  display: grid;
  gap: 20px;
}

.content-section {
  display: block;
}

.workspace-intro .panel-heading {
  padding-bottom: 8px;
}

.workspace-role-banner {
  padding: 0 20px 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-alerts {
  position: relative;
}

.topbar-alerts-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(var(--brand-rgb), 0.08);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
}

.topbar-alerts-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.topbar-alerts-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(var(--brand-rgb), 0.16);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.82rem;
}

.topbar-alerts-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-height: 360px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(12, 18, 28, 0.12);
  padding: 12px;
  z-index: 30;
  display: grid;
  gap: 10px;
}

.topbar-alert-item {
  border: 1px solid rgba(var(--brand-rgb), 0.12);
  background: rgba(var(--brand-rgb), 0.06);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.topbar-alert-item small {
  color: var(--muted);
}

.topbar-date-block {
  display: grid;
  gap: 2px;
}

.topbar-current-day {
  font-weight: 800;
  color: #262723;
  text-transform: capitalize;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

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

.logged-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.2), rgba(var(--brand-rgb), 0.44));
  color: #7b3000;
  font-weight: 900;
}

.logged-user-label {
  color: #a0a4ac;
  font-size: 0.78rem;
}

.logged-user-name {
  font-weight: 700;
  color: #262723;
}

.simple-header {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  overflow: hidden;
}

.simple-header > * {
  position: relative;
  z-index: 1;
}

.simple-brand,
.simple-userbar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.simple-userbar {
  justify-content: flex-end;
}

.simple-shell {
  max-width: 1360px;
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #b29782;
  font-weight: 900;
}

.hero-copy,
.muted {
  color: var(--muted);
}

.stack-layout {
  display: grid;
  gap: 20px;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, rgba(var(--brand-rgb), 0.56) 48%, transparent 100%);
}

.wide-panel {
  width: 100%;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 18px 20px 12px;
}

.panel-heading-lined {
  border-bottom: 1px solid var(--line);
}

.panel h2,
label {
  margin: 0;
  color: #1d1c19;
  font-weight: 700;
}

.request-form,
.team-summary,
.stack-list {
  display: grid;
  gap: 14px;
  padding: 0 20px 20px;
}

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

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #ebe3d6;
  padding: 14px 16px;
  background: #fbf9f4;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(var(--brand-rgb), 0.18);
  border-color: var(--brand);
}

textarea {
  resize: vertical;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.28);
}

.primary-button:hover {
  box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.36);
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--line-strong);
}

.ghost-button:hover {
  background: var(--secondary-soft);
}

.ghost-button.compact {
  padding: 8px 12px;
}

.form-summary,
.empty-state {
  border-radius: 12px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

.form-summary:empty {
  display: none;
}

.warning {
  color: var(--danger);
  font-weight: 700;
}

.person-card,
.request-card,
.event-card {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px;
}

.person-card header,
.request-card header,
.event-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.meta-pill,
.type-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.meta-pill {
  background: #fff1e4;
  color: var(--brand-strong);
}

.type-vacation {
  background: rgba(var(--brand-rgb), 0.14);
  color: var(--vacation);
}

.type-holiday {
  background: rgba(99, 104, 97, 0.14);
  color: var(--holiday);
}

.type-absence {
  background: rgba(190, 67, 56, 0.12);
  color: var(--absence);
}

.type-generic {
  background: rgba(99, 104, 97, 0.12);
  color: var(--secondary);
}

.status-pending {
  background: rgba(var(--brand-rgb), 0.14);
  color: var(--brand-strong);
}

.status-approved {
  background: rgba(45, 139, 87, 0.14);
  color: var(--success);
}

.status-rejected {
  background: rgba(216, 75, 97, 0.14);
  color: var(--danger);
}

.small-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.approve-button {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.approve-button:hover {
  background: var(--brand-strong);
}

.reject-button {
  background: #fff2f0;
  color: var(--danger);
  border-color: rgba(185, 55, 45, 0.18);
}

.reject-button:hover {
  background: #ffe8e5;
}

.edit-button {
  background: var(--secondary-soft);
  color: var(--text);
  border-color: var(--line);
}

.edit-button:hover {
  background: #e0dbd4;
}

.calendar-header {
  align-items: center;
}

.calendar-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.calendar-title {
  min-width: 220px;
  text-align: center;
  font-weight: 900;
  color: #1d1c19;
}

.calendar-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 18px;
  padding: 0 20px 20px;
}

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

.side-summary {
  padding: 0;
  align-content: start;
}

.calendar-weekday {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #a59077;
  font-weight: 900;
  padding: 6px;
}

.calendar-day {
  min-height: 144px;
  border-radius: 14px;
  background: #fcfbf8;
  border: 1px solid var(--line);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.calendar-day.is-other-month {
  opacity: 0.48;
}

.calendar-day.is-today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.14);
}

.calendar-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.calendar-day-number {
  font-weight: 700;
  font-size: 1rem;
}

.calendar-day-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.calendar-events {
  display: grid;
  gap: 8px;
}

.calendar-chip {
  border-radius: 10px;
  padding: 8px 10px;
  color: white;
  font-size: 0.82rem;
  line-height: 1.2;
}

.calendar-chip.vacation {
  background: var(--vacation);
}

.calendar-chip.holiday {
  background: var(--holiday);
}

.calendar-chip.absence {
  background: var(--absence);
}

.calendar-chip.generic {
  background: var(--secondary);
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 0 20px 20px;
}

.support-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fcfbf8;
  display: grid;
  gap: 12px;
}

.module-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 20px;
}

.module-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.support-card-wide {
  grid-column: 1 / -1;
}

.support-card h3 {
  margin: 0;
}

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

.compact-button {
  padding: 10px 14px;
  white-space: nowrap;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.support-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.support-table thead {
  background: linear-gradient(90deg, var(--brand-strong) 0%, var(--brand) 100%);
  color: #fff;
}

.support-table th,
.support-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.support-table tbody tr:hover {
  background: #fff6ee;
}

.support-table td.center,
.support-table th.center {
  text-align: center;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 18px 20px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
  color: var(--text);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.chart-shell {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  padding: 18px;
}

.mini-bars {
  display: grid;
  gap: 14px;
}

.mini-bar-item {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  gap: 14px;
  align-items: center;
}

.mini-bar-label {
  color: var(--text);
  font-size: 0.95rem;
}

.mini-bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.12);
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), rgba(var(--brand-rgb), 0.65));
}

.support-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  flex-shrink: 0;
}

.support-icon-button svg {
  display: block;
}

.support-icon-button:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: rgba(var(--brand-rgb), 0.22);
}

.support-icon-button.danger {
  color: var(--muted);
}

.support-icon-button.danger:hover {
  background: #fff2f0;
  color: var(--danger);
  border-color: rgba(185, 55, 45, 0.2);
}

.support-row {
  display: grid;
  gap: 10px;
  align-items: center;
}

.support-row-permissions label,
.support-row label {
  font-weight: 500;
  color: var(--muted);
}

.support-row input[type="checkbox"] {
  width: auto;
}

.support-inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

.modal-card {
  width: min(980px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(22, 20, 16, 0.22);
}

.modal-form {
  padding-top: 0;
}

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

.field-span-2 {
  grid-column: span 2;
}

.field-span-3 {
  grid-column: span 3;
}

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

.modal-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 6px 0 2px;
}

.modal-checklist label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--muted);
}

.modal-checklist input[type="checkbox"] {
  width: auto;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.expense-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.summary-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(var(--brand-rgb), 0.08);
  border: 1px solid rgba(var(--brand-rgb), 0.12);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.summary-card strong {
  font-size: 1.25rem;
  color: var(--text);
}

.expense-chart {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 250px;
  padding: 16px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.expense-chart-item {
  min-width: 110px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.expense-chart-item span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.expense-chart-item strong {
  font-size: 0.88rem;
}

.expense-chart-bar-wrap {
  height: 190px;
  display: flex;
  align-items: end;
}

.expense-chart-bar {
  width: 40px;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, var(--brand) 0%, rgba(var(--brand-rgb), 0.76) 100%);
  box-shadow: 0 14px 24px rgba(var(--brand-rgb), 0.18);
}

.support-inline-editor {
  margin-top: 18px;
}

.panel-heading-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.compact-field {
  min-width: 120px;
}

.compact-field label {
  font-size: 0.82rem;
}

.field-inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.expense-items-list {
  display: grid;
  gap: 12px;
}

.store-requirement-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.store-category-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  border-radius: 14px 14px 0 0;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
}

.store-category-tab.active {
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.08);
  border-color: rgba(var(--brand-rgb), 0.16);
}

.store-category-status {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.store-category-status.ok {
  background: #41b85a;
  color: #fff;
}

.store-category-status.pending {
  background: #ef4d35;
  color: #fff;
}

.expense-item-row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.7fr 0.8fr 0.8fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(var(--brand-rgb), 0.04);
}

.store-requirement-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.08);
  border: 1px solid rgba(var(--brand-rgb), 0.16);
}

.attachment-chip a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.empty-inline-state {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(var(--brand-rgb), 0.05);
  color: var(--muted);
}

.action-group {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.integration-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 28px 56px;
}

.integration-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.integration-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.integration-lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.integration-card {
  background: var(--panel-background);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--panel-shadow);
  margin-bottom: 20px;
}

.integration-card h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

.integration-code {
  margin: 14px 0 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 18px;
  background: #111827;
  color: #e5eef8;
  font-size: 0.95rem;
  line-height: 1.65;
}

.integration-steps,
.integration-bullets {
  margin: 0;
  padding-left: 22px;
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .calendar-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .support-grid {
    grid-template-columns: 1fr;
  }

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

/* Mobile nav — base state (hidden on desktop) */
.mobile-topbar {
  display: none;
}

.nav-backdrop {
  display: none;
}

@media (max-width: 860px) {
  /* Top bar com hamburguer */
  .mobile-topbar {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: linear-gradient(180deg, rgba(34, 35, 33, 0.99) 0%, rgba(24, 25, 22, 0.99) 100%);
    z-index: 130;
    padding: 0 16px;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-nav-toggle {
    background: none;
    border: none;
    color: #f2efe8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s ease;
  }

  .mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-topbar-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Backdrop */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 120;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Dashboard: bloco simples, com espaço para o topbar fixo */
  .dashboard-shell {
    grid-template-columns: 1fr;
    padding-top: 52px;
  }

  /* Sidebar como drawer deslizante */
  .side-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    z-index: 140;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
  }

  .side-nav.nav-open {
    transform: translateX(0);
  }

  .topbar,
  .topbar-user,
  .topbar-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .content-shell {
    padding: 14px;
  }

  .login-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand-panel {
    min-height: 340px;
    padding: 28px;
  }

  .login-form-panel {
    padding: 32px 24px;
  }

  .app-shell {
    padding: 0;
  }

  .simple-header,
  .simple-brand,
  .simple-userbar {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar {
    grid-template-columns: 1fr;
  }

  .calendar-weekday {
    display: none;
  }

  .calendar-day {
    min-height: auto;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-grid-2 {
    grid-template-columns: 1fr;
  }

  .expense-item-row {
    grid-template-columns: 1fr;
  }

  .integration-hero {
    flex-direction: column;
  }
}

/* ── Quotes module ─────────────────────────────── */

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar select {
  padding: 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  min-width: 160px;
}

.items-section {
  margin: 20px 0 8px;
}

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

.items-section-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.items-table td {
  padding: 4px 6px;
  vertical-align: middle;
}

.items-table input[type="text"],
.items-table input[type="number"] {
  width: 100%;
  padding: 5px 7px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}

.items-table input:focus {
  outline: none;
  border-color: var(--brand);
}

.items-table .line-total-cell {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  text-align: right;
  padding-right: 10px;
}

.quote-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin: 16px 0 20px;
  padding: 14px 16px;
  background: var(--secondary-soft);
  border-radius: 10px;
}

.quote-totals-row {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-width: 240px;
}

.quote-totals-row span {
  font-weight: 400;
}

.quote-totals-row strong {
  font-weight: 600;
  color: var(--text);
}

.quote-totals-final {
  border-top: 1.5px solid var(--line-strong);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1rem;
  color: var(--text);
}

.quote-totals-final span,
.quote-totals-final strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
}

.quote-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.quote-status-badge.quote-status-draft,
.quote-status-select.quote-status-draft  { background: var(--secondary-soft); color: var(--text-secondary); }
.quote-status-badge.quote-status-sent,
.quote-status-select.quote-status-sent   { background: #dbeafe; color: #1e40af; }
.quote-status-badge.quote-status-approved,
.quote-status-select.quote-status-approved { background: #dcfce7; color: #166534; }
.quote-status-badge.quote-status-rejected,
.quote-status-select.quote-status-rejected { background: #fee2e2; color: #991b1b; }

.quote-status-select {
  padding: 3px 6px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  appearance: auto;
}

/* ============================================================
   DESIGN REFRESH v1 — sidebar + configuração da empresa
   Para reverter: apagar desde aqui até ao fim do ficheiro
   ============================================================ */

/* Variáveis */
:root {
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: none;
  --panel: #ffffff;
  --bg: #f8f8f8;
  --line: #e4e0d8;
  --line-strong: #ccc7bc;
}

/* Fundo da área de conteúdo */
.workspace-shell {
  background: #f8f8f8;
}

body {
  background: #f8f8f8;
}

/* Mais espaço entre secções */
.content-shell {
  gap: 28px;
  padding: 28px 28px 44px;
}

.stack-layout {
  gap: 28px;
}

.support-grid {
  gap: 24px;
  padding: 0 24px 28px;
}

/* --- Sidebar --- */
.side-nav {
  box-shadow: none;
}

.nav-link {
  border-radius: 8px;
  transition: background 0.14s ease, color 0.14s ease;
}

.nav-link:hover {
  transform: none;
}

.nav-link.active {
  background: rgba(var(--brand-rgb), 0.16);
  box-shadow: none;
}

.nav-link.active::before {
  left: -18px;
  width: 3px;
  top: 10px;
  bottom: 10px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}

.nav-sublink {
  border-radius: 6px;
}

.nav-sublink:hover {
  transform: none;
}

/* --- Panels --- */
.panel {
  box-shadow: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel::after {
  display: none;
}

/* --- Inputs / select / textarea --- */
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
select,
textarea {
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fafaf8;
  padding: 10px 13px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.10);
}

/* --- Botões --- */
.primary-button {
  border-radius: 6px;
  box-shadow: none;
  background: var(--brand);
}

.primary-button:hover {
  background: var(--brand-strong);
  box-shadow: none;
  transform: none;
}

.ghost-button {
  border-radius: 6px;
  border: 1px solid var(--line-strong);
}

.ghost-button:hover {
  transform: none;
}

/* --- Support cards --- */
.support-card {
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.support-card-item {
  border-radius: 6px;
  box-shadow: none;
}

/* --- Tabelas: sem linhas horizontais, só hover suave --- */
.support-table th,
.support-table td {
  border-bottom: none;
}

.support-table thead {
  background: #f0ede7;
}

.support-table thead th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--line-strong);
}

.support-table tbody tr:hover {
  background: #fdf5ee;
}

.table-shell {
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* --- Tipografia: 3 níveis --- */
.panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel h3,
.support-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

label,
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

/* --- Form summary --- */
.form-summary,
.empty-state {
  border-radius: 6px;
}

/* --- Modal grid espaçamento --- */
.modal-grid {
  gap: 18px;
}
.module-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.module-enabled-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}

.module-roles {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.module-roles label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================================
   FIM DO DESIGN REFRESH v1
   ============================================================ */

/* --- Faturas associadas a orçamentos --- */
.invoices-section-header {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.invoices-section-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.quote-invoice-balance {
  display: flex;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.quote-invoice-balance-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--surface);
}

.quote-invoice-balance-item span {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.quote-invoice-balance-item strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.quote-invoice-balance-item.por-faturar strong {
  color: var(--brand);
}

.quote-invoice-balance-item.por-faturar strong.amount-negative {
  color: var(--danger);
}

.add-invoice-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.add-invoice-fields {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.add-invoice-fields .field {
  flex: 1;
  min-width: 140px;
}

.add-invoice-fields .primary-button {
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 0;
}

.invoice-paid-toggle {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.invoice-paid-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.invoice-paid-toggle.is-paid {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
}

.invoice-row-paid td {
  opacity: 0.7;
}

/* Checkbox label styling for quote fixed price mode */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Hidden section styling for quote items when in fixed price mode */
.hidden-section {
  opacity: 0.6;
  pointer-events: none;
}
