:root {
  --martins-bg: #f7f8fc;
  --martins-primary: #6f4aaa;
  --martins-dark: #5a2f73;
  --martins-accent: #8b6db7;
  --martins-text: #111827;
  --martins-muted: #68758a;
  --martins-border: #e2e7ef;
  --martins-shadow: 0 18px 42px rgba(17, 24, 39, .07);
  --brand: var(--martins-primary);
  --brand-dark: var(--martins-dark);
  --soft-border: var(--martins-border);
  --muted: var(--martins-muted);
  --mf-purple: var(--martins-primary);
  --mf-purple-2: var(--martins-accent);
  --mf-gold: var(--martins-accent);
  --mf-ink: var(--martins-text);
  --mf-soft: var(--martins-bg);
  --mf-line: var(--martins-border);
  --sidebar-w: 327px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--martins-bg);
  color: var(--martins-text);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.42;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
label,
.form-label,
.btn,
.nav-link,
.sidebar-brand,
.side-link,
.side-toggle,
.nav-tabs .nav-link,
.table th,
.card-header,
.dropdown-item {
  font-weight: 700;
}

a {
  color: var(--martins-primary);
}

a:hover {
  color: var(--martins-dark);
}

.text-muted {
  color: var(--martins-muted) !important;
}

p,
.small,
small {
  color: var(--martins-muted);
}

h1,
.h1 {
  color: #11101c;
  font-size: 1.62rem;
  line-height: 1.2;
}

h2,
.h2 {
  color: #11101c;
  font-size: 1.32rem;
  line-height: 1.25;
}

h3,
.h3,
h4,
.h4,
h5,
.h5 {
  color: #111827;
  line-height: 1.25;
}

.card,
.stat-card,
.portal-stat-card,
.action-card,
.security-checklist,
.pipeline-card,
.login-card {
  background: #fff;
  border: 1px solid var(--martins-border);
  border-radius: 15px;
  box-shadow: var(--martins-shadow);
}

.card-header {
  border-color: var(--martins-border);
}

.martins-card-header {
  background: var(--martins-primary);
  color: #fff;
}

.btn {
  min-height: 44px;
  border-radius: 10px;
  font-size: .86rem;
}

.btn-primary,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:hover,
.btn-outline-primary:hover {
  background-color: var(--martins-primary) !important;
  background-image: linear-gradient(90deg, #7d3f97 0%, #5f2e74 100%) !important;
  border-color: var(--martins-primary) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--martins-dark) !important;
  border-color: var(--martins-dark) !important;
}

.btn-outline-primary {
  color: var(--martins-primary);
  border-color: var(--martins-border);
  background: #fff;
}

.btn-outline-secondary {
  color: var(--martins-primary);
  border-color: var(--martins-border);
  background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #fff;
  background: var(--martins-primary);
  border-color: var(--martins-primary);
}

.form-control,
.form-select {
  min-height: 53px;
  background: #fff;
  border-color: var(--martins-border);
  border-radius: 8px;
  color: var(--martins-text);
  font-size: .86rem;
  padding: .72rem 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--martins-primary);
  box-shadow: 0 0 0 .2rem rgba(107, 74, 160, .18);
}

.table {
  margin-bottom: 0;
  color: var(--martins-text);
  font-size: .88rem;
}

.table th {
  color: var(--martins-text);
  white-space: nowrap;
  font-size: .78rem;
}

.table td {
  vertical-align: middle;
}

.nav-tabs {
  border-color: var(--martins-border);
}

.nav-tabs .nav-link {
  border-radius: 8px 8px 0 0;
  color: var(--martins-muted);
  font-size: .86rem;
}

.card-body {
  padding: 1.3rem;
}

.card-title {
  color: #111827;
  font-size: 1.04rem;
  font-weight: 700;
}

.card p,
.card .text-muted,
.card small {
  color: var(--martins-muted) !important;
}

.form-label {
  color: #5f687a;
  font-size: .74rem;
  margin-bottom: .45rem;
}

.form-select {
  appearance: auto;
}

.table-responsive,
.card {
  overflow: hidden;
}

