@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --portal-bg: #f8f9fa;
  --portal-surface: #ffffff;
  --portal-primary: #051543;
  --portal-secondary: #006e2d;
  --portal-text: #191c1d;
  --portal-muted: #64748b;
  --portal-shadow: 0 20px 40px rgba(5, 21, 67, 0.04);
  --portal-radius-lg: 1rem;
  --portal-radius-xl: 1.5rem;
  --sidebar-width: 16rem;
  --sidebar-collapsed-width: 5rem;
  --topbar-height: 4rem;
  --portal-danger: #ef4444;
  --portal-accent: #006e2d;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8fafc;
  color: var(--portal-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.portal-eyebrow, 
.portal-hero-date span,
.portal-status-badge {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 800;
  font-size: 0.65rem;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variation-settings: 'wght' 300, 'opsz' 24;
}


.portal-sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
  background: var(--portal-bg);
  border-right: 0;
  z-index: 100;
  font-family: 'Manrope', sans-serif;
  overflow-y: visible; /* changed from auto so toggle button shows cleanly outside */
  box-shadow: 20px 0 40px rgba(5, 21, 67, 0.06);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-sidebar-collapsed {
  width: var(--sidebar-collapsed-width);
}

.portal-sidebar-collapsed .nav-text {
  display: none;
}

.portal-sidebar-collapsed .portal-nav-link {
  margin: 0.25rem auto;
  padding: 0.75rem;
  justify-content: center;
  border-radius: 0.5rem;
  width: 3rem;
  height: 3rem;
}

.portal-sidebar-collapsed .portal-brand-logo {
  opacity: 0;
  pointer-events: none;
}

.portal-btn-header {
  background: var(--portal-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(5, 21, 67, 0.2);
  transition: all 0.2s;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  border: none;
}

.portal-btn-header:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(5, 21, 67, 0.3);
  background: var(--portal-primary);
  color: white;
  text-decoration: none;
}

.portal-btn-header:active {
  transform: scale(0.95);
}

.portal-btn-header span {
  font-size: 1.25rem;
}

.portal-sidebar-toggle {
  position: absolute;
  top: 5rem;
  right: -0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--portal-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(5, 21, 67, 0.1);
  transition: transform 0.2s;
}

.portal-sidebar-toggle:hover {
  transform: scale(1.1);
}

.portal-sidebar-toggle .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 0.3s;
}

.portal-brand-logo {
  height: 4.5rem;
  width: auto;
  object-fit: contain;
  transition: opacity 0.3s;
}

.portal-sidebar-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  padding: 0 1.5rem;
}

.portal-sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-nav-link {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-left: 1rem;
  color: #45464f; 
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px 0 0 999px; 
}

.portal-nav-link:hover {
  color: var(--portal-primary);
}

button.portal-nav-link {
  border: 0;
  background: transparent;
  width: calc(100% - 1rem); /* 100% minus margin-left */
  text-align: left;
  cursor: pointer;
}

.portal-nav-link.active {
  background: #ffffff !important;
  color: var(--portal-primary) !important;
  font-weight: 700;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.02);
}

.portal-nav-link span.material-symbols-outlined {
  font-size: 1.5rem;
  color: inherit; /* Icons should be grey in menu, blue only when active */
}

.portal-nav-link.active span.material-symbols-outlined {
  font-variation-settings: 'wght' 600, 'opsz' 24;
}

/* Sidebar Footer */
.portal-sidebar-bottom {
  margin-top: auto;
  padding: 0;
}

.portal-sidebar-separator {
  border: 0;
  border-top: 1px solid rgba(198, 198, 208, 0.3);
  margin: 1.5rem 1rem 0.5rem;
}

.portal-sidebar-footer {
  display: flex;
  flex-direction: column;
}



.portal-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  overflow-x: hidden;
}

.portal-main-shell {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: auto;
  min-width: 0;
  background: var(--portal-bg);
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-sidebar-collapsed .portal-main-shell {
  margin-left: var(--sidebar-collapsed-width);
}

.portal-topbar {
  height: var(--topbar-height);
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-sidebar-collapsed .portal-topbar {
  left: var(--sidebar-collapsed-width);
}

.portal-topbar-search {
  position: relative;
  flex: 1;
  max-width: 36rem;
}

.portal-topbar-search span {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  color: var(--portal-muted);
  font-size: 1.25rem;
}

.portal-topbar-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 0;
  border-radius: 999px;
  background: #f3f4f5;
  color: var(--portal-text);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.portal-topbar-search input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px var(--portal-secondary);
  outline: none;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.portal-topbar-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-icon-button {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--portal-muted);
  transition: all 0.2s;
}

.portal-icon-button:hover {
  background: #f1f5f9;
  color: var(--portal-primary);
}

.portal-user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(198, 198, 208, 0.3);
}

