/* Authenticated workspace only. The original login styles are unchanged. */
body.portal-open {
  --navy: #f0f5fb;
  --ink: #e8edf3;
  --muted: #a6b5c4;
  --border: #303d49;
  --bg: #0b1015;
  --blue: #72b7ee;
  color-scheme: dark;
  color: var(--ink);
  background: #080c10;
}
.portal-open #shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "header header" "areas areas" "sidebar main";
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: clip;
  background: var(--bg);
}
.portal-open #shell[data-page="home"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "header" "areas" "main";
}
.portal-open #shell .workspace { display: contents; }
.portal-open #shell .platform-header {
  grid-area: header;
  height: auto;
  min-height: 76px;
  padding: 16px 22px 12px;
  background: #102d49;
  border: 0;
  gap: 20px;
}
.platform-brand { display: flex; align-items: center; gap: 13px; text-decoration: none; min-width: 0; }
.platform-logo { display: grid; place-items: center; width: 106px; padding: 6px 7px; border-radius: 6px; background: #fff; flex-shrink: 0; }
.platform-wordmark { color: #f5f7fb; font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.platform-wordmark small { display: block; margin-top: 4px; font-size: 9px; font-weight: 400; letter-spacing: .3px; color: #c0d1e2; }
.portal-open #shell .header-right { gap: 10px; }
.portal-open .icon-button { color: #c8d8e7; }
.portal-open .icon-button:hover { color: #fff; background: #25445f; }
.portal-open .account-avatar { width: 36px; height: 36px; border-radius: 50%; background: #2a4965; color: #fff; font-size: 11px; font-weight: 600; }
.portal-open .switch-user { background: transparent; color: #d1e0ed; border-color: #41607a; font-size: 12px; padding: 9px 12px; }
.portal-open .switch-user:hover { background: #25445f; }
.portal-open #shell .area-nav {
  grid-area: areas;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 9px;
  padding: 4px 22px 15px;
  background: #102d49;
  border: 0;
}
.portal-open .area-button {
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 20px;
  color: #bdcfe0;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.portal-open .area-button .icon { display: none; }
.portal-open .area-button.active { background: #fff; border-color: #fff; color: #14354f; }
.portal-open .area-button:hover:not(.active) { background: #24435f; color: #fff; }
.portal-open #shell .sidebar {
  grid-area: sidebar;
  position: static;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  padding: 22px 14px;
  background: #0e161f;
  border-right: 1px solid var(--border);
  z-index: auto;
}
.portal-open #shell .portal-label { display: block; margin: 0 12px 14px; color: #8fa5b9; font-size: 9px; }
.portal-open #shell #module-nav { display: block; margin: 0; padding: 0; min-height: 100px; max-height: none; overflow: visible; background: transparent; }
.portal-open #shell .area-section-title { color: #f0f4fa; font-size: 16px; }
.portal-open #shell .nav-group { display: block; }
.portal-open #shell .nav-subgroup-title { color: #9aafc2; }
.portal-open #shell #module-nav .site-button { width: 100%; color: #b8c8d8; font-size: 14px; }
.portal-open #shell #module-nav .site-button.active, .portal-open #document-shortcuts .nav-button.active { background: #173653; color: #e8f4ff; }
.portal-open #shell .site-button.active:after { background: #e9ba51; }
.portal-open #shell .site-button:hover, .portal-open #shell .nav-button:hover { background: #1a2e40; color: #fff; }
.portal-open #shell #document-shortcuts { display: block; width: auto; background: transparent; padding: 12px 0 0; border-color: var(--border); }
.portal-open #shell #document-shortcuts .nav-button { width: 100%; color: #aebfd0; }
.portal-open #shell .sidebar-bottom { display: block; margin-top: auto; padding-top: 24px; }
.portal-open .help-box { background: #122333; border-color: #243d52; }
.portal-open .help-box p { color: #a9bfd1; }
.portal-open .help-box button { color: #89c3ed; }
.portal-open #shell .workspace > main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px;
}
.portal-open .breadcrumb { color: #9eb2c6; margin-bottom: 20px; }
.portal-open .breadcrumb strong { color: #cbdae7; }
.portal-open .library-title { padding: 0 0 25px; gap: 16px; }
.portal-open .library-title h1 { font-size: 28px; }
.portal-open .library-title p { line-height: 1.7; }
.portal-open .kicker { color: #e5b957; }
.portal-open .library-mark { background: #14314a; color: #8ec8ee; flex-shrink: 0; }
.portal-open footer { display: flex; flex-direction: row; justify-content: space-between; margin-top: auto; padding-top: 28px; color: #93a8bc; font-size: 10px; }

/* Home follows the supplied reference and uses real session information. */
.welcome-card { background: #102e49; border: 1px solid #153852; border-radius: 14px; padding: 24px; margin-bottom: 16px; }
.welcome-company { color: #e9b74b; font-size: 11px; font-weight: 600; }
.welcome-card h1 { color: #f4f7fb; font: 700 25px/1.3 Arial,sans-serif; letter-spacing: -.5px; margin: 14px 0 12px; }
.welcome-card p { color: #c5d5e5; line-height: 1.7; font-size: 14px; }
.secure-platform { display: inline-flex; align-items: center; gap: 9px; margin-top: 20px; color: #c4d8e7; font-size: 12px; }
.secure-platform .icon { color: #6cdbb0; width: 15px; height: 15px; }
.profile-card { border: 1px solid var(--border); border-radius: 14px; padding: 22px; background: #0b1015; }
.profile-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.profile-card-heading h2 { font-size: 18px; letter-spacing: -.2px; }
.session-status { display: inline-flex; align-items: center; background: #073524; color: #63e79c; border-radius: 20px; padding: 4px 9px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.profile-identity { display: flex; gap: 16px; align-items: center; padding: 28px 0 26px; border-bottom: 1px solid var(--border); }
.profile-portrait { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #243441; color: #f0f5fb; flex-shrink: 0; }
.profile-portrait .icon { width: 28px; height: 28px; }
.profile-identity > div { min-width: 0; }
.profile-identity h3 { font-size: 20px; margin-bottom: 8px; overflow-wrap: anywhere; }
.profile-identity p { color: #c4d3df; font-size: 14px; }
.profile-identity small { display: block; color: #e9be62; font-size: 12px; line-height: 1.7; margin-top: 6px; }
.profile-tabs { display: flex; gap: 10px; margin: 24px 0 20px; }
.profile-tabs button { border: 0; border-radius: 20px; padding: 7px 18px; color: #aebbc6; background: transparent; font-weight: 600; }
.profile-tabs button[aria-selected="true"] { color: #f3f5f7; background: #24282d; }
.profile-tabs button:hover { color: #fff; background: #1c2630; }
.profile-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 23px 40px; margin: 0; }
.profile-fields dt { font-size: 11px; color: #a7b8c8; margin-bottom: 9px; }
.profile-fields dd { margin: 0; color: #f1f4f7; font-size: 14px; overflow-wrap: anywhere; }
.profile-card-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 25px; }
.profile-card-footer p, .profile-access-note { color: #aabac8; font-size: 12px; line-height: 1.7; }
.profile-role-list strong { display: block; font-size: 12px; color: #a7b8c8; margin-bottom: 8px; }
.profile-role-list p { font-size: 14px; line-height: 1.7; }
.profile-access-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 24px 0; }
.profile-access-grid section { padding: 17px; border: 1px solid var(--border); border-radius: 8px; }
.profile-access-grid h3 { font-size: 14px; color: #e7bd65; }
.profile-access-grid ul { margin: 14px 0 0; padding-left: 17px; color: #c2d2df; font-size: 12px; line-height: 1.9; }
.profile-no-access { grid-column: 1 / -1; color: #acbdcc; line-height: 1.7; }

/* The personal profile lists only devices assigned to the current account. */
.profile-overview-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; align-items: start; }
.profile-devices { min-width: 0; padding-left: 28px; border-left: 1px solid var(--border); }
.profile-devices > h3 { font-size: 14px; margin-bottom: 15px; }
.profile-devices-note { color: #aabac8; font-size: 12px; line-height: 1.7; }
.profile-device-list { display: grid; gap: 30px; }
.profile-device-entry { min-width: 0; }
.computer-specifications { border-top: 1px solid var(--border); padding-top: 18px; }
.stack-form .inventory-export-archived { flex-direction: row; align-items: center; gap: 10px; }
.stack-form .inventory-export-archived input { width: auto; }
.computer-specifications > h3 { font-size: 14px; margin-bottom: 16px; }
.computer-specification-groups { display: grid; gap: 16px; }
.computer-specification-group { min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--border); border-radius: 7px; }
.computer-specification-group legend { padding: 0 6px; font-size: 12px; font-weight: 600; }
.computer-specification-group input, .computer-specification-group select { min-width: 0; }
.computer-legacy-note { margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.device-specification-anchor { display: inline-block; position: relative; max-width: 100%; }
.device-specification-trigger { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; text-decoration: underline dotted; text-underline-offset: 4px; cursor: help; }
.device-specification-trigger:focus-visible { outline: 2px solid #8ccbf6; outline-offset: 4px; border-radius: 2px; }
.device-specification-tooltip { position: absolute; bottom: 100%; right: 0; z-index: 10; width: min(340px,calc(100vw - 76px)); max-height: min(320px,50vh); overflow: auto; padding: 16px; background: #152636; border: 1px solid #547794; border-radius: 8px; box-shadow: 0 8px 24px #0007; color: #f1f4f7; font-size: 12px; line-height: 1.5; }
.device-specification-tooltip > strong { display: block; margin-bottom: 10px; font-size: 13px; }
.device-specification-tooltip dl { display: grid; gap: 10px; margin: 0; }
.device-specification-tooltip dt { margin: 0 0 3px; }
.device-specification-tooltip dd { font-size: 12px; }

/* Apply the same palette to the existing business screens and dialogs. */
.portal-open :is(.document-panel, .folder-card, .stat, .metric-card, .role-card, .vehicle-health-card, .permission-matrix, dialog, .toast) { background: #101820; border-color: var(--border); color: var(--ink); }
.portal-open :is(input, select, textarea, .search) { background: #101e2a; color: #e5edf4; border-color: #344857; }
.portal-open input::placeholder, .portal-open textarea::placeholder { color: #98adbf; opacity: 1; }
.portal-open .search input { background: transparent; }
.portal-open :is(.secondary, .small-button:not(.primary):not(.danger)) { background: #152636; color: #d5e3ee; border-color: #354b5f; }
.portal-open :is(.secondary, .folder-card, .metric-card, .role-card):hover { background: #192b3b; border-color: #547794; }
.portal-open .primary { background: #216fa8; color: #fff; }
.portal-open .primary:hover { background: #2a80ba; }
.portal-open :is(.document-name, .doc-name, .record-name, .record-details dd, .library-folder, .metric-card > strong) { color: #e3edf5; }
.portal-open :is(.text-button, .path-link, .history-entry summary) { color: #8ccbf6; }
.portal-open th { background: #152331; color: #9fb6c9; }
.portal-open td { color: #c3d2de; }
.portal-open :is(th, td) { border-color: var(--border); }
.portal-open tr:hover td, .portal-open .folder-row:hover { background: #182a39; }
.portal-open .row-actions button { color: #aec5d8; }
.portal-open :is(.table-subtitle, .record-details dt, .history-entry > p, .role-card > p, .role-card > small, .panel-empty-note, .vehicle-health-card small) { color: #a9bdcd; }
.portal-open :is(.stack-form label, .form-grid label, .resource-picker label, .roles-fieldset legend, .permission-matrix td:first-child, .history-entry > div:first-child, .dashboard-intro strong, .role-card > div:first-child) { color: #c2d8e9; }
.portal-open :is(.stack-form > p, .modal-intro, #modal-body p, .roles-fieldset > p) { color: #b3c6d5; }
.portal-open :is(.info-note, .dropzone, .demo-banner) { background: #142d43; color: #bfdbed; border-color: #365773; }
.portal-open .change-grid pre { background: #0a131c; color: #cadce9; }
.portal-open :is(.status-chip.active, .status-chip.available, .alert-badge.green) { background: #0a3528; color: #80e0b3; }
.portal-open :is(.status-chip.inactive, .status-chip.retired, .alert-badge.gray) { background: #293541; color: #bacbd8; }
.portal-open :is(.status-chip.maintenance, .status-chip.repair, .alert-badge.yellow) { background: #40351a; color: #f2ce76; }
.portal-open .status-chip.admin { background: #173d5c; color: #9ad4ff; }
.portal-open .alert-badge.red { background: #46252a; color: #ffb5af; }
.portal-open .danger-text { color: #ffb5af; }
.portal-open .metric-card.selected { border-color: #80bce8; box-shadow: 0 0 0 2px #254661; }
.portal-open #count-badge { background: #20384d; color: #c8dfef; }
.portal-open dialog::backdrop { background: #03070cbf; }
.portal-open .document-preview { background: #17232e; }

@media (max-width:850px) {
  .profile-overview-layout { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .profile-devices { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .portal-open #shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto 1fr; grid-template-areas: "header" "areas" "sidebar" "main"; }
  .portal-open #shell .platform-header { min-height: 72px; padding: 14px 16px; gap: 12px; }
  .portal-open #shell .area-nav { padding: 0 14px 14px; gap: 5px; }
  .portal-open #shell .sidebar { padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .portal-open #shell .portal-label, .portal-open #shell .sidebar-bottom { display: none; }
  .portal-open #shell #module-nav { min-height: 0; }
  .portal-open #shell .area-section-title { padding: 0 0 10px; font-size: 14px; }
  .portal-open #shell .nav-group { display: flex; flex-wrap: wrap; gap: 5px; }
  .portal-open #shell #module-nav .site-button { width: auto; min-height: 44px; margin: 0; font-size: 13px; }
  .portal-open #shell #document-shortcuts { display: flex; flex-wrap: wrap; gap: 5px; }
  .portal-open #shell #document-shortcuts .nav-button { width: auto; }
  .portal-open .profile-access-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:580px) {
  .device-specification-tooltip { position: fixed; right: 24px; bottom: 24px; width: calc(100vw - 48px); }
  .portal-open #shell .platform-header { flex-wrap: wrap; gap: 14px; }
  .portal-open .platform-logo { width: 80px; }
  .portal-open .platform-wordmark { font-size: 17px; }
  .portal-open .platform-wordmark small { font-size: 8px; }
  .portal-open #shell .header-right { margin-left: auto; gap: 7px; }
  .portal-open .switch-user { padding: 8px 10px; font-size: 11px; }
  .portal-open .area-button { font-size: 12px; padding: 7px 10px; min-height: 34px; }
  .portal-open #shell .workspace > main { padding: 12px; }
  .welcome-card { padding: 20px 17px; }
  .welcome-card h1 { font-size: 22px; }
  .welcome-card p { font-size: 13px; }
  .profile-card { padding: 17px; }
  .profile-card-heading h2 { font-size: 17px; }
  .profile-identity { padding: 23px 0; gap: 12px; }
  .profile-portrait { width: 46px; height: 46px; }
  .profile-identity > div { min-width: 0; }
.profile-identity h3 { font-size: 18px; }
  .profile-fields { gap: 24px 18px; }
  .profile-access-grid { grid-template-columns: minmax(0,1fr); }
  .portal-open footer { font-size: 9px; gap: 12px; }
}

.selection-options-table { max-height: 360px; overflow: auto; margin-top: 20px; }
.service-total { padding: 4px 24px 20px; color: var(--muted); font-size: 13px; }
.portal-open .status-chip.out_of_service { background: #46252a; color: #ffb5af; }

#fleet-import-preview table { min-width: 0; width: 100%; }
#fleet-import-preview th { white-space: normal; }

/* Agenda de flota: actividades por fecha, con prioridad y espacios legibles. */
.agenda-eyebrow { color: #ddc17b; font-size: 10px; letter-spacing: .18em; margin: 0 0 8px; }
.fleet-agenda .panel-top { align-items: flex-start; }
.agenda-group { padding: 20px 24px 4px; }
.agenda-group + .agenda-group { border-top: 1px solid var(--line, #293945); margin-top: 20px; }
.agenda-group-heading h3 { margin: 0 0 6px; font-size: 16px; }
.agenda-group-heading h3 span { display: inline-flex; margin-left: 6px; min-width: 23px; justify-content: center; border-radius: 20px; background: #203746; font-size: 12px; padding: 3px 7px; }
.agenda-group-heading p { color: #9babb6; font-size: 12px; margin: 0 0 16px; }
.agenda-item { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 18px; padding: 18px 0; border-top: 1px solid #26343e; align-items: center; }
.agenda-date { display: grid; text-align: center; padding: 10px 4px; border-radius: 10px; background: #142b3b; color: #d9eaf5; }
.agenda-date strong { font-size: 24px; line-height: 1.1; }
.agenda-date span { font-size: 10px; margin-top: 5px; }
.overdue .agenda-date { background: #412b2e; color: #ffb9b6; }
.urgent .agenda-date { background: #3e3324; color: #efd198; }
.agenda-vehicle { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; font-size: 12px; color: #a8b7c1; }
.agenda-item h4 { margin: 8px 0; font-size: 15px; font-weight: 600; }
.agenda-item-main p { margin: 0; color: #9babb6; font-size: 11px; }
.agenda-item-status { display: grid; gap: 12px; justify-items: end; }
.fleet-agenda-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.inline-option-editor { grid-column: 1/-1; border: 1px solid #3a6077; background: #132b3a; border-radius: 8px; padding: 14px; }
.inline-option-editor .row-actions { margin-top: 12px; }
.email-settings-panel { margin-top: 24px; }
.notification-fieldset { min-width: 0; padding: 16px; border: 1px solid #30434f; border-radius: 8px; }
.notification-fieldset legend { padding: 0 6px; font-weight: 600; }
.notification-fieldset p { color: #a7b6c0; font-size: 12px; line-height: 1.6; }
.notification-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; max-height: 270px; overflow-y: auto; padding: 5px; }
.notification-check { display: flex !important; align-items: flex-start; gap: 10px; line-height: 1.5; }
.notification-check input { width: 16px !important; height: 16px; margin: 2px 0 0; flex: 0 0 16px; }
.notification-check small { display: block; color: #9dafba; }
@media(max-width:800px) {
  .agenda-item { grid-template-columns: 55px minmax(0,1fr); gap: 13px; }
  .agenda-item-status { grid-column: 2; justify-items: start; }
  .fleet-agenda-metrics { grid-template-columns: 1fr; }
  .notification-options { grid-template-columns: 1fr; }
  .agenda-group { padding: 16px; }
}

/* Calendario de flota: presentación mensual sobre la agenda autorizada. */
.fleet-calendar .panel-top { align-items: flex-start; }
.calendar-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px 20px; }
.calendar-navigation { display: flex; align-items: center; gap: 8px; min-width: 0; }
.calendar-navigation h3 { margin: 0 0 0 10px; font-size: 22px; font-weight: 500; text-transform: none; }
.calendar-nav-button { display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 50%; background: transparent; color: #bdd0dc; width: 34px; height: 34px; padding: 7px; cursor: pointer; }
.calendar-nav-button:hover { background: #1e3545; }
.calendar-nav-button.previous svg { transform: rotate(180deg); }
.calendar-view-label { border: 1px solid #304653; padding: 8px 20px; border-radius: 6px; color: #cbd9e2; font-size: 12px; }
.fleet-calendar .calendar-filters { padding-bottom: 8px; }
.calendar-hint { margin: 0; padding: 0 24px 18px; color: #99afbd; font-size: 12px; line-height: 1.6; }
.calendar-grid-wrap { overflow: auto; border-top: 1px solid #30424f; }
.calendar-weekdays,.calendar-month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-weekdays { position: sticky; top: 0; background: #112331; z-index: 1; }
.calendar-weekdays span { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 12px 4px; color: #a9bdcb; }
.calendar-day { min-width: 0; min-height: 130px; padding: 6px; border-top: 1px solid #293d4b; border-right: 1px solid #293d4b; background: #0f1d27; cursor: pointer; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover { background: #152b3a; }
.calendar-day.outside-month { background: #0c171f; }
.calendar-day.outside-month .calendar-day-number { color: #687d8c; }
.calendar-day-number { display: block; width: 28px; height: 28px; border: 0; border-radius: 50%; padding: 0; margin: 0 0 5px; background: transparent; color: #d6e2ea; font: inherit; font-size: 12px; cursor: pointer; }
.calendar-day.is-today .calendar-day-number { background: #267db5; color: #fff; font-weight: 700; }
.calendar-day-events { display: grid; gap: 4px; }
.calendar-event { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; border: 0; border-radius: 4px; padding: 5px 6px; background: #17354a; color: #d3eafa; text-align: left; font-size: 10px; line-height: 1.4; cursor: pointer; }
.calendar-event-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-dot { width: 5px; height: 5px; background: #69b7e5; flex: 0 0 5px; border-radius: 50%; }
.calendar-event.overdue,.calendar-event.urgent { background: #432a31; color: #ffc9c6; }
.calendar-event.overdue .calendar-event-dot,.calendar-event.urgent .calendar-event-dot { background: #f29c95; }
.calendar-event.upcoming { background: #433b23; color: #f4d58d; }
.calendar-event.upcoming .calendar-event-dot { background: #e8bf58; }
.calendar-event.clear { background: #153d39; color: #bbe7dc; }
.calendar-event.clear .calendar-event-dot { background: #6cc6ae; }
.calendar-event:hover { filter: brightness(1.2); }
.calendar-more { border: 0; border-radius: 4px; padding: 4px 6px; font-size: 10px; color: #aecce0; background: transparent; text-align: left; cursor: pointer; }
.calendar-more:hover { background: #294455; }
.calendar-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 16px 24px; border-top: 1px solid #293d4b; font-size: 11px; color: #9cb1c0; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 16px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 7px; height: 7px; border-radius: 50%; background: #76b89f; }
.calendar-legend i.overdue { background: #ecaaa3; }
.calendar-legend i.upcoming { background: #e8bf58; }
.calendar-day-list { display: grid; gap: 10px; }
.calendar-day-event { display: grid; text-align: left; gap: 7px; padding: 14px; border: 1px solid #324e60; border-radius: 8px; background: #152e40; color: #e0edf5; cursor: pointer; }
.calendar-day-event span { font-size: 12px; color: #afc6d6; }
.calendar-day-event.overdue,.calendar-day-event.urgent { border-left: 3px solid #ecaaa3; }
.calendar-day-event.upcoming { border-left: 3px solid #e8bf58; }
.calendar-day-event.clear { border-left: 3px solid #76b89f; }
#modal:has(.calendar-day-list) { width: min(720px,95vw); max-width: 720px; }
.calendar-day-list { max-height: min(48vh,460px); overflow-y: auto; padding: 2px; }
.calendar-day-summary { border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-soft); overflow: hidden; }
.calendar-day-summary .calendar-day-event { width: 100%; justify-content: stretch; border: 0; border-radius: 0; }
.calendar-day-summary .calendar-day-event strong { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.calendar-day-summary .calendar-day-event small { color: var(--theme-accent); font-size: 10px; }
.calendar-day-description { padding: 0 14px 14px; }
.calendar-day-description h3,.calendar-day-create h3 { margin: 0 0 7px; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: normal; }
#modal-body .calendar-day-description p { margin: 0; color: var(--theme-text); font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
#modal-body .calendar-day-count { color: var(--theme-text); font-size: 12px; }
#modal-body .calendar-day-filter-note { color: var(--theme-muted); font-size: 11px; line-height: 1.6; }
.calendar-day-create { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--theme-line); }
.calendar-day-create > p { color: var(--theme-muted); font-size: 12px; line-height: 1.6; }
.calendar-day-create > button { margin-top: 7px; }
.fleet-calendar button:focus-visible { outline: 2px solid #80bbf5; outline-offset: 2px; }
.fleet-calendar.is-expanded { position: fixed; inset: 18px; z-index: 80; margin: 0; display: flex; flex-direction: column; background: #0f1b24; border-radius: 12px; box-shadow: 0 0 0 100vmax #050b11d9; }
.fleet-calendar.is-expanded .calendar-grid-wrap { flex: 1; min-height: 0; }
.fleet-calendar.is-expanded .calendar-day { min-height: 168px; }
.fleet-calendar.is-expanded .calendar-event { font-size: 12px; }
body:has(.fleet-calendar.is-expanded) { overflow: hidden; }
/* Agenda y calendario comparten el dashboard sin alterar la vista ampliada. */
.fleet-dashboard-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: start; }
.fleet-dashboard-layout > .document-panel { min-width: 0; margin: 0; }
.fleet-priority-list { max-height: 710px; overflow-y: auto; scrollbar-gutter: stable; }
.fleet-priority-group { padding: 20px; border-top: 1px solid #293d4b; }
.fleet-priority-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.fleet-priority-heading h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; text-transform: none; letter-spacing: normal; }
.fleet-priority-heading h3 span { border-radius: 20px; background: #203746; color: #d5e4ef; padding: 3px 9px; font-size: 12px; }
.fleet-priority-jump { display: inline-flex; align-items: center; gap: 5px; padding: 3px 0; border: 0; background: transparent; color: #88bce0; font-size: 11px; cursor: pointer; }
.fleet-priority-jump .icon { width: 13px; height: 13px; }
.fleet-priority-item { display: grid; justify-content: stretch; gap: 6px; width: 100%; padding: 15px; margin-top: 10px; text-align: left; border: 1px solid #293d4b; border-left: 3px solid #76b89f; border-radius: 8px; color: #dce7ef; background: #10212c; cursor: pointer; }
.fleet-priority-item:hover { background: #162d3c; }
.fleet-priority-item.overdue,.fleet-priority-item.urgent { border-left-color: #ecaaa3; }
.fleet-priority-item.upcoming { border-left-color: #e8bf58; }
.fleet-priority-item-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.fleet-priority-item time,.fleet-priority-vehicle { color: #a2b8c7; font-size: 12px; }
.fleet-priority-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.fleet-priority-status { color: #9ed5c4; font-size: 11px; }
.fleet-priority-item.overdue .fleet-priority-status,.fleet-priority-item.urgent .fleet-priority-status { color: #ecaaa3; }
.fleet-priority-item.upcoming .fleet-priority-status { color: #e8bf58; }
.fleet-priority-empty { margin: 0; color: #8fa8b9; font-size: 12px; line-height: 1.6; }
.fleet-priority-panel button:focus-visible { outline: 2px solid #80bbf5; outline-offset: 2px; }
.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .panel-top { display: block; }
.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .row-actions { margin-top: 16px; flex-wrap: wrap; }
.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-navigation h3 { font-size: 18px; margin-left: 4px; }
.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-view-label { display: none; }
.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-filters .search { grid-column: 1 / -1; min-width: 0; }
.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-filters select { width: 100%; min-width: 0; }
@media(min-width:1101px) {
  .fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-event-name { display: none; }
  .fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .panel-top { padding: 20px; }
  .fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-controls,.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-filters,.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-hint,.fleet-dashboard-layout .fleet-calendar:not(.is-expanded) .calendar-footer { padding-left: 20px; padding-right: 20px; }
}
@media(max-width:1100px) {
  .fleet-dashboard-layout { grid-template-columns: minmax(0,1fr); }
  .fleet-priority-list { max-height: 520px; }
}
@media(min-width:601px) {
  .fleet-calendar:not(.is-expanded) .calendar-controls { padding-bottom: 12px; }
  .fleet-calendar:not(.is-expanded) .calendar-hint { padding-bottom: 12px; }
  .fleet-calendar:not(.is-expanded) .calendar-day { min-height: 80px; padding: 4px 5px; }
  .fleet-calendar:not(.is-expanded) .calendar-day-number { width: 24px; height: 24px; margin-bottom: 3px; }
  .fleet-calendar:not(.is-expanded) .calendar-day-events { gap: 3px; }
  .fleet-calendar:not(.is-expanded) .calendar-event { padding: 2px 5px; }
  .fleet-calendar:not(.is-expanded) .calendar-more { padding: 2px 5px; }
  .fleet-calendar:not(.is-expanded) .calendar-weekdays span { padding: 9px 4px; }
  .fleet-calendar:not(.is-expanded) .calendar-footer { padding-top: 12px; padding-bottom: 12px; }
}
@media(max-width:1000px) {
  .fleet-calendar .panel-top { flex-wrap: wrap; }
  .calendar-navigation h3 { font-size: 19px; }
}
@media(max-width:600px) {
  .calendar-controls { padding: 0 14px 16px; gap: 8px; }
  .calendar-navigation { gap: 2px; }
  .calendar-navigation h3 { font-size: 17px; margin-left: 6px; }
  .calendar-view-label { display: none; }
  .calendar-hint { padding: 0 14px 14px; font-size: 11px; }
  .calendar-day { padding: 4px; min-height: 76px; }
  .calendar-day-number { width: 25px; height: 25px; }
  .calendar-day-events { display: flex; flex-wrap: wrap; gap: 2px; }
  .calendar-event { width: 12px; height: 16px; padding: 3px; background: transparent !important; }
  .calendar-event-label { display: none; }
  .calendar-more { padding: 2px 0; font-size: 9px; }
  .calendar-footer { padding: 12px 14px; }
  .calendar-legend { gap: 9px; }
  .fleet-calendar.is-expanded { inset: 6px; }
  .fleet-calendar.is-expanded .panel-top { padding: 14px; }
  .fleet-calendar.is-expanded .calendar-day { min-height: 90px; }
  .fleet-calendar.is-expanded .calendar-hint { display: none; }
  .fleet-calendar.is-expanded .calendar-filters { padding: 4px 14px 12px; }
}

/* Ficha completa de vehículo. La paleta clara se limita a este componente. */
.vehicle-sheet { --ink:#172b42; --muted:#66778a; --border:#dce5ef; color:#172b42 !important; background:#f8fbff !important; padding:0 18px; border-color:#dce5ef !important; overflow:visible; }
.vehicle-sheet-header { display:flex; align-items:center; gap:10px; min-height:60px; padding:0; background:transparent; border-bottom:1px solid #dce5ef; }
.vehicle-sheet-header > strong { font-size:21px; letter-spacing:-.03em; }
.vehicle-sheet-back { border:0; background:transparent; color:#1766b5; font-size:24px; padding:4px; }
.vehicle-sheet-actions { margin-left:auto; display:flex; align-items:center; gap:10px; }
.portal-open #module-view .vehicle-sheet .secondary { background:#edf5ff; border-color:#c9ddf5; color:#1766b5; padding:8px 12px; font-size:11px; }
.portal-open #module-view .vehicle-sheet .secondary:hover { background:#dfeeff; }
.vehicle-sheet .status-chip { font-size:10px; padding:4px 8px; }
.vehicle-sheet .status-chip.active { background:#238851; color:white; }
.vehicle-sheet .status-chip.maintenance { background:#fff0cf; color:#805a17; }
.vehicle-sheet .status-chip.inactive,.vehicle-sheet .status-chip.retired { background:#e2e8ef; color:#526475; }
.vehicle-sheet .status-chip.out_of_service { background:#fbe3e1; color:#a93d32; }
.vehicle-more { position:relative; }
.vehicle-more summary { display:flex; justify-content:center; align-items:center; list-style:none; width:32px; height:32px; border:1px solid #d5e3f2; border-radius:6px; color:#145cab; background:#f1f7fe; font-size:22px; cursor:pointer; }
.vehicle-more summary::-webkit-details-marker { display:none; }
.vehicle-more > div { position:absolute; right:0; top:38px; z-index:5; min-width:190px; padding:6px; background:#fff; border:1px solid #d5e3f2; border-radius:7px; box-shadow:0 8px 24px #16395d22; }
.vehicle-more button { display:block; width:100%; padding:11px; border:0; border-radius:5px; background:transparent; text-align:left; color:#23405e; font-size:12px; }
.vehicle-more button:hover { background:#eaf3fe; }
.vehicle-sheet .danger-text { color:#b2443b; }
.vehicle-sheet-hero { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:18px; align-items:center; padding:16px 0; }
.vehicle-sheet-identity { display:flex; gap:16px; align-items:center; min-width:0; }
.vehicle-sheet-art { flex:0 0 155px; }
.vehicle-illustration { display:block; width:100%; height:auto; }
.vehicle-sheet-identity > div:last-child { min-width:0; }
.vehicle-sheet-identity h2 { font-size:26px; margin:0 0 7px; color:#10253e; letter-spacing:-.04em; overflow-wrap:anywhere; }
.vehicle-sheet-identity p { margin:0 0 12px; color:#31485e; font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.vehicle-sheet-meta { display:flex; flex-wrap:wrap; gap:10px 16px; font-size:10px; }
.vehicle-sheet-meta span { display:inline-flex; gap:6px; align-items:center; overflow-wrap:anywhere; }
.vehicle-sheet-meta .icon { color:#245b93; width:16px; height:16px; flex:0 0 16px; }
.vehicle-upcoming { background:#edf4fb; border:1px solid #dce6f1; border-radius:9px; padding:12px 14px; }
.vehicle-sheet h3 { display:flex; align-items:center; gap:8px; margin:0; color:#18314c; font-size:13px; font-weight:600; text-transform:none; letter-spacing:normal; }
.vehicle-sheet h3 .icon { width:17px; height:17px; flex:0 0 17px; color:#1761ad; }
.vehicle-upcoming h3 { margin-bottom:10px; }
.vehicle-deadline-row { display:flex; gap:7px; align-items:center; margin-top:8px; font-size:10px; }
.vehicle-deadline-row > i { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:#e6b740; }
.vehicle-deadline-row.plate > i { background:#e07466; }.vehicle-deadline-row.insurance > i { background:#9174d6; }
.vehicle-deadline-row > span { flex:1; line-height:1.5; }
.vehicle-deadline-row strong { font-weight:500; white-space:nowrap; }
.vehicle-deadline-row small { flex-shrink:0; border-radius:5px; background:#d7e9ff; color:#21588f; font-size:9px; padding:4px 6px; }
.vehicle-deadline-row small.is-due { background:#ffe4d9; color:#944e22; }
.vehicle-sheet-information { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
.vehicle-sheet .vehicle-info-card { min-width:0; border:1px solid #dce5ef; border-radius:9px; background:#fff; box-shadow:0 2px 6px #264e7410; }
.vehicle-sheet .vehicle-info-card h3 { padding:11px 13px; border-bottom:1px solid #e3ebf4; }
.vehicle-sheet .record-details { display:block; margin:0; padding:0 13px 5px; }
.vehicle-sheet .record-details > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; padding:5px 0; border-bottom:1px solid #e8eef5; }
.vehicle-sheet .record-details > div:last-child { border-bottom:0; }
.vehicle-sheet .record-details dt { color:#4c6278; margin:0; font-size:10px; line-height:1.5; overflow-wrap:anywhere; }
.vehicle-sheet .record-details dd { color:#172b42; margin:0; font-size:11px; line-height:1.5; font-weight:500; }
.vehicle-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:16px 0; }
.vehicle-summary-card { display:flex; flex-direction:column; min-width:0; padding:12px; border:1px solid #dce5ef; border-radius:9px; background:#fff; box-shadow:0 2px 6px #264e7410; }
.vehicle-summary-card h3 { font-size:12px; gap:7px; }
.vehicle-summary-card h3 small { color:#617c98; font-size:10px; font-weight:400; }
.vehicle-summary-body { flex:1; margin:10px 0 12px; }
.vehicle-summary-row { display:flex; width:100%; gap:7px; align-items:center; min-height:30px; padding:5px 0; font-size:10px; border:0; background:transparent; color:#243e57; text-align:left; justify-content:flex-start; }
.vehicle-summary-row .icon { flex:0 0 14px; width:14px; height:14px; color:#d75e54; }
.vehicle-summary-row > span { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vehicle-summary-row time { flex:0 0 auto; color:#70849a; font-size:9px; }
.vehicle-summary-row > strong { flex:0 0 auto; font-size:10px; font-weight:500; }
.vehicle-summary-row.document-row:hover { color:#0869d1; }
.vehicle-summary-link { display:inline-flex; align-items:center; justify-content:flex-start; gap:6px; padding:0; border:0; background:transparent; color:#0867c7; font-size:11px; text-align:left; cursor:pointer; }
.vehicle-summary-link .icon { width:13px; height:13px; }
.vehicle-summary-empty { color:#697f94; font-size:11px; line-height:1.6; margin:3px 0; }
.vehicle-mini-timeline { border-left:1px solid #d7e2ee; margin-left:4px; padding-left:13px; }
.vehicle-mini-timeline article { position:relative; padding:2px 0 10px; font-size:10px; }
.vehicle-mini-timeline article:last-child { padding-bottom:0; }
.vehicle-mini-timeline article:before { content:''; position:absolute; left:-17px; top:5px; width:7px; height:7px; border-radius:50%; background:#4a9ddd; border:1px solid #fff; }
.vehicle-mini-timeline article:first-child:before { background:#3da472; }
.vehicle-mini-timeline strong { display:block; font-weight:500; line-height:1.5; }
.vehicle-mini-timeline p { color:#6b8095; font-size:9px; line-height:1.5; margin:3px 0 0; }
.vehicle-extra { border-top:1px solid #dce5ef; font-size:11px; }
.vehicle-extra > summary { padding:13px 0; color:#426382; cursor:pointer; }
.vehicle-extra .record-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; }
.vehicle-notes { color:#526d85; font-size:11px; line-height:1.8; margin:0; padding:10px 13px 16px; white-space:pre-wrap; overflow-wrap:anywhere; }
.vehicle-sheet-footer { display:flex; justify-content:space-between; gap:14px; padding:12px 0; border-top:1px solid #dce5ef; font-size:9px; color:#6e8295; }
.vehicle-sheet-expanded { scroll-margin-top:16px; border-top:1px solid #dce5ef; padding:16px 0; }
.vehicle-expanded-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.vehicle-sheet .text-button,.vehicle-sheet .doc-name,.vehicle-sheet .history-entry summary { color:#1265b7; }
.vehicle-sheet .document-panel,.vehicle-sheet .vehicle-history { background:#fff; border:1px solid #dce5ef; color:#203b55; border-radius:8px; }
.vehicle-sheet :is(input,select,textarea,.search) { background:#f7faff; color:#203b55; border-color:#cbd9e7; }
.vehicle-sheet input::placeholder { color:#6e8295; }
.vehicle-sheet .search input { background:transparent; }
.vehicle-sheet th { background:#edf4fb; color:#54718d; }
.vehicle-sheet td { color:#2b4762; }
.vehicle-sheet tr:hover td { background:#f0f6fd; }
.vehicle-sheet .row-actions button { color:#1764ad; }
.vehicle-sheet .table-subtitle,.vehicle-sheet .history-entry > p { color:#6e8295; }
.vehicle-sheet .history-entry > div:first-child { color:#254764; }
.vehicle-sheet .change-grid pre { background:#edf4fb; color:#2b4762; }
.vehicle-history > h3 { padding:16px; border-bottom:1px solid #dce5ef; }
.vehicle-history .history-list,.vehicle-history .empty { padding:16px; }
@media(max-width:1150px) {
  .vehicle-sheet-hero { grid-template-columns:minmax(0,1fr); gap:12px; }
  .vehicle-sheet-art { flex-basis:140px; }
  .vehicle-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .vehicle-summary-card:last-child { grid-column:1 / -1; }
}
@media(max-width:650px) {
  .vehicle-sheet { padding:0 12px; }
  .vehicle-sheet-header { gap:8px; }.vehicle-sheet-header > strong { font-size:18px; }
  .vehicle-sheet-actions { gap:6px; }.vehicle-sheet-actions .secondary { padding:7px; }
  .vehicle-sheet-actions .secondary .icon { display:none; }
  .vehicle-sheet-identity { gap:12px; }.vehicle-sheet-art { flex:0 0 95px; }
  .vehicle-sheet-identity h2 { font-size:23px; }
  .vehicle-sheet-meta { gap:8px; }
  .vehicle-sheet-information,.vehicle-summary-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .vehicle-summary-card:last-child { grid-column:auto; }
  .vehicle-extra .record-details { grid-template-columns:minmax(0,1fr); }
  .vehicle-sheet-footer { flex-wrap:wrap; }
}

#modal:has(.outlook-calendar-settings) { width:min(1000px,96vw); max-width:1000px; }
.outlook-calendar-settings { display:grid; gap:18px; }
.outlook-calendar-settings h3 { font-size:15px; margin:12px 0; }
.outlook-recipient-list { display:grid; gap:12px; padding:16px; border:1px solid var(--theme-line); border-radius:8px; max-height:300px; overflow:auto; }
.outlook-recipient-list small { display:block; margin-top:5px; font-weight:400; color:var(--theme-muted); }
.outlook-calendar-settings .row-actions { display:flex; flex-wrap:wrap; gap:10px; }
.outlook-calendar-settings td { white-space:normal; min-width:130px; overflow-wrap:anywhere; }
.outlook-calendar-settings td small { display:block; margin-top:5px; }
.outlook-access-panel { margin-top:20px; }

#modal-body .outlook-calendar-settings .checkbox-label { display:flex; flex-direction:row; align-items:flex-start; gap:10px; }
#modal-body .outlook-calendar-settings .checkbox-label input { flex:0 0 17px; width:17px; height:17px; margin:2px 0 0; }

/* Access management: uses the existing theme variables in all appearance modes. */
.portal-open .access-intro { margin-bottom: 20px; }
.portal-open .access-intro h2 { margin: 8px 0; }
.portal-open .access-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 0 0 22px; }
.portal-open .access-metric { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; color: var(--ink); cursor: pointer; padding: 22px; }
.portal-open .access-metric strong { font-size: 30px; line-height: 1; }
.portal-open .access-metric span,.portal-open .access-metric small { color: var(--muted); }
.portal-open .access-metric:hover { border-color: var(--blue); }
.portal-open .access-inline-form,.portal-open .access-filter-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 22px 0; }
.portal-open .access-inline-form label { min-width: min(340px,100%); flex: 1; }
.portal-open .access-filter-form label { min-width: 150px; flex: 1; }
.portal-open .access-inline-form label,.portal-open .access-filter-form label,.portal-open .access-resource-select { display: grid; gap: 7px; }
.portal-open .access-filter-form .form-error { flex-basis: 100%; margin: 0; }
.portal-open .access-user-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 18px; margin: 24px 0 16px; border: 1px solid var(--border); border-radius: 9px; }
.portal-open .access-user-banner p { margin: 7px 0 0; }
.portal-open .access-resource-select { margin-top: 22px; }
.portal-open .access-audit-entry { border-bottom: 1px solid var(--border); padding: 19px 0; overflow-wrap: anywhere; }
.portal-open .access-audit-entry:last-child { border-bottom: 0; }
.portal-open .access-audit-entry p { color: var(--muted); line-height: 1.6; margin: 8px 0; }
.portal-open .access-change-list { padding-left: 22px; line-height: 1.8; }
.portal-open .access-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.portal-open .access-checks { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 10px 0; }
.portal-open .access-user-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; max-height: 300px; overflow-y: auto; padding-top: 16px; }
.portal-open .access-request-home { margin-top: 20px; }
@media (max-width:1000px) { .portal-open .access-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .portal-open .access-metrics,.portal-open .access-user-picker { grid-template-columns: 1fr; } .portal-open .access-user-banner { align-items:flex-start;flex-direction:column; } }

.portal-open .access-panel,.portal-open .access-request-home { padding: 24px; }

.portal-open .data-panel { padding: 24px; }
.portal-open .data-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 24px 0; }
.portal-open .data-metrics > div { border: 1px solid var(--border); border-radius: 9px; padding: 18px; display: grid; gap: 10px; }
.portal-open .data-metrics span { color: var(--muted); }
.portal-open .data-metrics strong { font-size: 22px; }
.portal-open .data-cleanup-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; border-block: 1px solid var(--border); padding: 20px 0; margin: 24px 0; }
.portal-open .data-cleanup-actions p { margin: 8px 0 0; color: var(--muted); }
.portal-open .data-record-heading { margin-top: 30px; }
.portal-open .data-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.portal-open .data-review-totals { display: flex; gap: 24px; flex-wrap: wrap; }
@media (max-width:800px) { .portal-open .data-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:480px) { .portal-open .data-metrics { grid-template-columns: 1fr; } }
