/* OH Wear — App shell */

:root {
  --brand-red: #c41230;
  --brand-red-dark: #a00e28;
  --brand-red-soft: #fce8eb;
  --ink: #1c1c1c;
  --ink-secondary: #5c5c5c;
  --ink-muted: #8a8a8a;
  --surface: #ffffff;
  --canvas: #f4f5f7;
  --border: #e6e8ec;
  --border-strong: #d0d3d9;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-soft: 0 2px 8px rgba(16, 24, 40, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 280px;
  --topbar-height: 64px;
  --font: "Figtree", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* —— Login —— */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196, 18, 48, 0.08), transparent 55%),
    linear-gradient(180deg, #fafbfc 0%, var(--canvas) 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 28px 36px 24px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand img {
  height: 70px;
  width: auto;
}

.login-brand p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-secondary);
  text-align: center;
}

.login-error {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fdecef;
  border: 1px solid #f3c5cc;
  color: var(--brand-red-dark);
  font-size: 0.875rem;
  font-weight: 550;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.field input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 96px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--brand-red);
}

.field-error {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--brand-red-dark);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.12);
}

.field input::placeholder {
  color: #b0b4ba;
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: -4px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-red);
}

.perm-set {
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.perm-set legend {
  padding: 0 6px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--ink-secondary);
}

.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.login-meta a {
  font-size: 0.8125rem;
  color: var(--brand-red);
  font-weight: 600;
}

.login-meta a:hover {
  text-decoration: underline;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand-red);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--brand-red-dark);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* —— App shell —— */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.menu-toggle.icon-btn {
  display: none;
}

.menu-toggle-bars {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
}

.menu-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.menu-toggle-bars span:nth-child(1) {
  top: 0;
}

.menu-toggle-bars span:nth-child(2) {
  top: 6px;
}

.menu-toggle-bars span:nth-child(3) {
  top: 12px;
}

body.nav-open .menu-toggle-bars span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

body.nav-open .menu-toggle-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

body.nav-open .menu-toggle-bars span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.topbar-logo img {
  height: 52px;
  width: auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--canvas);
  color: var(--ink);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.user-chip:hover {
  background: var(--canvas);
}

.user-menu {
  position: relative;
}

.notif-menu {
  position: relative;
}

.notif-toggle {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
}

.notif-badge[hidden] {
  display: none !important;
}

.notif-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 320px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
  padding: 12px;
}

.notif-menu-panel[hidden] {
  display: none !important;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-right: 16px;
}

.notif-panel-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.notif-panel-close.modal-close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 18px;
  height: 18px;
  font-size: 0.9375rem;
  background: transparent;
  color: #9ca3af;
  border-radius: 0;
}

.notif-panel-close.modal-close:hover {
  background: transparent;
  color: var(--ink);
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(360px, 70vh);
  overflow: auto;
}

.notif-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.notif-item.is-unread {
  border-color: #f3c5cc;
  background: var(--brand-red-soft);
}

.notif-item-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.notif-item-body {
  margin: 4px 0 8px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.notif-item.is-read .notif-item-title,
.notif-item.is-read .notif-item-body {
  color: var(--ink-secondary);
}

.notif-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.notif-item-link {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--brand-red);
  text-decoration: none;
}

.notif-item-link:hover {
  text-decoration: underline;
}

.notif-mark-read {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notif-mark-read:hover {
  color: var(--ink);
}

.notif-empty {
  margin: 0;
  text-align: center;
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.4;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(280px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
  padding: 12px;
}

.user-menu-panel[hidden] {
  display: none !important;
}

.user-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.user-menu-head strong {
  display: block;
  font-size: 0.9375rem;
}

.user-menu-meta {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.user-menu-info {
  margin: 0 0 10px;
  display: grid;
  gap: 8px;
}

.user-menu-info div {
  display: grid;
  gap: 2px;
}

.user-menu-info dt {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.user-menu-info dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink);
  word-break: break-word;
}

.user-menu-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 10px 10px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.user-menu-action:hover {
  background: var(--canvas);
}

.user-menu-logout {
  color: var(--brand-red);
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--canvas);
  color: var(--ink);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.app-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--topbar-height));
}

/* —— Sidebar —— */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 10px;
  border: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: #7a7a7a;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link:hover {
  background: var(--canvas);
}

.nav-link.is-active {
  color: #1a1a1a;
  font-weight: 650;
  background: var(--canvas);
}