.portal-user-chip-text {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.1;
}

.portal-user-chip-role {
  color: #10b981; /* Green role */
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.portal-user-chip strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--portal-primary);
  white-space: nowrap;
}

.portal-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
}

.portal-main-content {
  padding: 6rem 3rem 3rem;
  background: var(--portal-bg);
  min-height: 100vh;
}

.portal-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-grid {
  display: grid;
  gap: 1.5rem;
}

.portal-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.portal-home-stats .portal-stat-card {
  align-items: flex-start;
  flex-direction: column;
  gap: 1rem;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.portal-home-stats .portal-stat-icon-wrap {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-home-stats .stat-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--portal-muted);
}

.portal-home-stats .stat-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--portal-primary);
}

.portal-home-stats .portal-badge {
  font-size: 0.55rem;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.04em;
}

.portal-section-card,
.portal-table-card,
.portal-calendar-card,
.portal-media-card {
  border: 1px solid var(--portal-border);
  background: var(--portal-surface);
  border-radius: var(--portal-radius-xl);
  box-shadow: var(--portal-shadow);
}

.portal-stat-card {
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  border: 1px solid rgba(198, 198, 208, 0.2);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(5, 21, 67, 0.04);
}

.portal-stat-card-bordered {
  background: #f1f5f9;
  border: none;
  border-left: 4px solid var(--portal-primary);
  border-radius: 1rem;
}

.portal-stat-card-bordered-secondary { border-left-color: var(--portal-secondary); }
.portal-stat-card-bordered-tertiary { border-left-color: #f59e0b; }

.portal-stat-icon-wrap-bordered {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
}

.portal-stat-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-stat-icon-wrap span {
  font-size: 1.75rem;
}

.portal-stat-icon-wrap-primary {
  background: rgba(5, 21, 67, 0.1);
  color: #051543;
}

.portal-stat-icon-wrap-secondary {
  background: rgba(0, 110, 45, 0.1);
  color: #006e2d;
}

.portal-stat-icon-wrap-tertiary {
  background: #fff0e1;
  color: #7b3d00;
}

.portal-stat-card-info {
  display: flex;
  flex-direction: column;
}

.portal-stat-card-info span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--portal-muted);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.portal-stat-card-info strong {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--portal-primary);
  line-height: 1;
}

/* Icon & Badge classes for stat cards */
.portal-icon-primary {
  font-size: 2rem;
  color: var(--portal-primary);
}

.portal-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
}

.portal-badge-success {
  background: #cdebce;
  color: #002109;
}

.portal-badge-neutral {
  background: #e3e3e3;
  color: #45464f;
}

.portal-badge-error {
  background: #ffdad6;
  color: #410002;
}

/* Empty state */
.portal-state-empty {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--portal-muted);
}

.portal-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.portal-hero-content {
  display: flex;
  flex-direction: column;
}

.portal-hero h1 {
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  margin-bottom: 0.5rem;
  color: var(--portal-primary);
}

.portal-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: #006e2d; /* Green secondary from POC */
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.portal-hero p {
  font-size: 1.15rem;
  color: var(--portal-muted);
}

.portal-section-header p,
.portal-media-card p,
.portal-compact-card p {
  color: var(--portal-muted);
}

.portal-hero-date {
  text-align: right;
}

.portal-hero-date span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--portal-secondary);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
}

.portal-hero-date p {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--portal-primary);
  margin: 0;
  text-align: right;
  text-transform: capitalize;
}

.portal-grid {
  display: grid;
  gap: 1.5rem;
}



.portal-stat-card-highlight {
  border-top: 4px solid var(--portal-primary);
}



.portal-stat-icon-wrap span.material-symbols-outlined {
  font-size: 1.5rem;
}

.portal-icon-primary {
  color: var(--portal-primary);
}

.portal-icon-secondary {
  color: var(--portal-secondary);
}



.portal-dashboard-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.portal-planning-layout {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 2rem;
}

.portal-dashboard-layout > section:first-child {
  grid-column: span 2;
}

.portal-dashboard-layout > section:last-child {
  grid-column: span 1;
}

.portal-side-stack,
.portal-planning-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-section-card,
.portal-quick-actions {
  padding: 2rem;
}

.portal-quick-actions h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.portal-quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.portal-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.portal-section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--portal-primary);
  margin: 0;
}

.portal-inline-link {
  color: var(--portal-secondary);
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.portal-inline-link:hover {
  text-decoration: none;
  color: var(--portal-primary);
}

.portal-filter-input:focus,
.portal-filter-select:focus {
  outline: none;
  border-color: var(--portal-primary);
  box-shadow: 0 0 0 4px rgba(5, 21, 67, 0.05);
}

.portal-list-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portal-booking-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: white;
  border: 1px solid rgba(198, 198, 208, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: none; /* No default shadow in POC class list */
}

.portal-booking-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.portal-booking-img-wrap {
  width: 6rem;
  height: 6rem;
  border-radius: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
}

.portal-booking-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portal-booking-card:hover img {
  transform: scale(1.1);
}

.portal-booking-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portal-booking-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--portal-primary);
}

