@charset "UTF-8";
html,
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

a,
.btn-link {
  color: #006bb7;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
  padding-top: 1.1rem;
}

h1:focus {
  outline: none;
}

:root {
  --ch-bg: #f8fafc;
}

/* ===========================
   Context Switcher (header)
   =========================== */
.context-switcher .dropdown-menu {
  min-width: 260px;
}
.context-switcher .dropdown-item small {
  font-size: 0.75rem;
}
.context-switcher .dropdown-item.active {
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ch-bg: #0b1220;
  }
}
.valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4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iIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
  border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ==============================
   Logo sizes & responsive images
   ============================== */
.logo,
.logo-isotipo,
.logo-isotipo-header,
img[alt*="Crea Hábitat"] {
  max-width: 45px;
  height: auto;
}

.logo-isotipo-header {
  max-width: 28px;
  height: auto;
}

header .brand-title {
  font-size: 1rem;
  line-height: 1.1;
}

/* Public hero logo */
.hero-logo {
  max-width: 320px;
  width: 100%;
  height: auto;
}

main img[alt*="Crea Hábitat"],
main img.logo {
  max-width: 360px;
  height: auto;
}

/* Breakpoints */
@media (min-width: 576px) {
  .hero-logo {
    max-width: 360px;
  }
}
@media (min-width: 768px) {
  .hero-logo {
    max-width: 420px;
  }
}
@media (min-width: 992px) {
  .hero-logo {
    max-width: 480px;
  }
}
@media (min-width: 1200px) {
  .hero-logo {
    max-width: 520px;
  }
}
/* Brand primary button */
.btn-primary {
  background-color: #2E9CCA;
  border-color: #2E9CCA;
  color: #fff;
}

.btn-primary:hover {
  background-color: #2389B8;
  border-color: #2389B8;
}

/* Nav contrast */
header .nav-link {
  color: #0B3C5D;
  opacity: 0.9;
}

header .nav-link:hover {
  opacity: 1;
}

/* Contact page tweaks */
.contact-page .card {
  border-radius: 1rem;
}
.contact-page .form-label {
  font-weight: 600;
}
.contact-page .btn {
  border-radius: 0.75rem;
}

/* =============================================
   🔥 RESTAURADO — Topbar layout (mobile/desktop)
   ============================================= */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.topbar-mobile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

.topbar-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Pill "Sin contexto" full-width */
.topbar-mobile .context-switcher {
  margin-right: 0 !important;
  width: 100%;
}

.topbar-mobile .context-switcher .btn {
  width: 100%;
  justify-content: center;
}

.topbar-mobile .context-switcher .dropdown-menu {
  width: 100%;
}

.topbar-mobile .badge.me-2,
.topbar-mobile .badge.align-self-center {
  margin-right: 0 !important;
  width: 100%;
  justify-content: center;
}

/* =============================================
   Layout color tweaks
   ============================================= */
:root {
  --ch-header-bg: #f3f4f6;
  --ch-header-border: #e5e7eb;
  --ch-header-fg: #111827;
  --ch-icon: #374151;
  --ch-icon-active: #4338ca;
  --ch-link: #111827;
  --ch-link-hover: #1f2937;
  --ch-sidebar-bg: #ffffff;
  --ch-sidebar-fg: #374151;
  --ch-sidebar-sep: #e5e7eb;
  --ch-menu-active-bg: #eef2ff;
  --ch-menu-active-fg: #3730a3;
}

/* Header */
.rz-header {
  background: var(--ch-header-bg) !important;
  color: var(--ch-header-fg) !important;
  border-bottom: 1px solid var(--ch-header-border);
  box-shadow: none;
}

.rz-header a,
.rz-header .rz-button,
.rz-header .btn {
  color: var(--ch-link);
}

.rz-header a:hover,
.rz-header .btn:hover {
  color: var(--ch-link-hover);
}

.logo-isotipo-header {
  height: 28px;
}

/* Sidebar */
.rz-sidebar {
  background: var(--ch-sidebar-bg) !important;
  color: var(--ch-sidebar-fg) !important;
  border-right: 1px solid var(--ch-sidebar-sep);
}

/* PanelMenu */
.rz-panel-menu .rz-navigation-item .rz-link {
  color: var(--ch-sidebar-fg) !important;
}

