html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Brand Orange (#F57C00) & VIREO Dark Slate palette tokens */
:root {
  --ev-primary: #F57C00;
  --ev-accent: #FF9800;
  --ev-bg: #0B0D12;
  --ev-surface: #141721;
  --ev-drawer-bg: #0E1017;
  --ev-text: #F3F4F6;
  --ev-muted: #8C94A8;
  --ev-border: #202534;
  --ev-hover: rgba(245, 124, 0, 0.12);
  --ev-active-bg: rgba(245, 124, 0, 0.2);
  --ev-input-bg: #1A1D2B;
  --ev-input-border: #2B3045;
  --ev-radius: 10px;
  --ev-shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.4);
  --ev-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.6);
  --ev-shadow-lg: 0 10px 30px -5px rgb(0 0 0 / 0.8);
}

/* Body background */
body {
  background-color: var(--ev-bg);
  color: var(--ev-text);
}

/* Mobile-first helpers: minimum 44x44 touch target for key actions. */
.ev-touch {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Brand logo helpers */
.ev-brand-logo-drawer {
  max-height: 42px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}

.ev-brand-logo-login {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 1.5rem auto;
  display: block;
}

/* Avatar Circle Initials Badge (VIREO Style) */
.ev-avatar-initials {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(245, 124, 0, 0.18);
  color: #F57C00;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  border: 1px solid rgba(245, 124, 0, 0.3);
}

.ev-avatar-initials.blue {
  background: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.3);
}

.ev-avatar-initials.emerald {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.3);
}

.ev-avatar-initials.purple {
  background: rgba(139, 92, 246, 0.18);
  color: #A78BFA;
  border-color: rgba(139, 92, 246, 0.3);
}

/* Elegant button styling: Primary buttons in #F57C00 */
.mud-button {
  transition: all 0.2s ease-in-out;
  border-radius: 8px;
}

.mud-button-filled.mud-button-filled-primary {
  background-color: var(--ev-primary);
  color: #FFFFFF;
  font-weight: 700;
}

.mud-button-filled.mud-button-filled-primary:hover {
  background-color: #E65100;
  box-shadow: 0 0 14px rgba(245, 124, 0, 0.45);
}

.mud-button-filled.mud-button-filled-secondary {
  background-color: #202534;
  color: #F3F4F6;
  font-weight: 600;
}

.mud-button-filled.mud-button-filled-secondary:hover {
  background-color: #2B3045;
}

/* Interactive Card hover effect */
.ev-card-interactive {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  background-color: var(--ev-surface);
  border: 1px solid var(--ev-border);
}

.ev-card-interactive:hover {
  transform: translateY(-2px);
  border-color: var(--ev-primary) !important;
  box-shadow: 0 8px 20px -4px rgba(245, 124, 0, 0.25) !important;
}

/* Dashed card for new items */
.ev-card-dashed {
  border: 2px dashed var(--ev-primary) !important;
  background: rgba(245, 124, 0, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
}

.ev-card-dashed:hover {
  background: rgba(245, 124, 0, 0.1);
  transform: translateY(-2px);
}

/* Page Title with generous top padding */
.ev-page-header {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

/* Compact page heading used where h1 would over-power the layout. */
.ev-h1 {
  font-size: 1.5rem;
}

/* ---------------------------------------------------------------------------
   MudBlazor 7.9.0 overrides (VIREO Dark + #F57C00 Active).
   --------------------------------------------------------------------------- */

/* Nav hover: orange tint pill */
.mud-nav-link:hover:not(.mud-nav-link-disabled) {
  background-color: var(--ev-hover);
  color: var(--ev-primary);
}

/* Nav active: orange pill with bright text and left accent bar */
.mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) {
  color: var(--ev-primary);
  background-color: var(--ev-active-bg);
  border-inline-start: 3px solid var(--ev-primary);
  border-radius: 0 8px 8px 0;
  font-weight: 600;
}

.mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled):hover:not(.mud-nav-link-disabled) {
  color: var(--ev-primary);
  background-color: var(--ev-active-bg);
}

/* AppBar: deep obsidian with bottom border separator */
.mud-appbar.mud-elevation-1 {
  box-shadow: none;
  background-color: var(--ev-bg) !important;
  border-bottom: 1px solid var(--ev-border);
}

/* Drawer: right border separator */
.mud-drawer {
  background-color: var(--ev-drawer-bg) !important;
  border-right: 1px solid var(--ev-border);
}

/* Cards: border + shadow + theme radius */
.mud-card {
  border: 1px solid var(--ev-border);
  box-shadow: var(--ev-shadow);
  background-color: var(--ev-surface);
  border-radius: 12px;
}

/* Outlined inputs: dark fill */
.mud-input-outlined {
  background-color: var(--ev-input-bg);
}

/* VIREO Modern Table Styling */
.mud-table {
  border: 1px solid var(--ev-border);
  background-color: var(--ev-surface);
  border-radius: 12px;
  overflow: hidden;
}

.mud-table-head .mud-table-cell {
  text-transform: uppercase;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  color: var(--ev-muted) !important;
  background-color: #11131C !important;
  border-bottom: 1px solid var(--ev-border) !important;
}

.mud-table-row {
  transition: background-color 0.15s ease;
}

.mud-table-row:hover {
  background-color: rgba(245, 124, 0, 0.04) !important;
}

/* ---------------------------------------------------------------------------
   Bulk-create (carga masiva) forms: contrast + consistent sizing.
   --------------------------------------------------------------------------- */

/* Container: opaque surface + full border for better separation from the card */
.ev-bulk-form {
  background-color: var(--ev-surface);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
}

/* Adjustment 3: make outlined input borders more visible inside the bulk form */
.ev-bulk-form .mud-input-outlined {
  border: 1px solid var(--ev-input-border);
  background-color: var(--ev-input-bg);
}

/* Adjustment 4: unified row layout and input sizing across the 3 entities */
.ev-bulk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ev-bulk-name {
  flex: 1 1 240px;
  min-width: 180px;
  max-width: 320px;
}

.ev-bulk-num {
  width: 150px;
  flex: 0 0 150px;
}

.ev-bulk-num-sm {
  width: 130px;
  flex: 0 0 130px;
}

.ev-bulk-select {
  min-width: 200px;
  flex: 1 1 220px;
}

/* ---------------------------------------------------------------------------
   AppBar user chip: prevent mobile horizontal scroll.
   The MudToolBar does not wrap and the chip (email + roles) is nowrap; on
   small viewports a long email widens the whole page. Cap width + ellipsis.
   --------------------------------------------------------------------------- */

.ev-appbar-user {
  min-width: 0;
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ev-appbar-user .d-flex {
  overflow: hidden;
}

.ev-appbar-user .d-flex > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}