.portal-booking-meta,
.portal-booking-details,
.portal-media-card-metadata,
.portal-compact-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--portal-muted);
  font-size: 0.875rem;
  align-items: center;
}

.portal-booking-meta {
  margin-bottom: 0.25rem;
}

.portal-booking-details span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.portal-booking-details span.material-symbols-outlined {
  font-size: 0.875rem;
}

.portal-booking-side {
  text-align: right;
  margin-left: auto;
}

.portal-booking-side strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--portal-primary);
}

.portal-booking-side small,
.portal-booking-content p,
.portal-table td small {
  display: block;
  font-size: 0.75rem;
  color: var(--portal-muted);
}

.portal-quick-actions {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--portal-primary);
  color: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(5, 21, 67, 0.2);
}

.portal-quick-action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  transition: all 0.2s;
  font-weight: 500;
}

.portal-quick-action-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.portal-quick-action-link div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-map-card {
  position: relative;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  border: 0;
  height: 25rem; /* 400px fixed height */
}

.portal-map-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.portal-map-card-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-map-card-overlay h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--portal-primary);
}

.portal-map-card-overlay p {
  color: var(--portal-muted);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.125rem;
}

.portal-map-card-button {
  background: var(--portal-primary);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.2s;
  cursor: pointer;
}

.portal-map-card-button:hover {
  background: #030e2f;
}

.portal-filter-bar {
  background: white;
  border-radius: 1.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(198, 198, 208, 0.2);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .portal-filter-bar {
    flex-direction: row;
  }
}

.portal-filter-search {
  flex: 1;
  position: relative;
}

.portal-filter-search span {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--portal-muted);
}

.portal-filter-input,
.portal-filter-select {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 1rem;
  font-size: 0.875rem;
  color: var(--portal-primary);
  outline: none;
  transition: all 0.2s;
}

.portal-filter-input:focus,
.portal-filter-select:focus {
  background: white;
  border-color: var(--portal-primary);
  box-shadow: 0 0 0 4px rgba(5, 21, 67, 0.05);
}

.portal-filter-select {
  padding-left: 1rem;
  font-weight: 700;
  min-width: 14rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.portal-filter-bar .portal-filter-select {
  width: auto;
}

.portal-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 1rem;
}

.portal-filter-tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--portal-muted);
  border: none;
  background: transparent;
  transition: all 0.2s;
  letter-spacing: 0.025em;
}

.portal-filter-tab-btn:hover {
  color: var(--portal-primary);
}

.portal-filter-tab-btn.active {
  background: var(--portal-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(5, 21, 67, 0.15);
}

.portal-table tr:hover {
  background: rgba(243, 244, 246, 0.3) !important;
}

.portal-table-card {
  background: white;
  border-radius: 2rem;
  box-shadow: 0 20px 40px rgba(5, 21, 67, 0.06);
  border: 1px solid rgba(198, 198, 208, 0.2);
  overflow: hidden;
  margin-bottom: 3rem;
}

.portal-table {
  margin-bottom: 0;
}

.portal-table thead th {
  background: rgba(243, 244, 249, 1);
  border-bottom: none;
  color: #44474e; /* on-surface-variant */
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1.5rem;
}

.portal-table td {
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  padding: 1.5rem;
}

.portal-table td strong {
  display: block;
  font-weight: 700;
  color: var(--portal-primary);
  font-size: 1.05rem;
  line-height: 1.1;
}

.portal-table td small {
  display: block;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--portal-muted);
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

.portal-table tr {
  transition: border-color 0.2s, background-color 0.2s;
}

/* Premium Validation Messages */
.portal-validation-message {
  color: var(--portal-danger) !important;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex !important;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(239, 68, 68, 0.05);
  border-radius: 0.5rem;
  border-left: 3px solid var(--portal-danger);
  animation: slideInLeft 0.2s ease-out;
}

.portal-validation-message::before {
  content: 'error';
  font-family: 'Material Symbols Outlined';
  font-size: 1rem;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.portal-modal-input.invalid, 
.portal-modal-select.invalid,
.portal-modal-input.modified.invalid, 
.portal-modal-select.modified.invalid {
  border-color: #ef4444 !important;
  background-color: #fffafb !important;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}


.portal-table tbody tr:hover {
  background: rgba(243, 244, 246, 0.5);
}

.portal-table-actions {
  display: inline-flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.portal-table-btn {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--portal-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-table-btn:hover {
  background: rgba(5, 21, 67, 0.08);
  color: var(--portal-primary);
  transform: scale(1.1);
}

.portal-table-btn-danger:hover {
  background: rgba(147, 0, 10, 0.08);
  color: #93000a;
}

.portal-table-btn span {
  font-size: 1.6rem;
}

.portal-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.portal-status-badge.success {
  background: #93f9a2;
  color: #007430;
}

.portal-status-badge.warning {
  background: #ffe0c8;
  color: #2e1500;
}

.portal-status-badge.danger {
  background: #ffdad6;
  color: #410002;
}

.portal-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.portal-card-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-media-card {
  overflow: hidden;
}

.portal-media-card img {
  width: 100%;
  height: 15rem;
  object-fit: cover;
}

.portal-media-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.portal-media-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.portal-room-card {
  background: white;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(5, 21, 67, 0.06);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(198, 198, 208, 0.2);
  height: 100%;
}

.portal-room-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(5, 21, 67, 0.12);
}

.portal-room-img-wrap {
  height: 16rem;
  position: relative;
  overflow: hidden;
}

.portal-room-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.portal-room-card:hover .portal-room-img-wrap img {
  transform: scale(1.1);
}

.portal-room-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.45rem 1rem;
  background: var(--portal-secondary);
  color: white;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 10;
}

.portal-room-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portal-room-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.portal-room-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--portal-primary);
  margin: 0;
}

.portal-room-price {
  text-align: right;
}

.portal-room-price span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--portal-muted);
  letter-spacing: 0.05em;
}