.alert {
  border-radius: 12px;
  border-color: var(--martins-border);
  font-size: .88rem;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
  color: var(--martins-primary);
  border-color: var(--martins-border) var(--martins-border) #fff;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #6f49aa 0%, #6942a0 100%);
  color: #fff;
  position: fixed;
  inset: 45px auto 0 0;
  z-index: 1040;
  overflow-y: auto;
  border-radius: 0;
  box-shadow: 4px 0 18px rgba(24, 32, 42, .14);
  scrollbar-color: rgba(255, 255, 255, .42) transparent;
  scrollbar-width: thin;
}

.app-sidebar::-webkit-scrollbar {
  width: 10px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .42);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  min-height: 140px;
  margin: 17px 14px 19px;
  padding: 14px 15px 12px;
  background: rgba(255, 255, 255, .22);
  border-radius: 11px;
  text-align: center;
}

.sidebar-brand:hover {
  color: #fff;
}

.sidebar-logo {
  width: 158px;
  height: 68px;
  object-fit: contain;
  background: #fff;
  border-radius: 999px;
  padding: 2px;
}

.sidebar-brand-text span {
  display: block;
}

.sidebar-brand-text {
  display: block;
}

.sidebar-brand-text > span:first-child {
  margin-top: 7px;
  font-size: .9rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.sidebar-brand-module {
  margin-top: 5px;
  font-size: .72rem;
  opacity: .72;
}

.sidebar-section {
  padding: 0 14px 18px;
}

.side-link,
.side-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  color: #fff;
  text-decoration: none;
  border: 0;
  background: rgba(255, 255, 255, .17);
  border-radius: 11px;
  padding: 13px 14px;
  margin: 8px 0;
  text-align: left;
}

.side-link::before,
.side-toggle::before {
  content: "";
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .18);
}

.side-toggle::after {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid rgba(255, 255, 255, .58);
  border-bottom: 2px solid rgba(255, 255, 255, .58);
  transform: rotate(45deg);
}

.side-group[open] > .side-toggle::after {
  transform: rotate(225deg);
}

.side-link-feature {
  background: transparent;
  padding-left: 18px;
}

.side-link:hover,
.side-toggle:hover,
.side-link.active,
.side-group[open] > .side-toggle {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.side-toggle::-webkit-details-marker {
  display: none;
}

.side-link strong,
.side-toggle strong,
.side-submenu strong {
  display: block;
  color: inherit;
  font-size: .84rem;
  line-height: 1.25;
  font-weight: 700;
}

.side-link > span:first-child,
.side-toggle > span:first-child {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .84rem;
  line-height: 1.25;
  font-weight: 700;
}

.side-link small,
.side-toggle small,
.side-submenu small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .58);
  font-size: .66rem;
  line-height: 1.25;
  font-weight: 700;
}

.side-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 700;
}

.side-caret {
  color: rgba(255, 255, 255, .85);
  font-size: 1rem;
  line-height: 1;
}

.side-submenu {
  background: #fff;
  color: var(--martins-text);
  border-radius: 11px;
  margin: 7px 0 19px;
  padding: 11px;
  box-shadow: 0 12px 28px rgba(24, 32, 42, .08);
}

.side-submenu a {
  display: block;
  color: var(--martins-text);
  text-decoration: none;
  padding: 11px 10px;
  border-radius: 10px;
  font-size: .84rem;
  line-height: 1.25;
  font-weight: 700;
}

.side-submenu a:hover {
  background: #f3eff8;
  color: var(--martins-primary);
}

.side-submenu a.active {
  background: #f4f0f8;
  color: var(--martins-primary);
}

.side-submenu small {
  color: #8a96a3;
  font-weight: 400;
}

.sidebar-footer {
  padding: 0 16px 18px;
  border-top: 0;
  display: none;
}

.app-main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
}