.rz-panel-menu .rz-navigation-item .rz-link .rz-link-text,
.rz-panel-menu .rz-navigation-item .rz-link .rz-icon {
  color: var(--ch-sidebar-fg) !important;
}

.rz-panel-menu .rz-navigation-item .rz-link:hover {
  background: #f8fafc;
}

.rz-panel-menu .rz-state-active > .rz-link,
.rz-panel-menu .rz-navigation-item .rz-link.rz-state-active {
  background: var(--ch-menu-active-bg) !important;
  color: var(--ch-menu-active-fg) !important;
}

/* Icons */
.rz-sidebar-toggle .rz-button-text,
.rz-sidebar-toggle .rz-icon,
.rz-header .rz-icon,
.rz-header i {
  color: var(--ch-icon) !important;
}

/* Quick actions */
.quick-actions .card {
  border-radius: 1rem;
  transition: transform 0.08s ease-in;
}

.quick-actions .card:hover {
  transform: translateY(-1px);
}

/* Landing hero */
.landing .hero .hero-logo {
  height: 64px;
  margin-bottom: 1rem;
}

.landing .feature-card {
  border: 1px solid #e6eaf1;
  border-radius: 1rem;
  padding: 1.25rem;
}

:root {
  --ch-header-h: 70px;
}

/* Admin grids */
.ch-admin .rz-datatable-modern .rz-datatable-data td {
  padding: 1rem;
  vertical-align: middle;
}
.ch-admin .rz-datatable-modern .rz-datatable-thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #6c757d;
  padding: 1rem;
}

/* Material Symbols font */
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 100 700;
  src: url("/_content/Radzen.Blazor/fonts/MaterialSymbolsOutlined.woff2") format("woff2");
  font-display: swap;
}
.rz-icon,
.rz-icon *,
.rz-button .rz-icon,
.rz-panel-menu .rz-link .rz-icon,
.material-symbols-outlined {
  font-family: "Material Symbols Outlined" !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-feature-settings: "liga" 1;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
}

.rz-panel-menu .rz-link i.rz-icon {
  font-style: normal !important;
}

/* ==========================================================================
   CreaHabitat SaaS Theme
   Modern, clean, and professional design system
   ========================================================================== */
/* --- 1. Color Palette --- */
:root {
  /* Primary Brand Colors */
  --ch-primary: #4f46e5; /* Indigo 600 - Modern, trustworthy */
  --ch-primary-hover: #4338ca; /* Indigo 700 */
  --ch-primary-light: #eef2ff; /* Indigo 50 */
  /* Secondary/Accent */
  --ch-secondary: #64748b; /* Slate 500 */
  --ch-success: #10b981; /* Emerald 500 */
  --ch-warning: #f59e0b; /* Amber 500 */
  --ch-danger: #ef4444; /* Red 500 */
  --ch-info: #0ea5e9; /* Sky 500 */
  /* Neutrals & Backgrounds */
  --ch-bg-body: #f8fafc; /* Slate 50 */
  --ch-bg-surface: #ffffff;
  --ch-text-main: #0f172a; /* Slate 900 */
  --ch-text-muted: #64748b; /* Slate 500 */
  --ch-border: #e2e8f0; /* Slate 200 */
  /* Sidebar & Header */
  --ch-sidebar-bg: #ffffff;
  --ch-sidebar-width: 260px;
  --ch-header-height: 64px;
  /* Shadows */
  --ch-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --ch-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --ch-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* --- 2. Global Resets & Typography --- */
body {
  background-color: var(--ch-bg-body);
  color: var(--ch-text-main);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ch-text-main);
}

a {
  color: var(--ch-primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--ch-primary-hover);
}

