﻿/*
 * Noche
 * Direcci├│n visual tomada de la referencia: grafito, malva ahumado, negro
 * suave y ├ímbar reservado para la selecci├│n. No utiliza azul como base.
 */

.noche-preview {
  position: relative;
  grid-template-columns: 0.72fr 1fr 0.92fr;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 38%),
    linear-gradient(145deg, #45434c 0%, #282730 58%, #111015 100%);
}

.noche-preview::after {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 28%;
  width: 3px;
  content: "";
  background: #eea314;
  box-shadow: 0 0 9px rgba(238, 163, 20, 0.42);
}

.noche-preview span {
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1px;
}

.noche-preview span:nth-child(1) {
  background: linear-gradient(150deg, #383640, #292731);
}

.noche-preview span:nth-child(2) {
  background: linear-gradient(150deg, #43414c, #302f39);
}

.noche-preview span:nth-child(3) {
  background: linear-gradient(150deg, #292832, #17161c);
}

body.theme-noche {
  --n-bg-deep: #121116;
  --n-bg: #1d1c22;
  --n-plane: #2d2c35;
  --n-plane-high: #393741;
  --n-plane-soft: #26252d;
  --n-text: #e9e6e9;
  --n-muted: #aaa6ad;
  --n-line: rgba(255, 255, 255, 0.075);
  --n-line-strong: rgba(255, 255, 255, 0.13);
  --n-amber: #eaa014;
  --n-amber-soft: rgba(234, 160, 20, 0.16);
  --n-success: #86b496;
  --n-danger: #d28787;

  --bg: var(--n-bg);
  --panel: var(--n-plane);
  --text: var(--n-text);
  --muted: var(--n-muted);
  --line: var(--n-line);
  --primary: var(--n-amber);
  --danger: var(--n-danger);
  --success: var(--n-success);
  --accent-blue: #77737c;
  --accent-green: var(--n-success);
  --accent-coral: #b27c76;

  --ui-bg: var(--n-bg);
  --ui-surface: var(--n-plane);
  --ui-surface-2: var(--n-plane-soft);
  --ui-ink: var(--n-text);
  --ui-ink-soft: #cac5cb;
  --ui-muted: var(--n-muted);
  --ui-line: var(--n-line);
  --ui-line-strong: var(--n-line-strong);
  --ui-blue: var(--n-amber);
  --ui-teal: #8d8981;
  --ui-green: var(--n-success);
  --ui-amber: var(--n-amber);
  --ui-red: var(--n-danger);
  --ui-violet: #9a909e;
  --ui-radius: 3px;
  --ui-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  --ui-shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.2);

  min-height: 100vh;
  color: var(--n-text);
  color-scheme: dark;
  background:
    radial-gradient(ellipse at 76% -10%, rgba(255, 255, 255, 0.14), transparent 40%),
    radial-gradient(ellipse at -8% 74%, rgba(0, 0, 0, 0.72), transparent 50%),
    linear-gradient(135deg, #4a4852 0%, #2a2931 48%, #121116 100%);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

body.theme-noche::selection {
  color: #211b11;
  background: #eaa014;
}

body.theme-noche a {
  color: #e8e4e8;
}

body.theme-noche img {
  image-rendering: auto;
}

body.theme-noche::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.theme-noche::-webkit-scrollbar-track {
  background: #17161c;
}

body.theme-noche::-webkit-scrollbar-thumb {
  border: 2px solid #17161c;
  border-radius: 99px;
  background: #5a5761;
}

body.theme-noche::-webkit-scrollbar-thumb:hover {
  background: #78747d;
}

/* Estructura principal: planos planos, sobrios y con profundidad delicada. */
body.theme-noche[class*="role-"] .app-shell {
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: 100dvh;
  background: transparent;
}

body.theme-noche[class*="role-"] .sidebar {
  z-index: 50;
  padding: 26px 18px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0;
  color: var(--n-text);
  background:
    linear-gradient(145deg, rgba(72, 70, 81, 0.9), rgba(43, 42, 51, 0.97) 45%, rgba(31, 30, 37, 0.99));
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.17);
}

body.theme-noche .sidebar-brand {
  gap: 10px;
  margin: 0 5px 28px;
  color: #f0edf0;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.015em;
}

body.theme-noche .brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #f1eee9;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.3), transparent 31%),
    #3e3b43;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 5px 11px rgba(0, 0, 0, 0.2);
  font-size: 0.68rem;
  font-weight: 600;
}

body.theme-noche img.brand-mark {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-noche .sidebar-user {
  position: relative;
  gap: 4px;
  margin: 0 4px 22px;
  padding: 15px 15px 15px 60px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0;
  background: transparent;
}

body.theme-noche .sidebar-user::before {
  position: absolute;
  top: 13px;
  left: 10px;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  content: "";
  background:
    radial-gradient(circle at 50% 37%, #d0a084 0 18%, transparent 19%),
    radial-gradient(ellipse at 50% 105%, #50424a 0 37%, transparent 38%),
    linear-gradient(145deg, #857a7d, #3a3840);
  box-shadow: 0 5px 13px rgba(0, 0, 0, 0.28);
}

body.theme-noche .sidebar-user strong {
  color: #f1eef1;
  font-size: 0.89rem;
  font-weight: 500;
}

body.theme-noche .sidebar-user span {
  color: #b8b3ba;
  font-size: 0.72rem;
  font-weight: 400;
}

body.theme-noche .nav-section {
  padding: 17px 10px 6px;
  color: #8d8990;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

body.theme-noche .side-nav {
  gap: 1px;
}

body.theme-noche .side-nav a {
  position: relative;
  min-height: 38px;
  padding: 0 12px 0 18px;
  border: 0;
  border-radius: 0;
  color: #c9c5ca;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 150ms ease, background 150ms ease;
}

body.theme-noche .side-nav a::before {
  display: none;
}

body.theme-noche .side-nav a::after {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  content: "";
  opacity: 0;
  background: #eea314;
  box-shadow: 0 0 8px rgba(238, 163, 20, 0.34);
  transition: opacity 150ms ease;
}

body.theme-noche .side-nav a:hover,
body.theme-noche .side-nav a:focus-visible {
  color: #fffdfd;
  background: rgba(255, 255, 255, 0.035);
}

body.theme-noche .side-nav a.active,
body.theme-noche .side-nav a[aria-current="page"] {
  color: #fffdfb;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent);
}

body.theme-noche .side-nav a.active::after,
body.theme-noche .side-nav a[aria-current="page"]::after {
  opacity: 1;
}

body.theme-noche[class*="role-"] .main-area {
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(rgba(28, 27, 33, 0.77), rgba(28, 27, 33, 0.77)),
    radial-gradient(ellipse at 84% 2%, rgba(255, 255, 255, 0.08), transparent 29%);
}

body.theme-noche[class*="role-"] .topbar,
body.theme-noche .public-topbar {
  min-height: 66px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  color: var(--n-text);
  background: rgba(43, 42, 50, 0.76);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(9px);
}

body.theme-noche .public-topbar .brand {
  color: #f0edf0;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.theme-noche[class*="role-"] .topbar strong {
  color: #ece9ec;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

body.theme-noche .eyebrow {
  color: #aaa5ac;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

body.theme-noche[class*="role-"] .topbar form button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 2px;
  color: #d7d2d8;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 400;
}

body.theme-noche[class*="role-"] .topbar form button:hover {
  border-color: rgba(238, 163, 20, 0.5);
  color: #f2c463;
  background: rgba(238, 163, 20, 0.08);
  transform: none;
}

body.theme-noche .hamburger-button {
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.035);
}

body.theme-noche .hamburger-button span {
  background: #ded9de;
}

body.theme-noche .nav-scrim {
  background: rgba(10, 9, 12, 0.72);
  backdrop-filter: blur(3px);
}

body.theme-noche[class*="role-"] .page,
body.theme-noche:not([class*="role-"]) .page {
  width: min(100% - 56px, 1300px);
  margin: 28px auto 48px;
}

/* Superficies: planos de grafito, bordes finos y relieve bajo. */
body.theme-noche .panel,
body.theme-noche .theme-card,
body.theme-noche .download-item,
body.theme-noche .security-empty-state,
body.theme-noche .security-pin-form,
body.theme-noche .last-payments-panel,
body.theme-noche .delivery-pending-card,
body.theme-noche .delivery-item,
body.theme-noche .security-info-grid article,
body.theme-noche .ops-hero,
body.theme-noche .ops-filter-panel,
body.theme-noche .ops-data-panel,
body.theme-noche .ops-metrics article,
body.theme-noche .resident-action-card,
body.theme-noche .resident-delivery-create-card,
body.theme-noche .maint-summary article,
body.theme-noche .maint-section,
body.theme-noche .area-card,
body.theme-noche .catalog-card,
body.theme-noche .form-card,
body.theme-noche .import-schema-card,
body.theme-noche .import-upload-card,
body.theme-noche .import-summary-grid article,
body.theme-noche .import-error-card,
body.theme-noche .service-report-card,
body.theme-noche .audit-card,
body.theme-noche .payment-board-row,
body.theme-noche .survey-result-summary article,
body.theme-noche .admin-results,
body.theme-noche .admin-payment-edit-workspace .access-info-card,
body.theme-noche .admin-payment-form-card,
body.theme-noche .admin-receipt-view,
body.theme-noche .admin-payments-table-card,
body.theme-noche .bulk-command-bar {
  border-color: var(--n-line);
  border-radius: 3px;
  color: var(--n-text);
  background:
    linear-gradient(145deg, rgba(66, 64, 75, 0.72), rgba(43, 42, 51, 0.9)),
    var(--n-plane);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), var(--ui-shadow-sm);
}

body.theme-noche .panel:hover,
body.theme-noche .theme-card:hover,
body.theme-noche .download-item:hover,
body.theme-noche .resident-action-card:hover,
body.theme-noche .ops-metrics article:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 15px 28px rgba(0, 0, 0, 0.24);
  transform: none;
}

body.theme-noche .section-header {
  align-items: flex-end;
  margin-bottom: 22px;
  padding-bottom: 15px;
  border-bottom-color: var(--n-line);
}

body.theme-noche :is(h1, h2, h3, h4),
body.theme-noche .section-header h1,
body.theme-noche .panel h1,
body.theme-noche .panel h2,
body.theme-noche .ops-hero h1,
body.theme-noche .ops-hero h2 {
  color: #f0edf0;
  font-weight: 500;
  letter-spacing: -0.012em;
}

body.theme-noche .section-header h1,
body.theme-noche .ops-hero h1 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

body.theme-noche :is(.section-header p, .panel p, .ops-hero p, .help-text, .muted-note) {
  color: #aaa6ad;
}

body.theme-noche .ops-kicker,
body.theme-noche .ops-metrics span,
body.theme-noche .ops-metrics small {
  color: #aaa5ac;
  font-weight: 500;
}

body.theme-noche .ops-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.075), transparent 43%),
    linear-gradient(145deg, #3c3a45, #292831 66%, #222128);
}

body.theme-noche .ops-hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, transparent 60%, rgba(0, 0, 0, 0.12));
}

body.theme-noche .ops-hero > * {
  position: relative;
  z-index: 1;
}

/* Formularios y controles. */
body.theme-noche label,
body.theme-noche .capture-section label:not(.checkbox-label):not(.setting-toggle):not(.payment-type-option):not(.switch-control),
body.theme-noche .admin-payment-fields label {
  color: #c4bfc6;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

body.theme-noche .page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.theme-noche .page select,
body.theme-noche .page textarea,
body.theme-noche .table-control,
body.theme-noche .admin-payment-fields input,
body.theme-noche .admin-payment-fields select,
body.theme-noche .capture-section input:not([type="checkbox"]):not([type="radio"]),
body.theme-noche .capture-section select,
body.theme-noche .capture-section textarea {
  border-color: rgba(255, 255, 255, 0.115);
  border-radius: 2px;
  color: #e8e4e8;
  background: rgba(16, 15, 20, 0.42);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  font-weight: 400;
}

body.theme-noche .page input::placeholder,
body.theme-noche .page textarea::placeholder {
  color: #817d85;
}

body.theme-noche .page select {
  color-scheme: dark;
}

body.theme-noche .page select option {
  color: #e8e4e8;
  background: #292831;
}

body.theme-noche .page input:focus,
body.theme-noche .page select:focus,
body.theme-noche .page textarea:focus,
body.theme-noche .table-control:focus {
  border-color: rgba(234, 160, 20, 0.78);
  outline: 2px solid rgba(234, 160, 20, 0.16);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

body.theme-noche input[type="checkbox"],
body.theme-noche input[type="radio"] {
  accent-color: #df9511;
}

body.theme-noche .page button,
body.theme-noche .page .button-link,
body.theme-noche .page .security-primary-action,
body.theme-noche .page .ops-action.primary,
body.theme-noche .page .bulk-command-actions button {
  min-height: 40px;
  border: 1px solid #d58d0e;
  border-radius: 2px;
  color: #211b12;
  background: linear-gradient(180deg, #eca921, #cf850b);
  box-shadow: inset 0 1px 0 rgba(255, 247, 222, 0.32), 0 5px 11px rgba(0, 0, 0, 0.18);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  transition: background 150ms ease, border-color 150ms ease;
}

body.theme-noche .page button:hover,
body.theme-noche .page .button-link:hover,
body.theme-noche .page .security-primary-action:hover,
body.theme-noche .page .ops-action.primary:hover,
body.theme-noche .page .bulk-command-actions button:hover {
  border-color: #f3b738;
  color: #211b12;
  background: #eba821;
  box-shadow: inset 0 1px 0 rgba(255, 247, 222, 0.36), 0 6px 12px rgba(0, 0, 0, 0.22);
  transform: none;
}

body.theme-noche .page .button-link.secondary,
body.theme-noche .page .secondary-button,
body.theme-noche .page .security-secondary-action,
body.theme-noche .page .ops-action:not(.primary),
body.theme-noche .page .bulk-command-actions button[value="save"],
body.theme-noche .page .payment-row-actions a,
body.theme-noche .page .payment-row-actions .action-icon {
  border-color: rgba(255, 255, 255, 0.14);
  color: #ded9df;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

body.theme-noche .page .button-link.secondary:hover,
body.theme-noche .page .secondary-button:hover,
body.theme-noche .page .security-secondary-action:hover,
body.theme-noche .page .ops-action:not(.primary):hover,
body.theme-noche .page .payment-row-actions a:hover,
body.theme-noche .page .payment-row-actions .action-icon:hover {
  border-color: rgba(234, 160, 20, 0.58);
  color: #f2c364;
  background: rgba(234, 160, 20, 0.08);
}

body.theme-noche .page button.danger,
body.theme-noche .page .payment-row-actions button.danger,
body.theme-noche .page .payment-row-actions .action-icon.danger {
  border-color: #a65d60;
  color: #f7e9e9;
  background: #a96164;
}

body.theme-noche .page button:disabled {
  border-color: rgba(255, 255, 255, 0.08);
  color: #918c94;
  background: #4a4851;
  box-shadow: none;
}

/* Informaci├│n, m├®tricas y tablas: densidad ligera, sin tarjetas llamativas. */
body.theme-noche .metric-grid,
body.theme-noche .ops-metrics {
  gap: 10px;
}

body.theme-noche .metric-card,
body.theme-noche .ops-metrics article {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid var(--n-line);
  border-radius: 2px;
  color: var(--n-text);
  background: linear-gradient(145deg, #393741, #2c2b33);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 9px 18px rgba(0, 0, 0, 0.16);
}

body.theme-noche .metric-card::before,
body.theme-noche .ops-metrics article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  content: "";
  background: rgba(234, 160, 20, 0.65);
}

body.theme-noche .metric-card:nth-child(2),
body.theme-noche .ops-metrics article:nth-child(2) {
  background: linear-gradient(145deg, #34333b, #28272e);
}

body.theme-noche .metric-card:nth-child(3),
body.theme-noche .ops-metrics article:nth-child(3) {
  background: linear-gradient(145deg, #3b383d, #2a282d);
}

body.theme-noche .metric-card:nth-child(4),
body.theme-noche .ops-metrics article:nth-child(4) {
  background: linear-gradient(145deg, #35323a, #242329);
}

body.theme-noche .metric-card:nth-child(5),
body.theme-noche .ops-metrics article:nth-child(5) {
  background: linear-gradient(145deg, #403a35, #2c2825);
}

body.theme-noche .metric-card span,
body.theme-noche .ops-metrics span,
body.theme-noche .ops-metrics small {
  color: #b9b4bb;
}

body.theme-noche .metric-card strong,
body.theme-noche .ops-metrics strong,
body.theme-noche .maint-summary strong {
  color: #f0eded;
  font-weight: 500;
}

body.theme-noche .table-wrap,
body.theme-noche .payment-grid-wrap,
body.theme-noche .admin-payments-table-card,
body.theme-noche .admin-payments-table-scroll {
  border-color: var(--n-line);
  border-radius: 2px;
  background: rgba(29, 28, 34, 0.58);
}

body.theme-noche .page table,
body.theme-noche .page .payment-grid {
  color: #ded9df;
}

body.theme-noche .page th,
body.theme-noche .page .payment-grid th,
body.theme-noche .page .admin-payments-table th {
  border-color: var(--n-line);
  color: #aaa5ad;
  background: rgba(61, 59, 69, 0.78);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.07em;
}

body.theme-noche .page td,
body.theme-noche .page .payment-grid td,
body.theme-noche .page .admin-payments-table td {
  border-color: var(--n-line);
}

body.theme-noche .page tr:hover td,
body.theme-noche .page .admin-payments-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

body.theme-noche .payment-grid-name {
  color: #e8e4e8;
  background: #2b2a32;
}

body.theme-noche .payment-grid-cell.status-approved {
  color: #b5d2bf;
  background: rgba(134, 180, 150, 0.13);
}

body.theme-noche .payment-grid-cell.status-pending {
  color: #efc567;
  background: rgba(234, 160, 20, 0.12);
}

body.theme-noche .payment-grid-cell.status-rejected,
body.theme-noche .payment-grid-cell.status-overdue {
  color: #e4aaaa;
  background: rgba(210, 135, 135, 0.12);
}

body.theme-noche .payment-grid-cell.status-none,
body.theme-noche .payment-grid-empty {
  color: #827e86;
  background: rgba(255, 255, 255, 0.02);
}

body.theme-noche .payment-badge,
body.theme-noche .calendar-chip,
body.theme-noche .theme-badge {
  border: 1px solid rgba(234, 160, 20, 0.4);
  border-radius: 99px;
  color: #f0c260;
  background: rgba(234, 160, 20, 0.1);
  font-weight: 500;
}

body.theme-noche .payment-badge.status-approved,
body.theme-noche .calendar-chip.status-approved {
  border-color: rgba(134, 180, 150, 0.42);
  color: #b7d6c2;
  background: rgba(134, 180, 150, 0.12);
}

body.theme-noche .payment-badge.status-rejected {
  border-color: rgba(210, 135, 135, 0.45);
  color: #ebb0b0;
  background: rgba(210, 135, 135, 0.12);
}

body.theme-noche .filters,
body.theme-noche .calendar-toolbar,
body.theme-noche .ops-panel-heading,
body.theme-noche .admin-receipt-view-head,
body.theme-noche .admin-payment-form-card .form-command-bar,
body.theme-noche .capture-card:has(.capture-section) .form-command-bar,
body.theme-noche .bulk-command-bar,
body.theme-noche .slide-panel-header,
body.theme-noche .slide-panel-footer {
  border-color: var(--n-line);
  background: rgba(51, 49, 58, 0.78);
}

body.theme-noche .calendar-day {
  border-color: var(--n-line);
  color: #e8e4e8;
  background: rgba(30, 29, 35, 0.46);
}

body.theme-noche .calendar-day:hover,
body.theme-noche .calendar-day:focus {
  color: #fffdf7;
  background: rgba(234, 160, 20, 0.08);
}

body.theme-noche .calendar-day.has-event {
  background: rgba(255, 255, 255, 0.045);
}

body.theme-noche .muted-day {
  color: #77727b;
  background: rgba(0, 0, 0, 0.1);
}

body.theme-noche .calendar-event,
body.theme-noche .schema-list article,
body.theme-noche .pending-service-stack article,
body.theme-noche .payment-type-option,
body.theme-noche .bulk-service-options label,
body.theme-noche .resident-delivery-card,
body.theme-noche .resident-link-list a,
body.theme-noche .payment-service-list span,
body.theme-noche .admin-receipt-panel.is-empty {
  border-color: var(--n-line);
  color: #ddd8de;
  background: rgba(23, 22, 27, 0.32);
}

body.theme-noche .calendar-event:hover,
body.theme-noche .resident-link-list a:hover,
body.theme-noche .resident-link-list a:focus {
  color: #f4f0f3;
  background: rgba(255, 255, 255, 0.045);
}

body.theme-noche .calendar-event span,
body.theme-noche .calendar-event small,
body.theme-noche .resident-link-list span,
body.theme-noche .payment-service-list span {
  color: #a49fa7;
}

/* Contextos de seguridad y emergencia: contraste alto sin romper sem├íntica. */
body.theme-noche .security-app-header {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--n-line);
}

body.theme-noche .security-brand strong {
  color: #eeeaf0;
  font-size: 1rem;
  font-weight: 500;
}

body.theme-noche .security-shield,
body.theme-noche .security-profile {
  border: 1px solid var(--n-line-strong);
  border-radius: 50%;
  color: #ded9df;
  background: rgba(255, 255, 255, 0.045);
}

body.theme-noche .security-shield {
  color: #241d11;
  background: #e1a019;
}

body.theme-noche .security-profile {
  border-radius: 2px;
}

body.theme-noche .security-profile:hover,
body.theme-noche .security-profile:focus-visible {
  border-color: rgba(234, 160, 20, 0.55);
  color: #efc467;
  background: rgba(234, 160, 20, 0.08);
}

body.theme-noche .security-home h1,
body.theme-noche .security-scanner-header h1,
body.theme-noche .security-pin-view h1 {
  color: #efebef;
  font-weight: 500;
}

body.theme-noche .security-status-card,
body.theme-noche .visitor-hero-card,
body.theme-noche .ops-residence-chip {
  border: 1px solid var(--n-line);
  border-radius: 3px;
  color: #eeeaee;
  background: linear-gradient(145deg, #403e48, #292830);
  box-shadow: var(--ui-shadow-sm);
}

body.theme-noche .security-status-card span,
body.theme-noche .visitor-hero-card span {
  color: #b5b0b8;
}

body.theme-noche .page .security-action-card {
  border-color: var(--n-line);
  border-radius: 3px;
  color: #eeeaee;
  background: linear-gradient(145deg, #393741, #292831);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), var(--ui-shadow-sm);
}

body.theme-noche .page .security-action-card:hover,
body.theme-noche .page .security-action-card:focus-visible {
  border-color: rgba(234, 160, 20, 0.38);
  color: #fffdf9;
  background: linear-gradient(145deg, #41404a, #2d2c34);
}

body.theme-noche .security-action-icon {
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #ede9ed;
  background: #4a4651;
}

body.theme-noche .security-action-icon.pin-icon {
  color: #e8e3e8;
  background: #37343b;
}

body.theme-noche .security-scanner-header span,
body.theme-noche .security-scanner-help,
body.theme-noche .security-pin-help,
body.theme-noche .security-pin-input-wrap span {
  color: #aaa5ad;
}

body.theme-noche .security-back-link,
body.theme-noche .security-pin-context a {
  border: 1px solid var(--n-line-strong);
  border-radius: 2px;
  color: #ddd8de;
  background: rgba(255, 255, 255, 0.04);
}

body.theme-noche .security-camera-stage,
body.theme-noche .security-video {
  border: 1px solid var(--n-line);
  border-radius: 3px;
  background: #0d0c10;
}

body.theme-noche .security-scan-guide::before,
body.theme-noche .security-scan-guide::after,
body.theme-noche .security-scan-guide i::before,
body.theme-noche .security-scan-guide i::after {
  border-color: #eaa014;
}

body.theme-noche .security-scan-status {
  border-color: #8d9188;
  color: #d8ddd6;
  background: rgba(88, 96, 86, 0.34);
}

body.theme-noche .security-scan-status strong {
  color: #eef1ed;
}

body.theme-noche .security-scan-status[data-state="denied"],
body.theme-noche .security-scan-status[data-state="error"] {
  border-color: #c87777;
  color: #efd0d0;
  background: rgba(105, 52, 55, 0.52);
}

body.theme-noche .security-scan-status[data-state="validating"] {
  border-color: #eaa014;
  color: #f0c971;
  background: rgba(116, 79, 21, 0.42);
}

body.theme-noche .security-scanner-instruction,
body.theme-noche .security-panel-link,
body.theme-noche .security-pin-view,
body.theme-noche .security-pin-message {
  color: #c7c2c9;
}

body.theme-noche .page .pin-keypad button {
  border-color: var(--n-line-strong);
  border-radius: 2px;
  color: #e6e2e7;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

body.theme-noche .page .pin-keypad button:hover,
body.theme-noche .page .pin-keypad button:focus-visible,
body.theme-noche .pin-keypad button:active {
  border-color: rgba(234, 160, 20, 0.55);
  color: #f6e4bf;
  background: rgba(234, 160, 20, 0.13);
}

body.theme-noche .pin-dots span {
  border-color: #79747c;
}

body.theme-noche .pin-dots span.filled {
  border-color: #df9511;
  background: #df9511;
}

body.theme-noche .security-result-state span {
  border: 1px solid rgba(134, 180, 150, 0.42);
  color: #c1dec9;
  background: rgba(82, 118, 94, 0.38);
}

body.theme-noche .security-result-state strong {
  color: #c1dec9;
}

body.theme-noche .security-result-state.denied span {
  border-color: rgba(210, 135, 135, 0.48);
  color: #efbaba;
  background: rgba(110, 55, 58, 0.5);
}

body.theme-noche .security-result-state.denied strong,
body.theme-noche .security-pin-message .error {
  color: #eab2b2;
}

body.theme-noche .security-pin-message .loading {
  color: #efc365;
}

body.theme-noche .visitor-avatar {
  border-color: rgba(255, 255, 255, 0.22);
  color: #e9e5e9;
  background: #4a4651;
}

body.theme-noche .slide-panel-overlay {
  background: rgba(11, 10, 14, 0.72);
}

body.theme-noche .slide-panel {
  border-left-color: var(--n-line);
  border-radius: 0;
  color: var(--n-text);
  background: linear-gradient(145deg, #3a3842, #24232a);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.34);
}

body.theme-noche .slide-panel-close {
  color: #cbc6cd;
  background: transparent;
  box-shadow: none;
}

body.theme-noche .slide-panel-close:hover {
  color: #f0c260;
  background: rgba(234, 160, 20, 0.08);
}

body.theme-noche .message,
body.theme-noche .toast {
  border-color: var(--n-line-strong);
  border-radius: 2px;
  color: #e2dde3;
  background: #34323b;
  box-shadow: var(--ui-shadow-sm);
}

body.theme-noche .message.success,
body.theme-noche .toast.success {
  border-left-color: #86b496;
  color: #c6e1ce;
  background: #33443a;
}

body.theme-noche .message.error,
body.theme-noche .toast.error {
  border-left-color: #d28787;
  color: #f0c6c6;
  background: #4b3033;
}

body.theme-noche .admin-receipt-panel {
  border-color: rgba(234, 160, 20, 0.26);
  border-radius: 2px;
  background: rgba(103, 76, 28, 0.28);
}

body.theme-noche .admin-receipt-panel a,
body.theme-noche .admin-receipt-view-head a {
  border-radius: 2px;
  color: #211b12;
  background: #e0a019;
}

body.theme-noche .admin-receipt-frame {
  background: #151419;
}

body.theme-noche .admin-payments-table tbody tr.needs-assignment {
  background: rgba(234, 160, 20, 0.075);
}

body.theme-noche .payment-row-actions button {
  border-radius: 2px;
  color: #211b12;
  background: #df9913;
}

body.theme-noche .payment-row-actions .action-icon.receipt-action,
body.theme-noche .table-link {
  color: #efc263;
}

body.theme-noche .payment-row-actions .action-icon.disabled {
  color: #77727b;
  background: rgba(255, 255, 255, 0.025);
}

body.theme-noche .payment-type-option:has(input:checked),
body.theme-noche .bulk-service-options label:has(input:checked) {
  border-color: rgba(234, 160, 20, 0.48);
  color: #f0cf8c;
  background: rgba(234, 160, 20, 0.09);
}

body.theme-noche .payment-missing,
body.theme-noche .approval-warning {
  color: #efc263 !important;
}

body.theme-noche .theme-card {
  overflow: hidden;
}

body.theme-noche .theme-card h2,
body.theme-noche .download-item h2 {
  color: #efebef;
}

body.theme-noche .theme-card p {
  color: #aaa5ad;
}

body.theme-noche .theme-preview {
  border: 1px solid var(--n-line);
  border-radius: 2px;
}

body.theme-noche .qr-preview img,
body.theme-noche .access-token-card img {
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  background: #ffffff;
}

body.theme-noche .scanner-video {
  border-color: var(--n-line-strong);
  border-radius: 3px;
  background: #0d0c10;
}

body.theme-noche .panic-fab {
  border: 2px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  background: #b95459;
  box-shadow: 0 10px 22px rgba(67, 15, 21, 0.45);
}

body.theme-noche .panic-overlay {
  background: rgba(26, 11, 14, 0.94);
  backdrop-filter: blur(6px);
}

body.theme-noche .panic-overlay-content {
  padding: 26px;
  border: 1px solid rgba(226, 138, 138, 0.36);
  border-radius: 3px;
  background: #4a292e;
  box-shadow: 0 25px 54px rgba(0, 0, 0, 0.48);
}

body.theme-noche .panic-dismiss-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 2px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/*
 * El m├│dulo de garita ten├¡a un layout propio que desactivaba el shell com├║n.
 * Bajo Noche vuelve al mismo rail y conserva la jerarqu├¡a de la referencia.
 */
body.theme-noche.role-security .app-shell,
body.theme-noche.role-seguridad .app-shell {
  display: grid !important;
  grid-template-columns: 278px minmax(0, 1fr) !important;
}

body.theme-noche.role-security .sidebar,
body.theme-noche.role-seguridad .sidebar {
  display: block !important;
}

body.theme-noche.role-security .main-area,
body.theme-noche.role-seguridad .main-area {
  display: block;
  width: auto !important;
  min-width: 0;
  background:
    linear-gradient(rgba(28, 27, 33, 0.77), rgba(28, 27, 33, 0.77)),
    radial-gradient(ellipse at 84% 2%, rgba(255, 255, 255, 0.08), transparent 29%) !important;
}

body.theme-noche.role-security .page,
body.theme-noche.role-seguridad .page {
  width: min(100% - 56px, 1300px) !important;
  max-width: none;
}

body.theme-noche .security-dashboard {
  width: 100%;
  max-width: none;
  color: var(--n-text);
}

body.theme-noche .security-dashboard-header {
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--n-line);
}

body.theme-noche .security-dashboard-kicker {
  color: #aaa5ac;
  font-weight: 500;
  letter-spacing: 0.11em;
}

body.theme-noche .security-live-status {
  border-color: rgba(134, 180, 150, 0.32);
  color: #b8d4c1;
  background: rgba(134, 180, 150, 0.1);
}

body.theme-noche .security-shift-card {
  border: 1px solid var(--n-line);
  border-radius: 3px;
  color: #efebef;
  background: linear-gradient(145deg, #403e48, #292831);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), var(--ui-shadow-sm);
}

body.theme-noche .security-shift-card span,
body.theme-noche .security-shift-card time {
  color: #b5b0b8;
}

body.theme-noche .security-dashboard-section {
  margin-top: 26px;
}

body.theme-noche .security-dashboard-section h2,
body.theme-noche .security-section-heading h2 {
  color: #eeeaf0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

body.theme-noche .security-quick-actions {
  gap: 10px;
}

body.theme-noche .security-quick-action,
body.theme-noche .security-quick-action.primary,
body.theme-noche .security-quick-action.primary.pin,
body.theme-noche .security-quick-action.secondary {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--n-line);
  border-radius: 3px;
  color: #ebe7ec;
  background: linear-gradient(145deg, #393741, #2a2931);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 8px 17px rgba(0, 0, 0, 0.16);
}

body.theme-noche .security-quick-action.primary::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  content: "";
  background: #eaa014;
}

body.theme-noche .security-quick-action:hover,
body.theme-noche .security-quick-action:focus-visible {
  border-color: rgba(234, 160, 20, 0.45);
  color: #fffdfb;
  background: linear-gradient(145deg, #42404a, #302f37);
  transform: none;
}

body.theme-noche .security-action-glyph {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 2px;
  color: #ddd8de;
  background: rgba(255, 255, 255, 0.05);
}

body.theme-noche .security-quick-action strong {
  color: #f0edf0;
  font-weight: 500;
}

body.theme-noche .security-quick-action span:not(.security-action-glyph) {
  color: #aaa5ad;
}

body.theme-noche .security-daily-summary {
  border-color: var(--n-line);
  border-radius: 3px;
  background: rgba(42, 41, 49, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body.theme-noche .security-daily-summary article {
  border-color: var(--n-line);
}

body.theme-noche .security-daily-summary strong {
  color: #eaa014;
  font-weight: 500;
}

body.theme-noche .security-daily-summary span {
  color: #aaa5ad;
}

body.theme-noche .security-empty-state {
  border-color: var(--n-line);
  border-radius: 3px;
  color: #aaa5ad;
  background: rgba(42, 41, 49, 0.52);
}

body.theme-noche .security-empty-state strong {
  color: #e7e2e8;
  font-weight: 500;
}

body.theme-noche :focus-visible {
  outline: 2px solid rgba(234, 160, 20, 0.72);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  body.theme-noche.role-security .app-shell,
  body.theme-noche.role-seguridad .app-shell {
    display: block !important;
    grid-template-columns: none !important;
  }

  body.theme-noche.role-security .main-area,
  body.theme-noche.role-seguridad .main-area {
    width: 100% !important;
  }

  body.theme-noche[class*="role-"] .sidebar {
    width: min(300px, calc(100vw - 48px));
    padding: 24px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 3px 3px 0;
    box-shadow: 18px 0 42px rgba(0, 0, 0, 0.42);
  }

  body.theme-noche[class*="role-"] .topbar {
    padding: 0 18px;
  }

  body.theme-noche[class*="role-"] .side-nav a {
    min-height: 38px;
    padding: 0 12px 0 18px;
  }

  body.theme-noche[class*="role-"] .page,
  body.theme-noche:not([class*="role-"]) .page {
    width: min(100% - 32px, 820px);
    margin: 20px auto 36px;
  }
}

@media (max-width: 620px) {
  body.theme-noche .public-topbar {
    min-height: 60px;
    padding: 0 18px;
  }

  body.theme-noche[class*="role-"] .topbar {
    min-height: 62px;
    padding: 0 14px;
  }

  body.theme-noche[class*="role-"] .topbar strong {
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.theme-noche[class*="role-"] .topbar form {
    display: flex;
    flex: 0 0 auto;
  }

  body.theme-noche[class*="role-"] .topbar form button {
    min-width: 38px;
    padding: 0 8px;
    font-size: 0 !important;
  }

  body.theme-noche[class*="role-"] .topbar form button::after {
    content: "Salir";
    font-size: 0.7rem;
  }

  body.theme-noche .panel {
    padding: 18px;
  }

  body.theme-noche .section-header {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
  }

  body.theme-noche .metric-card,
  body.theme-noche .ops-metrics article {
    min-height: 108px;
  }

  body.theme-noche .calendar-day {
    min-height: 76px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.theme-noche[class*="role-"] .topbar,
  body.theme-noche .public-topbar {
    background: #302f38;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-noche *,
  body.theme-noche *::before,
  body.theme-noche *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* La referencia usa el ├ímbar como se├▒al, no como decoraci├│n repetida. */
body.theme-noche .metric-card::before,
body.theme-noche .ops-metrics article::before,
body.theme-noche .security-quick-action.primary::before {
  display: none;
}

body.theme-noche .security-app-header {
  display: none;
}

body.theme-noche .security-shield {
  color: #ebe7ec;
  background: #4a4651;
}

body.theme-noche .security-daily-summary strong {
  color: #eeeaf0;
}

/*
 * Residentes: las vistas de pagos, perfil y reservas ten├¡an superficies
 * expl├¡citamente claras en el redise├▒o heredado. Noche conserva el mismo
 * plano grafito en todos los estados y evita el ├ímbar como relleno masivo.
 */
body.theme-noche .page button,
body.theme-noche .page .button-link,
body.theme-noche .page .security-primary-action,
body.theme-noche .page .ops-action.primary,
body.theme-noche .page .bulk-command-actions button {
  border-color: rgba(255, 255, 255, 0.16);
  color: #e7e2e8;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 4px 10px rgba(0, 0, 0, 0.14);
  font-weight: 500;
}

body.theme-noche .page button:hover,
body.theme-noche .page .button-link:hover,
body.theme-noche .page .security-primary-action:hover,
body.theme-noche .page .ops-action.primary:hover,
body.theme-noche .page .bulk-command-actions button:hover {
  border-color: rgba(234, 160, 20, 0.48);
  color: #f2eee8;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 5px 12px rgba(0, 0, 0, 0.18);
}

body.theme-noche .page button.danger,
body.theme-noche .page .payment-row-actions button.danger,
body.theme-noche .page .payment-row-actions .action-icon.danger {
  border-color: rgba(202, 117, 117, 0.62);
  color: #f3dada;
  background: rgba(157, 72, 76, 0.62);
}

body.theme-noche .resident-ledger-panel,
body.theme-noche .payment-year-card,
body.theme-noche .payment-history-panel,
body.theme-noche .reservation-calendar-card,
body.theme-noche .access-info-card,
body.theme-noche .profile-password-card,
body.theme-noche .capture-card,
body.theme-noche .review-filter {
  border-color: var(--n-line);
  border-radius: 3px;
  color: var(--n-text);
  background:
    linear-gradient(145deg, rgba(63, 61, 71, 0.72), rgba(43, 42, 51, 0.9)),
    var(--n-plane);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--ui-shadow-sm);
}

body.theme-noche .detail-grid-list div {
  border-color: var(--n-line-strong);
  border-radius: 3px;
  background: rgba(26, 25, 31, 0.62);
}

body.theme-noche .detail-grid-list dt {
  color: #aaa5ad;
}

body.theme-noche .detail-grid-list dd {
  color: #ece8ed;
  font-weight: 500;
}

body.theme-noche .capture-section,
body.theme-noche .profile-password-card .form-command-bar {
  border-color: var(--n-line);
  background: rgba(31, 30, 36, 0.22);
}

body.theme-noche .capture-index {
  border-color: var(--n-line-strong);
  border-radius: 3px;
  color: #d9d4da;
  background: #47444d;
}

body.theme-noche .payment-month-tile {
  border-color: var(--n-line);
  border-radius: 3px;
  color: #dcd7de;
  background: #35333c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.theme-noche .payment-month-tile span {
  color: #aaa5ad;
}

body.theme-noche .payment-month-tile strong,
body.theme-noche .payment-month-tile a {
  color: #e8e4e9;
  font-weight: 500;
}

body.theme-noche .payment-month-tile.status-approved {
  border-color: rgba(123, 171, 143, 0.42);
  background: rgba(61, 89, 71, 0.46);
}

body.theme-noche .payment-month-tile.status-pending {
  border-color: rgba(175, 143, 78, 0.4);
  background: rgba(82, 67, 42, 0.48);
}

body.theme-noche .payment-month-tile.status-rejected,
body.theme-noche .payment-month-tile.status-overdue {
  border-color: rgba(190, 113, 113, 0.42);
  background: rgba(86, 49, 54, 0.48);
}

body.theme-noche .payment-month-tile.status-none {
  background: #35333c;
}

body.theme-noche .payment-history-card,
body.theme-noche .resident-reservation-card {
  border-color: var(--n-line);
  border-left-color: rgba(176, 139, 73, 0.72);
  border-radius: 3px;
  color: #e4dfe5;
  background: #36343d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.theme-noche .resident-reservation-card.status-approved {
  border-left-color: #7fb093;
}

body.theme-noche .resident-reservation-card.status-rejected,
body.theme-noche .resident-reservation-card.status-cancelled {
  border-left-color: #c57979;
}

body.theme-noche .payment-history-card h3,
body.theme-noche .resident-reservation-card h3 {
  color: #eeeaf0;
  font-weight: 500;
}

body.theme-noche .payment-history-card p,
body.theme-noche .resident-reservation-card p {
  color: #aaa5ad;
}

body.theme-noche .payment-history-card a,
body.theme-noche .resident-reservation-card a {
  color: #d9d4da;
}

body.theme-noche .reservation-calendar-card .calendar-toolbar,
body.theme-noche .reservation-calendar-card .reservation-calendar {
  border-color: var(--n-line);
  background: transparent;
}

body.theme-noche .reservation-calendar-card .calendar-weekdays span {
  color: #aaa5ad;
  border-color: var(--n-line);
}

body.theme-noche .reservation-calendar-card .calendar-day,
body.theme-noche .calendar-day {
  border-color: var(--n-line);
  border-radius: 2px;
  color: #e7e2e8;
  background: #34323b;
  box-shadow: none;
}

body.theme-noche .reservation-calendar-card .calendar-day strong,
body.theme-noche .calendar-day strong {
  color: #e8e4e9;
  font-weight: 500;
}

body.theme-noche .reservation-calendar-card .calendar-day:hover,
body.theme-noche .reservation-calendar-card .calendar-day:focus,
body.theme-noche .calendar-day:hover,
body.theme-noche .calendar-day:focus {
  border-color: rgba(234, 160, 20, 0.42);
  color: #f0ecef;
  background: #3c3943;
}

body.theme-noche .reservation-calendar-card .calendar-day.has-event,
body.theme-noche .calendar-day.has-event {
  border-color: rgba(127, 176, 147, 0.36);
  background: rgba(60, 89, 70, 0.48);
}

body.theme-noche .reservation-calendar-card .calendar-day.muted-day,
body.theme-noche .calendar-day.muted-day {
  color: #77727b;
  background: #292831;
}

body.theme-noche .resident-count {
  border-color: var(--n-line-strong);
  color: #b5b0b8;
  background: rgba(255, 255, 255, 0.025);
}

body.theme-noche .payment-legend {
  color: #b8b3ba;
}

body.theme-noche .payment-legend i.status-pending {
  background: #9b927b;
}

body.theme-noche .payment-badge.status-pending,
body.theme-noche .payment-badge.status-uploaded,
body.theme-noche .calendar-chip.status-pending {
  border-color: rgba(155, 146, 123, 0.52);
  color: #c9c2ad;
  background: rgba(155, 146, 123, 0.14);
}

body.theme-noche .calendar-day .event-dot.status-pending {
  background: #9b927b;
}

body.theme-noche .calendar-event.status-pending,
body.theme-noche .payment-history-card,
body.theme-noche .resident-reservation-card.status-pending {
  border-left-color: #9b927b;
}

/* Historial de accesos del residente: tarjetas oscuras y datos claros, sin paneles blancos. */
body.theme-noche .resident-record-card {
  border-color: var(--n-line);
  border-left-color: #4e4b57;
  color: #e7e2e7;
  background: linear-gradient(135deg, rgba(54, 52, 62, 0.92), rgba(37, 36, 43, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 8px 18px rgba(0, 0, 0, 0.12);
}

body.theme-noche .resident-record-card.status-active { border-left-color: #1ca77f; }
body.theme-noche .resident-record-card.status-used { border-left-color: #7486a8; }
body.theme-noche .resident-record-card.status-expired,
body.theme-noche .resident-record-card.status-disabled { border-left-color: #9c6268; }

body.theme-noche .resident-record-main h3 {
  color: #f1edf0;
}

body.theme-noche .resident-record-main p,
body.theme-noche .resident-evidence-row {
  color: #b6afb8;
}

body.theme-noche .record-type {
  color: #91dac9;
  background: rgba(28, 167, 127, 0.12);
}

body.theme-noche .resident-card-actions a {
  color: #c9c1cb;
}

body.theme-noche .resident-card-actions a:hover,
body.theme-noche .resident-card-actions a:focus-visible {
  color: #f4eff3;
}

body.theme-noche .resident-card-actions .danger {
  border-color: rgba(157, 94, 101, 0.58);
  color: #f2dddd;
  background: rgba(126, 66, 73, 0.6);
}

body.theme-noche .resident-card-actions .danger:hover,
body.theme-noche .resident-card-actions .danger:focus-visible {
  border-color: rgba(188, 112, 120, 0.7);
  background: rgba(145, 75, 82, 0.76);
}

body.theme-noche .pin-display,
body.theme-noche .pin-confirm-card > strong {
  color: #f0edf0;
}

body.theme-noche .access-share-card {
  background: #1e1c24;
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-noche .access-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e8e4e8;
}

body.theme-noche .access-action-btn:hover,
body.theme-noche .access-action-btn:focus-visible {
  border-color: #eaa014;
  background: rgba(234, 160, 20, 0.1);
}

body.theme-noche .access-action-btn.danger {
  border-color: rgba(220, 38, 38, 0.6);
  color: #f87171;
}

body.theme-noche .access-action-btn.danger:hover,
body.theme-noche .access-action-btn.danger:focus-visible {
  background: rgba(220, 38, 38, 0.1);
  border-color: #f87171;
}

body.theme-noche .access-volver-link {
  color: #eaa014;
}

body.theme-noche .access-volver-link:hover {
  background: rgba(234, 160, 20, 0.08);
}