.mobile-topbar {
  display: none;
  background: var(--martins-primary);
  color: #fff;
  padding: .6rem .75rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-topbar {
  min-height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 30px;
  background: #fff;
  border-bottom: 1px solid var(--martins-border);
  box-shadow: 0 4px 14px rgba(17, 24, 39, .04);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #111827;
  text-decoration: none;
  font-size: 1.48rem;
  font-weight: 700;
}

.topbar-brand:hover {
  color: #0b1020;
}

.topbar-brand img {
  width: 126px;
  height: 58px;
  object-fit: contain;
}

.topbar-account {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 12px 13px 12px 17px;
  background: #fbf9ff;
  border: 1px solid #eadff3;
  border-radius: 16px;
  color: #8b8294;
  font-weight: 400;
}

.topbar-account strong {
  color: #1f2937;
  font-weight: 700;
}

.topbar-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #efe1f5;
  color: var(--martins-primary);
  font-size: .75rem;
  font-weight: 700;
}

.topbar-account a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 17px;
  border-radius: 12px;
  background: #fff;
  color: #4c2d60;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(17, 24, 39, .05);
}

.mobile-menu-button {
  display: none;
}

.mobile-topbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.content-wrap {
  max-width: none;
  margin: 0 auto;
  padding: 37px 36px;
}

.content-wrap > h1:first-child,
.content-wrap > .d-flex:first-child h1,
.content-wrap h1:first-child {
  margin-bottom: .7rem;
}

.content-wrap > p,
.content-wrap .lead {
  color: var(--martins-muted);
  font-size: .86rem;
}

.content-wrap > .card,
.content-wrap > form.card,
.content-wrap form.card,
.content-wrap .card.mb-4 {
  border-radius: 15px;
  border-color: var(--martins-border);
  box-shadow: 0 18px 40px rgba(17, 24, 39, .07);
}

.content-wrap .card .btn-primary,
.content-wrap form .btn-primary,
.content-wrap button.btn-primary {
  min-height: 53px;
  border-radius: 10px;
  font-size: .88rem;
}

.content-wrap select.form-select,
.content-wrap input.form-control {
  border-color: #dfe6ee;
}

.sidebar-backdrop {
  display: none;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  margin-left: .35rem;
  padding: 0 .35rem;
}

.portal-card-link {
  display: block;
  height: 100%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.portal-card-link:hover .portal-stat-card,
.action-card:hover {
  border-color: var(--martins-primary);
  box-shadow: 0 14px 35px rgba(24, 32, 42, .12);
}

.portal-stat-card {
  min-height: 118px;
}

.action-card {
  transition: transform .12s ease, box-shadow .12s ease;
}

.action-card:hover {
  transform: translateY(-2px);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 68px 16px 40px;
  background: #f7f8fb;
}

.login-card {
  width: min(100%, 1120px);
  margin: 0 auto;
  overflow: hidden;
}

.login-card-compact {
  width: min(100%, 430px);
}

.login-card-attendance {
  width: min(100%, 646px);
  border: 1px solid #dce3eb;
  border-radius: 14px;
  box-shadow: 0 22px 58px rgba(24, 32, 42, .09);
}

.login-hero {
  min-height: 315px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px 35px;
  background: #fff;
  border-bottom: 1px solid #dce3eb;
}

.login-header {
  background: var(--martins-primary);
  color: #fff;
  text-align: center;
  padding: 1rem 1.25rem;
}

.login-header-title {
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 700;
}

.login-header-module,
.login-module-name {
  font-size: .95rem;
  font-weight: 700;
  opacity: .9;
}

.login-body {
  padding: 2.25rem;
}

.login-card-attendance .login-body {
  padding: 41px 48px 45px;
  background: #fff;
}

.login-logo {
  display: block;
  width: 220px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 1rem;
}

.login-logo-center {
  width: 190px;
  height: 96px;
  margin-bottom: 1.25rem;
}

.login-logo-attendance {
  width: 328px;
  height: 142px;
  margin-bottom: 22px;
}

.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-hero .login-brand {
  margin-bottom: 0;
}

.login-brand-name {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--martins-text);
  margin: 0;
}

.login-card-attendance .login-brand-name {
  color: #06111d;
  font-size: 1.5rem;
  line-height: 1.2;
}

.login-card-attendance .login-module-name {
  color: #5d6875;
  font-size: 1rem;
  line-height: 1.25;
  margin-top: 10px;
  opacity: 1;
}

.login-form-area {
  max-width: 760px;
  margin: 0 auto;
}

.login-alerts .alert {
  border-radius: 8px;
  font-weight: 400;
}