.portal-room-price strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--portal-secondary);
}

.portal-room-metadata {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--portal-muted);
  font-size: 0.875rem;
}

.portal-room-metadata span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.portal-room-metadata span .material-symbols-outlined {
  font-size: 1.25rem;
}

.portal-room-description {
  font-size: 0.95rem;
  color: var(--portal-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-room-actions {
  margin-top: auto;
  display: flex;
  gap: 0.75rem;
}

.portal-btn-edit {
  flex: 1;
  background: var(--portal-primary);
  color: white;
  padding: 1rem;
  border-radius: 1rem;
  font-weight: 700;
  border: none;
  transition: all 0.2s;
}

.portal-btn-edit:hover {
  background: #030e2f;
  transform: translateY(-2px);
}

.portal-btn-delete-square {
  width: 3.5rem;
  height: 3.5rem;
  background: #f1f5f9;
  color: #ef4444;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.2s;
}

.portal-equipment-card {
  background: white;
  border-radius: 2rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 20px 40px rgba(5, 21, 67, 0.06);
  border: 1px solid rgba(198, 198, 208, 0.2);
  transition: all 0.3s ease;
}

.portal-equipment-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(5, 21, 67, 0.1);
}

.portal-equipment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.portal-equipment-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: #f1f5f9;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--portal-primary);
}

.portal-equipment-icon span {
  font-size: 1.75rem;
}

.portal-equipment-card-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--portal-primary);
  margin: 0;
}

.portal-equipment-stock-block {
  background: rgba(241, 245, 249, 0.5);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-equipment-stock-block span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--portal-muted);
  letter-spacing: 0.05em;
}

.portal-equipment-stock-block strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--portal-primary);
}

.h-full {
  height: 100%;
}

.analytics-layout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

@media (max-width: 1200px) {
  .analytics-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Analytics Premium Refactor */
.portal-analytics-card {
  background: white;
  border-radius: 2rem;
  padding: 2.5rem;
  box-shadow: 0 10px 50px rgba(5, 21, 67, 0.05);
  border: 1px solid rgba(198, 198, 208, 0.2);
  position: relative;
  overflow: hidden;
}

.portal-analytics-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 110, 45, 0.03) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.portal-charts-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 1200px) {
  .portal-charts-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.portal-chart-box {
  display: flex;
  flex-direction: column;
}

.portal-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.portal-chart-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-chart-title-wrap i {
  color: var(--portal-secondary);
  background: rgba(0, 110, 45, 0.08);
  padding: 0.5rem;
  border-radius: 0.75rem;
}

.portal-chart-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--portal-primary);
  letter-spacing: -0.01em;
}

.portal-chart-subtitle {
  font-size: 0.75rem;
  color: var(--portal-muted);
  font-weight: 500;
}

/* Horizontal Bar Chart (Occupation) */
.portal-occupation-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-occupation-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.portal-occupation-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.portal-room-name {
  font-weight: 600;
  color: var(--portal-primary);
  font-size: 0.95rem;
}

.portal-room-count {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--portal-bg);
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--portal-secondary);
}

.portal-progress-track {
  height: 0.6rem;
  background: #f1f5f9;
  border-radius: 1rem;
  overflow: hidden;
}

.portal-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--portal-primary) 0%, #1e293b 100%);
  border-radius: 1rem;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.portal-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  animation: barShimmer 3s infinite linear;
}

@keyframes barShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}