.nav-link.is-active svg {
  stroke: #1a1a1a;
}

.nav-link.is-parent-active {
  font-weight: 650;
  color: #1a1a1a;
}

.nav-sublist {
  list-style: none;
  margin: 0 0 2px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-link--child {
  padding: 7px 10px 7px 30px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-secondary);
  gap: 8px;
  white-space: nowrap;
}

.nav-link--child svg {
  width: 18px;
  height: 18px;
  stroke: #7a7a7a;
}

.nav-link--child.is-active {
  color: #1a1a1a;
  font-weight: 650;
  background: var(--canvas);
}

.nav-link--child.is-active svg {
  stroke: #1a1a1a;
}

/* —— Main —— */

.main {
  flex: 1;
  padding: 28px 36px 48px;
  min-width: 0;
}

.page-greeting {
  margin: 0 0 28px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section {
  margin-bottom: 32px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}

.section-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px 22px;
}

.card-label {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.card-value {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.card-meta {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-link:hover {
  color: var(--brand-red-dark);
}

.shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shortcuts--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shortcut {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.shortcut::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 70%;
  height: 70%;
  border-radius: 100% 0 0 0;
  background: radial-gradient(
    ellipse at 100% 100%,
    rgba(0, 0, 0, 0.045) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.shortcut:hover {
  border-color: #d0d3d9;
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.shortcut:hover::after {
  opacity: 1;
}

.shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f0f1f3;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.shortcut-icon svg {
  width: 22px;
  height: 22px;
  stroke: #6b6b6b;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shortcut-label {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.placeholder-note {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px dashed var(--border-strong);
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.flash {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 550;
}

.flash-success {
  background: #eaf7ee;
  border: 1px solid #c6e6d0;
  color: #1f6b3a;
}

.flash-error {
  background: #fdecef;
  border: 1px solid #f3c5cc;
  color: var(--brand-red-dark);
}

.page-header {
  margin-bottom: 24px;
}

.page-header--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-title-row .page-title {
  margin: 0;
}

.page-help-toggle {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.page-help-toggle:hover,
.page-help-toggle[aria-expanded="true"] {
  color: var(--brand-red);
}

.page-header .page-help {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.page-header .page-help.is-open {
  grid-template-rows: 1fr;
}

.page-help-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.28s ease;
}

.page-header .page-help.is-open .page-help-inner {
  opacity: 1;
  transform: translateY(0);
}

.page-header .page-lead {
  margin: 10px 0 0;
}

.page-header .page-title:last-child {
  margin-bottom: 0;
}

.page-lead {
  margin: 0;
  max-width: 52rem;
  color: var(--ink-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.cal-grids {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cal-grid-card {
  margin-bottom: 0;
}

.cal-grid-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.cal-grid-actions .btn-compact {
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1;
  box-sizing: border-box;
}

.cal-grid-actions .btn-primary.btn-compact {
  border: 1px solid transparent;
}

.cal-grid-actions .btn-secondary.btn-compact {
  border: 1px solid var(--border-strong);
}

.cal-grid-range {
  margin: 0 0 14px;
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.cal-grid-usage {
  display: inline-block;
  margin-left: 8px;
  color: var(--ink);
  font-weight: 600;
}

.data-table--cal .cell-comment {
  white-space: normal;
  line-height: 1.35;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
}

.cal-grid-delete {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.cal-grid-delete--blocked {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.cal-upcoming,
.cal-month-card {
  margin-bottom: 0;
}

.cal-month-card {
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
}

.cal-group-title {
  margin: 18px 0 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cal-group-title:first-of-type {
  margin-top: 4px;
}

.cal-overdue {
  margin: 0 0 18px;
}

.cal-overdue[hidden] {
  display: none !important;
}

.cal-overdue-head {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.cal-overdue-toggle {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 4px 2px 4px 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.cal-overdue-toggle:hover ~ .cal-day-toggle,
.cal-overdue-head .cal-day-toggle:hover,
.cal-overdue-toggle:focus-visible ~ .cal-day-toggle {
  background: #fdecee;
  color: var(--brand-red);
}

.cal-overdue-toggle:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

.cal-overdue-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-red);
}

.cal-overdue-count {
  margin-left: 6px;
  font-weight: 550;
}

.cal-overdue:not(.is-collapsed) .cal-overdue-head .cal-day-toggle svg {
  transform: rotate(180deg);
}

.cal-overdue.is-collapsed .cal-overdue-body {
  display: none;
}

.cal-overdue-body {
  margin-top: 8px;
}

.cal-overdue-body .cal-day-block:last-child {
  margin-bottom: 0;
}

.cal-day-block {
  margin-bottom: 14px;
  scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.cal-day-head {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
}

.cal-day-toggle-hit {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 4px 2px 4px 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.cal-day-toggle-hit:hover ~ .cal-day-toggle,
.cal-day-toggle:hover,
.cal-day-toggle-hit:focus-visible ~ .cal-day-toggle {
  background: #eef0f3;
  color: var(--ink);
}

.cal-day-toggle-hit:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

.cal-day-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

.cal-day-count {
  margin-left: 6px;
  font-weight: 550;
  color: var(--ink-muted);
}

.cal-day-toggle {
  flex-shrink: 0;
}

.cal-day-reschedule {
  flex-shrink: 0;
}

.cal-day-reschedule[hidden] {
  display: none !important;
}

.cal-day-toggle svg {
  transition: transform 0.15s ease;
}

.cal-day-block:not(.is-collapsed) .cal-day-toggle svg {
  transform: rotate(180deg);
}

.cal-day-block.is-collapsed .cal-event-list {
  display: none;
}

.cal-day-block.is-collapsed .cal-day-head {
  margin-bottom: 0;
}

.cal-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-event-item {
  display: grid;
  grid-template-columns: 52px minmax(110px, 140px) minmax(0, 1fr) minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
  font-size: 0.8125rem;
  position: relative;
}

.cal-event-item.is-done {
  background: #f3f8f4;
  border-color: #e4eee6;
}

.cal-event-control {
  font-weight: 700;
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cal-event-item.is-done .cal-event-control {
  color: #3d7a52;
}

.cal-event-check {
  display: inline-flex;
  color: #3d8f5c;
  flex-shrink: 0;
}

.cal-event-check svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cal-event-sku {
  font-weight: 650;
  color: var(--ink);
}

.cal-event-modelo,
.cal-event-color {
  color: var(--ink-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-event-note {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--ink-muted);
  line-height: 1.3;
}

.cal-event-actions {
  position: relative;
  justify-self: end;
  align-self: start;
}

.cal-event-menu-toggle svg {
  fill: currentColor;
  stroke: none;
}

.cal-event-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 25;
  min-width: 188px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
}

.cal-event-menu[hidden] {
  display: none !important;
}

.cal-event-menu-item {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.cal-event-menu-item[hidden] {
  display: none !important;
}

.cal-event-menu-item:hover,
.cal-event-menu-item:focus-visible {
  background: var(--canvas);
  color: var(--brand-red);
}

.cal-reschedule-meta {
  margin: 0 0 16px;
  padding-right: 36px;
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

#cal-reschedule-modal .modal-header {
  padding-right: 36px;
  margin-bottom: 12px;
}

#cal-reschedule-modal .field {
  padding-right: 36px;
  margin-bottom: 16px;
}

#cal-reschedule-modal .form-actions {
  padding-right: 36px;
}

#cal-done-form {
  display: none;
}

.cal-month-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.cal-month-title {
  margin: 0;
  border: none;
  background: none;
  padding: 4px 8px;
  border-radius: 8px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.cal-month-title:hover {
  color: var(--brand-red);
  background: var(--canvas);
}

.cal-today-btn {
  width: 100%;
  margin-top: 14px;
  height: 40px;
}

.cal-month-toolbar .icon-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cal-weekdays,
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-muted);
  padding: 4px 0 8px;
}

.cal-day {
  position: relative;
  aspect-ratio: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  max-width: 40px;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: default;
}

.cal-day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.cal-day.is-today .cal-day-num {
  font-weight: 800;
}

.cal-day.is-today::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--brand-red);
  transform: translateX(-50%);
}

.cal-day.has-controls.is-today::after {
  bottom: -1px;
}

.cal-day.has-controls {
  cursor: pointer;
}

.cal-day.has-controls .cal-day-num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brand-red);
  border-radius: 50%;
  color: var(--brand-red);
}

.cal-day.has-controls:hover .cal-day-num,
.cal-day.has-controls.is-open .cal-day-num {
  background: var(--brand-red-soft);
}

.cal-day.has-controls.is-complete .cal-day-num {
  border-color: #4a9a68;
  color: #3d7a52;
}

.cal-day.has-controls.is-complete:hover .cal-day-num,
.cal-day.has-controls.is-complete.is-open .cal-day-num {
  background: #f3f8f4;
}

.cal-balloon {
  position: absolute;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16);
  padding: 12px 12px 10px;
  max-height: 260px;
  overflow: auto;
}

.cal-balloon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cal-balloon-close.modal-close {
  position: static;
  width: 28px;
  height: 28px;
}

.cal-balloon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cal-balloon-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}

.cal-balloon-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cal-balloon-list li.is-done .cal-balloon-control {
  color: #3d7a52;
}

.cal-balloon-control {
  font-weight: 700;
  color: var(--brand-red);
}

.cal-balloon-meta {
  color: var(--ink-secondary);
  line-height: 1.35;
}

.content-card-title {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 700;
}

.simple-list,
.steps,
.toc-list {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--ink);
  line-height: 1.55;
}

.simple-list li,
.steps li,
.toc-list li {
  margin-bottom: 6px;
}

.muted {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

.tab.is-active {
  color: var(--ink);
  border-color: #cfcfcf;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.split-panels {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-toolbar .section-head {
  margin-bottom: 0;
}

.btn-compact {
  height: 38px;
  padding: 0 14px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(16, 24, 40, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
  padding: 22px 22px 20px;
}

.modal-panel--confirm {
  width: min(400px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-right: 28px;
}

.modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #9ca3af;
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.modal-close:hover {
  background: #6b7280;
  color: #fff;
}

.modal-inline-error {
  margin: 0 0 14px;
}

.modal-confirm[hidden] {
  display: none !important;
}

.modal.is-confirming #user-form,
.modal.is-confirming #areas-form {
  display: none !important;
}

.modal-confirm-text {
  margin: 0 0 16px;
  color: var(--ink-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.modal-confirm .btn-primary,
.modal-confirm .btn-secondary {
  cursor: pointer;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  outline: none;
}

.field select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.12);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--ink-secondary);
  font-weight: 650;
  white-space: nowrap;
}

.data-table .th-actions {
  width: 1%;
  padding-left: 8px;
  padding-right: 4px;
  text-align: right;
}

.data-table--users .th-actions,
.data-table--users .table-actions {
  width: 112px;
  text-align: right;
}

.data-table--stock {
  table-layout: fixed;
  width: 100%;
}

.data-table--stock th,
.data-table--stock td {
  vertical-align: middle;
}

.data-table--stock .col-stock-sku {
  width: 150px;
}

.data-table--stock .col-stock-modelo {
  width: 200px;
}

.data-table--stock .col-stock-color {
  width: 340px;
}

.data-table--stock .col-stock-ingreso {
  width: 110px;
}

.data-table--stock .col-stock-proximo {
  width: 220px;
}

.data-table--stock .cell-proximo {
  white-space: nowrap;
}

.proximo-cell {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
}

.proximo-cell-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proximo-cell .icon-action {
  flex-shrink: 0;
}

.stock-controls-meta {
  margin: 0 0 12px;
  color: var(--ink-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.stock-controls-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(360px, 55vh);
  overflow: auto;
}

.stock-controls-list li {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
}

.stock-controls-date {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.stock-controls-name {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--brand-red);
}

.stock-controls-note {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--ink-muted);
}

.data-table--stock .col-stock-actions {
  width: 76px;
}

.data-table--stock .cell-sku,
.data-table--stock .cell-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table--stock .cell-color {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.data-table--stock .th-actions,
.data-table--stock .table-actions,
.data-table--users .th-actions,
.data-table--users .table-actions {
  position: sticky;
  right: 0;
  background: var(--surface);
  z-index: 1;
  text-align: right;
  box-shadow: -6px 0 8px -8px rgba(16, 24, 40, 0.18);
}

.data-table--stock thead .th-actions,
.data-table--users thead .th-actions {
  z-index: 2;
}

.th-sort {
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.12s ease;
}

.th-sort:hover {
  color: var(--ink);
}

.th-sort.is-active {
  color: var(--ink);
}

.data-table tbody tr {
  transition: background-color 0.12s ease;
}

.data-table tbody tr:hover {
  background-color: #f7f8fa;
}

.data-table tbody tr:hover .table-actions {
  background-color: #f7f8fa;
}

.cell-meta {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.75rem;
}

.table-actions {
  white-space: nowrap;
}

.table-actions .icon-action,
.table-actions .inline-form {
  vertical-align: middle;
}

.table-actions .icon-action + .inline-form,
.table-actions .inline-form + .icon-action,
.table-actions .icon-action + .icon-action {
  margin-left: 4px;
}

.inline-form {
  display: inline-flex;
  vertical-align: middle;
}

.link-action {
  border: none;
  background: none;
  padding: 0;
  margin-right: 10px;
  color: var(--brand-red);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.areas-count-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--brand-red);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.areas-count-btn:hover {
  color: var(--brand-red-dark);
}

.icon-action {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.icon-action:hover {
  background: #eef0f3;
  color: var(--ink);
}

.icon-action--danger:hover {
  background: #fdecee;
  color: var(--brand-red);
}

.icon-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}

.badge-ok {
  background: #eaf7ee;
  color: #1f6b3a;
}

.badge-off {
  background: #f3f4f6;
  color: #6b7280;
}

.filters-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  gap: 12px;
  margin-bottom: 16px;
  align-items: end;
}

.filters-bar--search {
  grid-template-columns: minmax(180px, 320px) auto;
  margin-bottom: 0;
  flex: 1;
}

.filters-bar--search:not(.has-query) {
  grid-template-columns: minmax(180px, 320px);
}

.filters-bar--search input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
}

.filters-bar--search input[type="search"]::-webkit-search-cancel-button,
.filters-bar--search input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.filters-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 0;
}

.filters-actions[hidden] {
  display: none;
}

/* Match search/filter field input height (44px), not the smaller toolbar compact size */
.filters-bar .btn-compact {
  height: 44px;
  padding: 0 14px;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.empty-row {
  text-align: center;
  color: var(--ink-muted);
  padding: 28px 10px !important;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.page-link {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0 8px;
}

.page-link.is-active {
  color: #fff;
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.manual-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.manual-toc {
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
  align-self: start;
}

.toc-list {
  list-style: decimal;
}

.toc-list a {
  color: var(--ink-secondary);
  font-weight: 550;
}

.toc-list a:hover {
  color: var(--brand-red);
}

.manual-section {
  scroll-margin-top: 0;
}

.manual-section h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.manual-section h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.manual-section p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.6;
}

.manual-section h4 {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

.manual-app {
  margin: 0 0 12px;
  padding: 14px 16px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}

.manual-app .simple-list {
  margin-bottom: 10px;
}

.manual-app p {
  margin-bottom: 8px;
  color: var(--ink-secondary);
}

.callout {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f7f8fa;
  border-left: 3px solid var(--brand-red);
  color: var(--ink-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

a.icon-btn {
  text-decoration: none;
}

.nav-backdrop {
  display: none;
}

/* —— Responsive —— */

@media (max-width: 1100px) {
  .cards-row {
    grid-template-columns: 1fr 1fr;
  }

  .shortcuts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    padding: 0 14px;
  }

  .menu-toggle.icon-btn {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(288px, 86vw);
    height: calc(100vh - var(--topbar-height));
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 16px 12px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
    overflow: hidden;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(16, 24, 40, 0.12);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-height) 0 0 0;
    z-index: 45;
    background: rgba(16, 24, 40, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  .main {
    padding: 22px 18px 40px;
  }

  .user-name {
    display: none;
  }

  .notif-menu-panel {
    position: fixed;
    top: calc(var(--topbar-height) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }

  .cards-row,
  .shortcuts {
    grid-template-columns: 1fr;
  }

  .split-panels,
  .manual-layout,
  .filters-bar,
  .perm-grid {
    grid-template-columns: 1fr;
  }

  .cal-layout {
    grid-template-columns: 1fr;
  }

  .cal-month-card {
    position: relative;
    top: auto;
  }

  .cal-event-item {
    grid-template-columns: 48px minmax(0, 1fr) 32px;
  }

  .cal-event-modelo,
  .cal-event-color {
    grid-column: 2;
  }

  .cal-event-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .manual-toc {
    position: static;
  }

  .section-toolbar .btn-compact {
    height: 34px;
    padding: 0 12px;
    font-size: 0.8125rem;
  }

  .modal {
    padding: 12px;
    align-items: flex-start;
  }

  .modal-panel {
    margin-top: 12px;
    padding: 18px 16px 16px;
  }
}