/* --- 3. Component Overrides --- */
/* Cards */
.card, .rz-card {
  background: var(--ch-bg-surface);
  border: 1px solid var(--ch-border);
  border-radius: 0.75rem; /* 12px */
  box-shadow: var(--ch-shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Buttons */
.btn, .rz-button {
  border-radius: 0.5rem; /* 8px */
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s;
  box-shadow: var(--ch-shadow-sm);
}
.btn.btn-primary, .btn.rz-button-primary, .rz-button.btn-primary, .rz-button.rz-button-primary {
  background-color: var(--ch-primary) !important;
  border-color: var(--ch-primary) !important;
  color: white !important;
}
.btn.btn-primary:hover, .btn.rz-button-primary:hover, .rz-button.btn-primary:hover, .rz-button.rz-button-primary:hover {
  background-color: var(--ch-primary-hover) !important;
  border-color: var(--ch-primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: var(--ch-shadow);
}
.btn.btn-outline-secondary, .rz-button.btn-outline-secondary {
  border-color: var(--ch-border);
  color: var(--ch-text-muted);
  background: transparent;
}
.btn.btn-outline-secondary:hover, .rz-button.btn-outline-secondary:hover {
  background-color: var(--ch-bg-body);
  color: var(--ch-text-main);
}

/* Radzen DataGrid Modernization */
.rz-grid-table {
  border-collapse: separate;
  border-spacing: 0;
}
.rz-grid-table thead th {
  background-color: var(--ch-bg-body) !important;
  border-bottom: 1px solid var(--ch-border) !important;
  color: var(--ch-text-muted) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem !important;
}
.rz-grid-table thead th .rz-column-title {
  color: var(--ch-text-muted) !important;
}
.rz-grid-table tbody td {
  border-bottom: 1px solid var(--ch-border) !important;
  padding: 1rem !important;
  color: var(--ch-text-main);
  font-size: 0.875rem;
}
.rz-grid-table tr:hover td {
  background-color: var(--ch-primary-light) !important;
}

.rz-datatable {
  border: 1px solid var(--ch-border) !important;
  border-radius: 0.75rem;
  box-shadow: var(--ch-shadow-sm);
  overflow: hidden;
}

/* Badges */
.badge {
  padding: 0.35em 0.65em;
  font-weight: 600;
  border-radius: 0.375rem;
  font-size: 0.75rem;
}

.text-bg-success {
  background-color: #dcfce7 !important; /* Emerald 100 */
  color: #166534 !important; /* Emerald 800 */
}

.text-bg-warning {
  background-color: #fef3c7 !important; /* Amber 100 */
  color: #92400e !important; /* Amber 800 */
}

.text-bg-secondary {
  background-color: #f1f5f9 !important; /* Slate 100 */
  color: #475569 !important; /* Slate 600 */
}

/* --- 4. Layout Specifics --- */
/* Sidebar */
.rz-sidebar {
  background-color: var(--ch-sidebar-bg) !important;
  border-right: 1px solid var(--ch-border) !important;
  box-shadow: var(--ch-shadow-sm);
}
.rz-sidebar .rz-panel-menu {
  background: transparent !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item {
  margin: 0.25rem 0.75rem;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item .rz-link {
  border-radius: 0.5rem;
  color: var(--ch-text-muted) !important;
  font-weight: 500;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item .rz-link:hover {
  background-color: var(--ch-bg-body) !important;
  color: var(--ch-text-main) !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item .rz-link.rz-state-selected {
  background-color: var(--ch-primary-light) !important;
  color: var(--ch-primary) !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item .rz-link.rz-state-selected .rz-icon {
  color: var(--ch-primary) !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item .rz-link .rz-icon {
  color: var(--ch-text-muted) !important;
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

/* Header */
.rz-header {
  background-color: var(--ch-bg-surface) !important;
  border-bottom: 1px solid var(--ch-border) !important;
  height: var(--ch-header-height);
  display: flex;
  align-items: center;
}
.rz-header .brand-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ch-text-main);
  letter-spacing: -0.025em;
}

/* Dashboard Cards */
.dashboard-stat-card {
  border: none;
  background: var(--ch-bg-surface);
  padding: 1.5rem;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}
.dashboard-stat-card .stat-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  opacity: 0.1;
  color: var(--ch-primary);
}
.dashboard-stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ch-text-main);
  line-height: 1;
  margin: 0.5rem 0;
}
.dashboard-stat-card .stat-label {
  color: var(--ch-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dashboard-stat-card .stat-desc {
  font-size: 0.875rem;
  color: var(--ch-secondary);
  margin-top: 0.25rem;
}
.dashboard-stat-card.primary {
  border-top: 4px solid var(--ch-primary);
}
.dashboard-stat-card.success {
  border-top: 4px solid var(--ch-success);
}
.dashboard-stat-card.warning {
  border-top: 4px solid var(--ch-warning);
}
.dashboard-stat-card.info {
  border-top: 4px solid var(--ch-info);
}