/* Vertical Growth Chart */
.portal-growth-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  padding: 1.5rem 0.5rem 0.5rem;
  background: rgba(248, 250, 252, 0.5);
  border-radius: 1.5rem;
  border: 1px dashed #e2e8f0;
}

.portal-month-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 1rem;
  position: relative;
}

.portal-month-pillar {
  width: 1.5rem;
  background: linear-gradient(180deg, var(--portal-secondary) 0%, #004d20 100%);
  border-radius: 999px 999px 4px 4px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portal-month-pillar:hover {
  transform: scaleX(1.15);
  filter: drop-shadow(0 0 8px rgba(0, 110, 45, 0.3));
}

.portal-pillar-tooltip {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--portal-primary);
  color: white;
  padding: 0.4rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.portal-pillar-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--portal-primary);
}

.portal-month-pillar:hover .portal-pillar-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.portal-month-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.portal-month-column.is-current .portal-month-label {
  color: var(--portal-primary);
}

/* User Page Styles */
.portal-user-info-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portal-user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(5, 21, 67, 0.1);
  color: var(--portal-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.portal-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-user-avatar span {
  font-size: 1.5rem;
}

.portal-user-detail {
  display: flex;
  flex-direction: column;
}

.portal-user-detail strong {
  color: var(--portal-primary) !important;
  font-weight: 800;
  display: block;
  font-size: 1.1rem;
}

.portal-user-id {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--portal-muted);
  letter-spacing: 0.05em;
  margin-top: 0.125rem;
}

/* Modal / Popup Styles */
.portal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 21, 67, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.portal-modal-container {
  position: relative;
  background: white;
  width: calc(100% - 2rem);
  max-width: 640px;
  max-height: 90vh;
  margin: auto;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portal-modal-container.portal-modal-lg {
  max-width: 900px;
}

.portal-modal-container > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.portal-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  flex-shrink: 0;
}

.portal-modal-body,
.portal-modal-body-scroll {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.portal-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #f1f5f9;
  background: white;
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.portal-modal-footer .portal-modal-btn {
  flex: 1;
  justify-content: center;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Premium Toast Styling */
.portal-toast-container {
  z-index: 9999 !important;
}
.portal-toast {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 1rem !important;
  color: white !important;
  border-left: 6px solid transparent !important;
  margin-bottom: 0.75rem !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
  overflow: hidden;
}

.portal-toast-success {
  background: rgba(6, 124, 77, 0.85) !important;
  border-left-color: #10b981 !important;
}

.portal-toast-danger {
  background: rgba(220, 38, 38, 0.85) !important;
  border-left-color: #f87171 !important;
}

.portal-toast-warning {
  background: rgba(217, 119, 6, 0.85) !important;
  border-left-color: #fbbf24 !important;
  color: white !important;
}

.portal-toast-info {
  background: rgba(13, 110, 253, 0.85) !important;
  border-left-color: #60a5fa !important;
}

.portal-toast .btn-close {
  filter: brightness(0) invert(1);
}

.portal-modal-input,
.portal-modal-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: var(--portal-primary);
  outline: none;
  transition: all 0.2s;
}

.portal-modal-input:focus,
.portal-modal-select:focus {
  background: white;
  border-color: var(--portal-primary);
  box-shadow: 0 0 0 3px rgba(5, 21, 67, 0.05);
}

.portal-modal-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

.portal-modal-close {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--portal-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
}

.portal-modal-close:hover {
  background: rgba(5, 21, 67, 0.05);
  color: var(--portal-danger);
}

.portal-modal-header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(5, 21, 67, 0.1);
  background: white;
  color: var(--portal-primary);
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.2s;
  cursor: pointer;
}

.portal-modal-header-btn:hover {
  background: rgba(5, 21, 67, 0.05);
  border-color: var(--portal-primary);
  transform: translateY(-1px);
}

.portal-modal-header-btn .material-symbols-outlined {
  font-size: 1.25rem;
}

/* Form Styles matching POC */
.portal-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--portal-primary);
  margin-bottom: 0.5rem;
}

.portal-form-label-small {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--portal-muted);
}

.portal-upload-zone {
  border: 2px dashed rgba(5, 21, 67, 0.15);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  background: #fdfdfd;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.portal-upload-zone:hover {
  background: #f8fafc;
  border-color: var(--portal-secondary);
}

.portal-upload-icon {
  font-size: 2.5rem;
  color: var(--portal-muted);
  opacity: 0.5;
}

.portal-upload-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--portal-muted);
}

.portal-upload-hint {
  font-size: 0.75rem;
  color: var(--portal-muted);
  font-weight: 500;
}

.portal-modal-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.portal-modal-btn-cancel {
  background: transparent;
  color: var(--portal-muted);
  border: 1px solid rgba(5, 21, 67, 0.1);
}