.login-form {
  margin: 0;
}

.login-card-attendance .form-label {
  margin-bottom: 12px;
  color: #020711;
  font-size: 1rem;
  line-height: 1.2;
}

.login-card-attendance .form-control {
  min-height: 66px;
  border-color: #d6dee8;
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: none;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px;
  gap: 12px;
  align-items: stretch;
}

.btn-password-toggle {
  min-height: 66px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: #fff;
  color: #6b4aa0;
  font-size: 1.25rem;
  font-weight: 700;
}

.btn-password-toggle:hover,
.btn-password-toggle:focus {
  border-color: var(--martins-primary);
  color: var(--martins-dark);
  background: #fff;
  box-shadow: 0 0 0 .2rem rgba(107, 74, 160, .18);
}

.login-submit {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  margin-top: .35rem;
}

.login-card-attendance .login-submit {
  min-height: 66px;
  border-radius: 10px;
  margin-top: 12px;
  background-color: #6b4aa0 !important;
  background-image: none !important;
  border-color: #6b4aa0 !important;
  font-size: 1.25rem;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 26px;
  font-weight: 700;
}

.login-links a {
  color: #6b4aa0;
  font-size: 1.25rem;
  line-height: 1.2;
  text-decoration: none;
}

.login-links a:hover,
.login-links a:focus {
  color: var(--martins-dark);
  text-decoration: underline;
}

.login-access-box,
.login-qr-box {
  background: var(--martins-bg);
  border: 1px solid var(--martins-border);
  border-radius: 12px;
  padding: 1rem;
}

.login-divider {
  border-left: 1px solid var(--martins-border);
}

.security-checklist {
  overflow: hidden;
}

.checklist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--martins-border);
}

.checklist-row:last-child {
  border-bottom: 0;
}

.checklist-title {
  font-weight: 700;
  line-height: 1.35;
}

.checklist-detail {
  font-size: .86rem;
  color: var(--martins-muted);
  margin-top: .25rem;
}

.checklist-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
  min-width: 190px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .28rem .7rem;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-ok {
  background: #dcfce7;
  color: #166534;
}

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

.needs-action {
  background: #fffaf2;
}

.is-ok {
  background: #fbfffd;
}

.crm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  color: var(--martins-muted);
}

.crm-breadcrumb a {
  text-decoration: none;
}

.crm-context-form {
  min-width: 260px;
  max-width: 360px;
  width: 100%;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.workspace-sidebar {
  position: sticky;
  top: 1rem;
}

.workspace-nav {
  display: block;
  text-decoration: none;
  color: var(--martins-text);
  padding: .55rem .65rem;
  border-radius: 6px;
  margin-bottom: .2rem;
}

.workspace-nav:hover,
.workspace-nav.active {
  background: #f0eafa;
  color: var(--martins-primary);
  font-weight: 700;
}

.stat-grid,
.summary-strip,
.client-meta {
  display: grid;
  gap: .8rem;
}

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

.stat-card {
  padding: 1rem;
}

.stat-card div,
.summary-strip span,
.client-meta span {
  color: var(--martins-muted);
}

.stat-card div {
  font-size: .78rem;
}

.stat-card strong {
  color: #111827;
  font-size: 1.42rem;
}

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

.summary-strip div,
.client-meta div {
  background: #f9fafb;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: .65rem;
}

.summary-strip span,
.client-meta span {
  display: block;
  font-size: .75rem;
}

.summary-strip b,
.client-meta b {
  display: block;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid #edf1f5;
}

.mini-row:last-child {
  border-bottom: 0;
}

.client-drawer {
  position: fixed;
  right: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: min(420px, calc(100vw - 2rem));
  z-index: 20;
  overflow: auto;
}

.client-meta {
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}

.timeline-item {
  border-left: 3px solid var(--martins-primary);
  padding: .25rem 0 .7rem .7rem;
  margin-bottom: .45rem;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(10, minmax(240px, 1fr));
  gap: .85rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.pipeline-column {
  background: #f8fafc;
  border: 1px solid var(--martins-border);
  border-radius: 12px;
  min-height: 420px;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem;
  border-bottom: 1px solid var(--martins-border);
  position: sticky;
  top: 0;
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
}

.pipeline-dropzone {
  min-height: 340px;
  padding: .65rem;
}

.pipeline-card {
  padding: .75rem;
  margin-bottom: .65rem;
  cursor: grab;
}

.pipeline-card.dragging {
  opacity: .55;
}

.pipeline-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--martins-muted);
  text-align: center;
  padding: 1rem;
}