.portal-modal-btn-cancel:hover {
  background: #f1f5f9;
  border-color: rgba(5, 21, 67, 0.2);
}

.portal-modal-btn-primary {
  background: var(--portal-primary);
  color: white;
  min-width: 10rem;
}

.portal-modal-btn-primary:hover {
  background: #030a21;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(5, 21, 67, 0.2);
}

.portal-modal-btn-primary:active {
  transform: translateY(0);
}

.portal-modal-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.portal-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
}

.portal-role-badge.admin {
  background: rgba(5, 21, 67, 0.08);
  color: var(--portal-primary);
  border-color: rgba(5, 21, 67, 0.15);
}

.portal-role-badge.agent {
  background: rgba(0, 110, 45, 0.08);
  color: var(--portal-secondary);
  border-color: rgba(0, 110, 45, 0.15);
}

.portal-compact-card {
  padding: 1.5rem;
}

.portal-compact-card-top {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.portal-compact-card-top img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1rem;
  object-fit: cover;
  background: var(--portal-surface-soft);
}

.portal-planning-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0;
}

.portal-planning-header h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--portal-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.portal-planning-header p {
  color: var(--portal-muted);
  margin: 0;
}

.portal-calendar-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem;
  border-radius: 9999px;
  background: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.portal-calendar-toolbar strong {
  padding: 0 1.5rem;
  font-weight: 700;
  color: var(--portal-primary);
  min-width: 180px;
  text-align: center;
  text-transform: capitalize;
}

.portal-icon-button {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--portal-muted);
  transition: all 0.2s;
  cursor: pointer;
}

.portal-icon-button:hover {
  background: #f3f4f6;
  color: var(--portal-primary);
}

.portal-filter-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(198, 198, 208, 0.2);
}

.portal-filter-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--portal-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-legend-card {
  background: rgba(5, 21, 67, 0.05);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(5, 21, 67, 0.1);
}

.portal-legend-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--portal-primary);
  margin-bottom: 0.5rem;
}

.portal-legend-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
}

.legend-success { background: var(--portal-secondary); }
.legend-warning { background: #74777f; }
.legend-danger { background: #93000a; }

.portal-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.portal-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.portal-checkbox-label span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--portal-muted);
  transition: color 0.2s;
}

.portal-checkbox-label:hover span {
  color: var(--portal-primary);
}

.portal-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(198, 198, 208, 0.5);
  cursor: pointer;
}

.portal-calendar-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(198, 198, 208, 0.2);
  overflow: hidden;
  flex: 1;
}

.portal-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.portal-calendar-header {
  background: rgba(243, 244, 246, 0.3);
  border-bottom: 1px solid rgba(198, 198, 208, 0.2);
}

.portal-calendar-header div {
  padding: 0.75rem;
  text-align: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.portal-calendar-body {
  grid-auto-rows: 140px;
}

.portal-calendar-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  border-right: 1px solid rgba(198, 198, 208, 0.2);
  border-bottom: 1px solid rgba(198, 198, 208, 0.2);
  transition: background 0.2s;
  cursor: pointer;
}

.portal-calendar-cell:hover {
  background: rgba(243, 244, 246, 0.5);
}

.portal-calendar-cell.is-outside {
  background: rgba(18, 59, 116, 0.02);
  opacity: 0.6;
}

.portal-calendar-cell.is-today {
  background: rgba(0, 110, 45, 0.04);
}

.portal-calendar-cell-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.25rem;
  margin-bottom: 0.25rem;
}

.portal-calendar-cell-top strong {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--portal-primary);
}

.portal-calendar-cell-top span {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--portal-muted);
  opacity: 0.6;
}

.portal-calendar-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.portal-booking-chip {
  display: block;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: box-shadow 0.2s;
  border-left: 2px solid;
  text-decoration: none;
}

.portal-booking-chip:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.portal-booking-chip.success {
  background: rgba(205, 235, 206, 0.5);
  color: #002109;
  border-left-color: #006e2d;
}

.portal-booking-chip.warning {
  background: rgba(227, 227, 227, 0.5);
  color: #45464f;
  border-left-color: #74777f;
}

.portal-booking-chip.danger {
  background: rgba(255, 218, 214, 0.5);
  color: #410002;
  border-left-color: #93000a;
}

.portal-empty-state,
.portal-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1.5rem;
  color: var(--portal-muted);
  text-align: center;
}

#blazor-error-ui {
  display: none;
}

/* --- Mobile Responsiveness --- */

.portal-mobile-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.5rem;
  background: var(--portal-surface);
  color: var(--portal-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  cursor: pointer;
}

.portal-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 21, 67, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 95;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1024px) {
  .portal-sidebar {
    left: calc(-1 * var(--sidebar-width));
    box-shadow: none;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .portal-sidebar-mobile-open {
    left: 0;
    box-shadow: 20px 0 40px rgba(5, 21, 67, 0.15);
  }

  .portal-main-shell,
  .portal-sidebar-collapsed .portal-main-shell {
    margin-left: 0;
  }

  .portal-topbar,
  .portal-sidebar-collapsed .portal-topbar {
    left: 0;
    padding: 0 1rem;
  }

  .portal-mobile-toggle {
    display: flex;
  }

  .portal-main-content {
    padding: 6rem 1rem 2rem;
  }

  .portal-dashboard-layout,
  .portal-planning-layout,
  .portal-grid-3 {
    grid-template-columns: 1fr;
  }

  .portal-dashboard-layout > section:first-child,
  .portal-dashboard-layout > section:last-child {
    grid-column: span 1;
  }

  .portal-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .portal-hero-date,
  .portal-hero-date span,
  .portal-hero-date p {
    text-align: left;
  }

  .portal-topbar-search {
    max-width: none;
  }

  .portal-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .portal-booking-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }

  .portal-booking-img-wrap {
    width: 100%;
    height: 10rem;
  }

  .portal-booking-side {
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid rgba(198, 198, 208, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .portal-calendar-body {
    grid-auto-rows: minmax(100px, auto);
  }

  .portal-calendar-cell {
    padding: 0.25rem;
  }

  .portal-calendar-cell-top strong {
    font-size: 0.75rem;
  }

  .portal-calendar-cell-top span {
    display: none;
  }

  .portal-booking-chip {
    padding: 0.2rem 0.25rem;
    font-size: 0.55rem;
  }

  .portal-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }

  .portal-filter-search {
    width: 100%;
    margin: 0;
  }

  .portal-filter-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* --- Responsive Table to Cards --- */
  .portal-table-card {
    background: transparent;
    box-shadow: none;
    border: none;
  }

  .portal-table, 
  .portal-table thead, 
  .portal-table tbody, 
  .portal-table th, 
  .portal-table td, 
  .portal-table tr { 
    display: block; 
  }

  .portal-table thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .portal-table tr {
    margin-bottom: 1.25rem;
    border: 1px solid rgba(198, 198, 208, 0.2);
    border-radius: 1.25rem;
    background: white;
    box-shadow: 0 4px 15px rgba(5, 21, 67, 0.04);
    overflow: hidden;
    padding: 0;
  }

  .portal-table td {
    border: none;
    border-bottom: 1px solid #f8fafc;
    position: relative;
    padding: 1rem 1.25rem !important;
    text-align: left !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
  }

  .portal-table td::before {
    content: attr(data-label);
    display: block;
    width: 100%;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--portal-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
  }

  .portal-table td:last-child {
    border-bottom: 0;
    padding: 1.25rem !important;
    text-align: center !important;
    background: #f8fafc;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  
  .portal-table td:last-child::before {
    display: none;
  }
  
  .portal-table-actions {
    width: 100%;
    justify-content: center;
    gap: 0.75rem;
  }
}

/* --- Settings & Form Extensions --- */
.portal-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .portal-settings-grid {
    grid-template-columns: 1fr;
  }
}

.portal-settings-section {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(5, 21, 67, 0.04);
  border: 1px solid rgba(198, 198, 208, 0.2);
  height: 100%;
}

.portal-settings-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.portal-settings-section-title span {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(5, 21, 67, 0.05);
  color: var(--portal-primary);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-settings-section-title h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--portal-primary);
  margin: 0;
}

/* --- Inspection Styles --- */
.portal-inspection-zone-card {
  background: white;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(5, 21, 67, 0.05);
  border: 1px solid rgba(198, 198, 208, 0.2);
  margin-bottom: 2rem;
}

.portal-inspection-zone-header {
  padding: 1.25rem 2rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-inspection-zone-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--portal-primary);
  margin: 0;
}

.portal-inspection-zone-body {
  padding: 2rem;
}

.portal-condition-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.portal-condition-badge.good { background: rgba(0, 110, 45, 0.08); color: var(--portal-secondary); }
.portal-condition-badge.fair { background: rgba(245, 158, 11, 0.08); color: #b45309; }
.portal-condition-badge.bad { background: rgba(239, 68, 68, 0.08); color: #b91c1c; }
.portal-condition-badge.missing { background: rgba(100, 116, 139, 0.08); color: #475569; }

.portal-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.portal-photo-item {
  aspect-ratio: 1/1;
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.portal-photo-item:hover {
  border-color: var(--portal-secondary);
  transform: scale(1.02);
}

.portal-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-photo-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #ef4444;
  color: white;
  border-radius: 9999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 1024px) {
  .portal-inspection-zone-body {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .portal-home-stats {
    grid-template-columns: 1fr;
  }

  .portal-stat-card {
    padding: 1.25rem;
  }

  .portal-auth-card {
    border-radius: 1.5rem;
  }

  .portal-auth-header h1 {
    font-size: 1.5rem;
  }
}

.portal-auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.portal-auth-card {
  width: min(100%, 24rem);
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(5, 21, 67, 0.04);
}

.portal-auth-card-wide {
  width: min(100%, 30rem);
}

.portal-auth-card-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 4rem 3rem;
  text-align: center;
}

.portal-auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
}

.portal-auth-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--portal-primary);
  line-height: 1.2;
}