.alert-tile {
  border-left: 5px solid var(--martins-accent);
}

.alert-tile.danger {
  border-left-color: #dc2626;
}

.alert-tile.success {
  border-left-color: #16a34a;
}

body.dark-mode {
  --martins-bg: #0f172a;
  --martins-text: #e5e7eb;
  --martins-muted: #94a3b8;
  --martins-border: #334155;
  background: #0f172a;
  color: #e5e7eb;
}

body.dark-mode .card,
body.dark-mode .stat-card,
body.dark-mode .pipeline-card,
body.dark-mode .security-checklist {
  background: #111827;
  color: #e5e7eb;
  border-color: #334155;
}

body.dark-mode .pipeline-column,
body.dark-mode .pipeline-header,
body.dark-mode .summary-strip div,
body.dark-mode .client-meta div {
  background: #1f2937;
  border-color: #334155;
}

body.dark-mode .table,
body.dark-mode .form-control,
body.dark-mode .form-select {
  color: #e5e7eb;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    width: min(332px, calc(100vw - 28px));
    inset: 0 auto 0 0;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform .18s ease;
  }

  .app-sidebar.show {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
    width: 100%;
  }

  .mobile-topbar {
    display: flex;
  }

  .app-topbar {
    display: none;
  }

  .content-wrap {
    padding: 1rem;
  }

  .sidebar-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(24, 32, 42, .35);
    z-index: 1035;
  }

  .client-drawer {
    position: static;
    width: 100%;
    margin-top: 1rem;
  }

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

  .workspace-sidebar {
    position: static;
  }

  .workspace-sidebar .card-body {
    display: flex;
    overflow-x: auto;
    gap: .25rem;
  }

  .workspace-nav {
    white-space: nowrap;
  }
}

@media (max-width: 767.98px) {
  .login-page {
    padding: 18px 14px;
  }

  .login-body {
    padding: 1.35rem;
  }

  .login-card-attendance .login-body {
    padding: 30px 24px 34px;
  }

  .login-hero {
    min-height: 255px;
    padding: 32px 24px 26px;
  }

  .login-logo {
    width: 220px;
    max-width: 100%;
  }

  .login-logo-center {
    width: 170px;
    height: 86px;
  }

  .login-logo-attendance {
    width: 280px;
    height: 120px;
  }

  .login-card-attendance .form-control,
  .login-card-attendance .login-submit,
  .btn-password-toggle {
    min-height: 58px;
  }

  .login-links {
    flex-direction: column;
    align-items: center;
    gap: .7rem;
    margin-top: 22px;
  }

  .login-links a {
    font-size: 1.05rem;
  }

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

  .btn-password-toggle {
    min-height: 48px;
    font-size: 1rem;
  }

  .login-divider {
    border-left: 0;
    border-top: 1px solid var(--martins-border);
    padding-top: 1.25rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2,
  h3 {
    font-size: 1.45rem;
  }

  .checklist-row {
    grid-template-columns: 1fr;
    gap: .75rem;
    padding: .9rem;
  }

  .checklist-actions {
    justify-content: space-between;
    min-width: 0;
    width: 100%;
  }

  .status-pill {
    min-width: 104px;
  }

  .card-body {
    padding: 1rem;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    border: 1px solid var(--martins-border);
    border-radius: 8px;
    margin-bottom: .75rem;
    padding: .65rem;
    background: #fff;
  }

  .responsive-table td {
    border: 0 !important;
    padding: .35rem 0 !important;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    word-break: break-word;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--martins-muted);
    min-width: 110px;
  }

  .table-responsive {
    overflow: visible;
  }

  .two-col,
  .summary-strip,
  .client-meta {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 575px) {
  .stat-card {
    padding: .75rem;
  }

  .stat-card strong {
    font-size: 1.25rem;
  }
}