.portal-auth-header p {
  max-width: 24rem;
}

.portal-auth-icon {
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(18, 59, 116, 0.08), rgba(18, 59, 116, 0.14));
  color: var(--portal-primary);
  font-size: 1.7rem;
  box-shadow: inset 0 0 0 0.35rem rgba(18, 59, 116, 0.04);
}

.portal-auth-body {
  padding: 0 2rem 2rem;
}

.portal-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portal-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.portal-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.portal-auth-field label,
.portal-auth-field-header small,
.portal-auth-field-header label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-auth-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-auth-field-header small {
  color: var(--portal-muted);
}

.portal-auth-input-wrap {
  position: relative;
}

.portal-auth-input-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #98a4b7;
  z-index: 1;
}

.portal-auth-input {
  min-height: 3.2rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(18, 59, 116, 0.1);
  background: #f7f9fc;
}

.portal-auth-input.with-icon {
  padding-left: 2.8rem;
}

.portal-auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #142b63, #102354);
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(16, 35, 84, 0.24);
}

.portal-auth-submit:disabled {
  opacity: 0.8;
}

.portal-auth-footer {
  padding: 1.35rem 1.75rem 1.6rem;
  border-top: 1px solid rgba(18, 59, 116, 0.08);
  color: var(--portal-muted);
  text-align: center;
}

.portal-field-error {
  color: var(--portal-danger);
  font-size: 0.82rem;
}

/* Validation states */
.form-control.modified.valid {
  border-color: var(--portal-accent);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%231b7f6b' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}
.portal-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: var(--portal-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(5, 21, 67, 0.2);
  border: none;
  cursor: pointer;
  z-index: 100;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.portal-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 25px 50px -12px rgba(5, 21, 67, 0.3);
  color: white;
}

.portal-fab span {
  font-size: 1.75rem;
}

.portal-page-planning {
  gap: 2rem !important;
}
.form-control.modified.invalid {
  border-color: var(--portal-danger);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23b94747'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23b94747' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

@media (max-width: 640px) {
  .portal-auth-grid {
    grid-template-columns: 1fr;
  }

  .portal-auth-body,
  .portal-auth-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* --- Form Switches & UI Refinements --- */
.custom-switch .form-check-input {
  width: 3rem;
  height: 1.5rem;
  cursor: pointer;
}

.custom-switch .form-check-input:checked {
  background-color: var(--portal-secondary);
  border-color: var(--portal-secondary);
}

.fw-700 { font-weight: 700; }

.sticky-bottom {
  position: sticky;
  bottom: 0;
  background: white;
  z-index: 100;
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -10px 20px rgba(0,0,0,0.05);
}

@media (max-width: 1024px) {
  .sticky-bottom {
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1rem;
  }
}

/* --- Print Styles --- */
@media print {
  .portal-sidebar,
  .portal-topbar,
  .portal-planning-sidebar,
  .portal-icon-button,
  .portal-btn-header,
  .portal-calendar-toolbar button,
  .portal-fab,
  .portal-mobile-toggle {
    display: none !important;
  }

  .portal-shell {
    grid-template-columns: 1fr !important;
    display: block !important;
  }

  .portal-main-shell {
    margin: 0 !important;
    padding: 0 !important;
  }

  .portal-main-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .portal-planning-layout {
    display: block !important;
  }

  /* Ensure background colors are printed */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: white !important;
  }

  .portal-calendar-day {
    min-height: 100px !important;
    page-break-inside: avoid;
  }
}

/* --- Portal Custom Alerts & Validation Summaries --- */
.portal-alert {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(198, 198, 208, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(5, 21, 67, 0.03);
}

.portal-alert-warning {
  background-color: #fff9eb;
  color: #b45309;
  border-left: 4px solid #f59e0b;
}

.portal-alert-danger {
  background-color: #fef2f2;
  color: #b91c1c;
  border-left: 4px solid #ef4444;
}

.portal-alert ul {
  margin: 0;
  padding-left: 1.25rem;
  list-style-type: none;
}

.portal-alert ul li::before {
  content: "•";
  color: currentColor;
  display: inline-block;
  width: 1rem;
  margin-left: -1rem;
  font-weight: bold;
}

/* Pagination */
.portal-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--portal-border);
}

.portal-pagination-info {
  font-size: 0.9rem;
  color: var(--portal-text-muted);
}

.portal-pagination-info strong {
  color: var(--portal-text);
}
