/* ==========================================================================
   SIMSURAT DESA v2.0 - Kumo UI Design System (Cloudflare Official Vibe)
   https://kumo-ui.com
   ========================================================================== */

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

:root {
  --kumo-brand: #F38020;
  --kumo-brand-hover: #D96B00;
  --kumo-brand-tint: #FFF4EC;
  --kumo-focus: rgba(243, 128, 32, 0.3);
  --kumo-canvas: #FAFAFA;
  --kumo-sidebar: #FFFFFF;
  --kumo-card: #FFFFFF;
  --kumo-default: #111827;
  --kumo-subtle: #6B7280;
  --kumo-hairline: #E5E7EB;
  --kumo-line: #D1D5DB;
  --kumo-hover: #F3F4F6;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.18);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--kumo-canvas);
  color: var(--kumo-default);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* SVG Icons Styling */
.icon-svg {
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.btn .icon-svg {
  margin-right: 6px;
  vertical-align: -2px;
}

/* App Container Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation (Kumo Dashboard Style) */
.sidebar {
  width: 260px;
  background-color: var(--kumo-sidebar);
  border-right: 1px solid var(--kumo-hairline);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 20px 10px;
  border-bottom: 1px solid var(--kumo-hairline);
  margin-bottom: 20px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background-color: var(--kumo-brand);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(243, 128, 32, 0.35);
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--kumo-default);
}

.brand-text p {
  font-size: 11.5px;
  color: var(--kumo-subtle);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--kumo-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: var(--kumo-hover);
  color: var(--kumo-default);
}

.nav-item.active {
  background-color: var(--kumo-brand-tint);
  color: var(--kumo-brand);
  font-weight: 600;
  border-color: rgba(243, 128, 32, 0.2);
}

.nav-item.active .nav-icon {
  color: var(--kumo-brand);
  opacity: 1;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid var(--kumo-hairline);
  font-size: 11.5px;
  color: var(--kumo-subtle);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 32px 40px;
  max-width: 1240px;
  overflow-y: auto;
}

.view-header {
  margin-bottom: 28px;
}

.view-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--kumo-default);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-subtitle {
  font-size: 13.5px;
  color: var(--kumo-subtle);
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Stat Cards (Kumo Style) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--kumo-card);
  border: 1px solid var(--kumo-hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--kumo-line);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--kumo-subtle);
}

.stat-icon {
  font-size: 18px;
  color: var(--kumo-brand);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--kumo-default);
  letter-spacing: -0.5px;
}

/* Kumo Callout / Action Banner */
.callout-banner {
  background-color: var(--kumo-sidebar);
  border: 1px solid var(--kumo-hairline);
  border-left: 4px solid var(--kumo-brand);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  box-shadow: var(--shadow-xs);
}

.callout-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--kumo-default);
}

.callout-text p {
  font-size: 13.5px;
  color: var(--kumo-subtle);
}

/* Buttons (Kumo UI Specification) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: inherit;
  user-select: none;
}

.btn-primary {
  background-color: var(--kumo-brand);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(243, 128, 32, 0.25);
}

.btn-primary:hover {
  background-color: var(--kumo-brand-hover);
  box-shadow: 0 3px 8px rgba(217, 107, 0, 0.3);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--kumo-default);
  border-color: var(--kumo-line);
}

.btn-secondary:hover {
  background-color: var(--kumo-hover);
  border-color: var(--kumo-subtle);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

/* Forms & Input Controls (Kumo Style) */
.form-container {
  background-color: var(--kumo-card);
  border: 1px solid var(--kumo-hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}

.form-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--kumo-hairline);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--kumo-default);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--kumo-default);
}

.form-label .required {
  color: #dc2626;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  background-color: #ffffff;
  border: 1px solid var(--kumo-line);
  border-radius: var(--radius-md);
  color: var(--kumo-default);
  transition: all 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--kumo-brand);
  box-shadow: 0 0 0 3px var(--kumo-focus);
}

/* Resident Autocomplete Component */
.autocomplete-wrapper {
  position: relative;
}

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--kumo-subtle);
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 36px;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid var(--kumo-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.autocomplete-dropdown.active {
  display: block;
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--kumo-hairline);
  transition: background-color 0.15s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: var(--kumo-hover);
}

.autocomplete-item .item-name {
  font-weight: 600;
  color: var(--kumo-default);
}

.autocomplete-item .item-sub {
  font-size: 11.5px;
  color: var(--kumo-subtle);
  margin-top: 2px;
}

/* Selected Resident Summary Card */
.resident-summary-card {
  background-color: var(--kumo-brand-tint);
  border: 1px solid rgba(243, 128, 32, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  display: none;
}

.resident-summary-card.active {
  display: block;
}

.resident-summary-card h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--kumo-brand);
  margin-bottom: 10px;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.identity-field .label {
  font-size: 11px;
  color: var(--kumo-subtle);
  text-transform: uppercase;
  font-weight: 600;
}

.identity-field .val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--kumo-default);
}

/* Dynamic Grid Inputs */
.dynamic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* Placeholder Guide Reference */
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.placeholder-card {
  background-color: var(--kumo-canvas);
  border: 1px solid var(--kumo-hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.placeholder-card:hover {
  background-color: #ffffff;
  border-color: var(--kumo-brand);
  box-shadow: var(--shadow-xs);
}

.placeholder-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--kumo-brand);
  background-color: var(--kumo-brand-tint);
  border: 1px solid rgba(243, 128, 32, 0.2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 6px;
}

.placeholder-desc {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--kumo-default);
}

.placeholder-sample {
  font-size: 11px;
  color: var(--kumo-subtle);
  margin-top: 2px;
}

/* Data Tables (Kumo Style) */
.table-wrapper {
  background-color: var(--kumo-card);
  border: 1px solid var(--kumo-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.table-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--kumo-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background-color: #ffffff;
}

.notion-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.notion-table th {
  background-color: var(--kumo-canvas);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--kumo-subtle);
  border-bottom: 1px solid var(--kumo-hairline);
}

.notion-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--kumo-hairline);
  color: var(--kumo-default);
  vertical-align: middle;
}

.notion-table tbody tr:last-child td {
  border-bottom: none;
}

.notion-table tbody tr:hover {
  background-color: var(--kumo-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 12px;
  border: 1px solid var(--kumo-hairline);
  background-color: var(--kumo-canvas);
  color: var(--kumo-default);
  line-height: 1.2;
}

.badge-success {
  background-color: #ECFDF5;
  color: #065F46;
  border-color: #A7F3D0;
}

.badge-code {
  font-family: var(--font-mono);
  background-color: #F3F4F6;
}

/* Modal Overlay & Dialog Cards (Kumo UI) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--kumo-card);
  border: 1px solid var(--kumo-hairline);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-card-form {
  max-width: 580px;
  height: auto;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--kumo-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--kumo-sidebar);
}

.modal-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--kumo-default);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

.modal-title .icon-svg {
  color: var(--kumo-brand);
}

.modal-close {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  color: var(--kumo-subtle);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--kumo-default);
  background-color: var(--kumo-hover);
  border-color: var(--kumo-hairline);
}

.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  background-color: var(--kumo-card);
}

#modal-success .modal-body {
  padding: 0;
  height: 72vh;
  background-color: #525659;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--kumo-hairline);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--kumo-sidebar);
}

/* Kumo Callout Box in Modals */
.modal-callout {
  background-color: var(--kumo-brand-tint);
  border: 1px solid rgba(243, 128, 32, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 14px;
}

.modal-callout-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--kumo-brand);
  margin-bottom: 4px;
}

.modal-callout-preview {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--kumo-default);
  background-color: #ffffff;
  border: 1px solid rgba(243, 128, 32, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: inline-block;
  margin-top: 4px;
}

/* Empty State */
.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--kumo-subtle);
  font-size: 13.5px;
}

/* Mobile Top Header & Mobile Bottom Navbar (Kumo Mobile UI) */
.mobile-top-header {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
    padding-bottom: 76px; /* Spacing so content is never covered by bottom navbar */
  }

  .sidebar {
    display: none !important; /* Hide desktop sidebar on mobile */
  }

  .mobile-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background-color: var(--kumo-sidebar);
    border-bottom: 1px solid var(--kumo-hairline);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-xs);
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--kumo-hairline);
    z-index: 999;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--kumo-subtle);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
  }

  .mobile-nav-item.active {
    color: var(--kumo-brand);
    font-weight: 600;
  }

  .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 28%;
    right: 28%;
    height: 3px;
    background-color: var(--kumo-brand);
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
  }

  .mobile-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-label {
    font-size: 10.5px;
    font-weight: 500;
  }

  .main-content {
    padding: 20px 16px 80px 16px;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .callout-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-card {
    max-height: 94vh;
    border-radius: var(--radius-md);
  }

  /* Compact Kumo Mobile Cards for Tables */
  .table-wrapper {
    background-color: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  .table-toolbar {
    background-color: var(--kumo-card);
    border: 1px solid var(--kumo-hairline);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-xs);
  }

  .notion-table {
    display: block;
    width: 100%;
  }

  .notion-table thead {
    display: none; /* Hide traditional table header on mobile */
  }

  .notion-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .notion-table tbody tr {
    display: flex;
    flex-direction: column;
    background-color: var(--kumo-card);
    border: 1px solid var(--kumo-hairline);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    gap: 6px;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
  }

  .notion-table tbody tr:hover {
    border-color: var(--kumo-line);
    box-shadow: var(--shadow-sm);
    background-color: var(--kumo-card);
  }

  .notion-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px dashed var(--kumo-hairline);
    font-size: 13px;
    word-break: break-word;
  }

  .notion-table tbody td[data-label]:before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kumo-subtle);
    margin-right: 12px;
    flex-shrink: 0;
  }

  .notion-table tbody td:last-child {
    border-bottom: none;
    padding-top: 10px;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }

  .notion-table tbody td button {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Fullscreen Login Overlay (Kumo Ultra Premium Theme - Root / Universal for Desktop & Mobile) */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #0F172A;
  background-image: 
    radial-gradient(at 10% 20%, rgba(243, 128, 32, 0.22) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(243, 128, 32, 0.15) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.85) 0px, #0F172A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.login-card {
  background-color: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  width: 100%;
  max-width: 430px;
  padding: 36px 32px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(243, 128, 32, 0.3);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-overlay.active .login-card {
  transform: scale(1);
}

.login-header {
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-badge-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--kumo-brand);
  background-color: var(--kumo-brand-tint);
  border: 1px solid rgba(243, 128, 32, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.login-logo {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #F38020 0%, #E06C05 100%);
  color: #ffffff;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(243, 128, 32, 0.45);
}

.login-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--kumo-default);
  margin-bottom: 4px;
  letter-spacing: -0.4px;
}

.login-header p {
  font-size: 13px;
  color: var(--kumo-subtle);
  font-weight: 500;
}

/* Input with Left SVG Icon */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  color: var(--kumo-subtle);
  pointer-events: none;
}

.form-control.with-icon {
  padding-left: 38px;
}

.btn-login-action {
  width: 100%;
  justify-content: center;
  margin-top: 20px;
  padding: 12px;
  font-size: 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(243, 128, 32, 0.35);
  transition: all 0.2s ease;
}

.btn-login-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(243, 128, 32, 0.45);
}

/* Quick Fill Demo Chips */
.login-quick-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--kumo-line);
  text-align: left;
}

.quick-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--kumo-subtle);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-pills {
  display: flex;
  gap: 10px;
}

.quick-chip {
  flex: 1;
  background-color: var(--kumo-canvas);
  border: 1px solid var(--kumo-line);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-chip:hover {
  background-color: #ffffff;
  border-color: var(--kumo-brand);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1.5px);
}

.chip-role {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chip-admin {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.chip-op {
  background-color: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.chip-user {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--kumo-default);
}

/* Modal Overlay & Modal Cards (Kumo UI Large Preview) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--kumo-hairline);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 1000px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-card-form {
  max-width: 640px;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--kumo-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--kumo-subtle);
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--kumo-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--kumo-subtle);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background-color: var(--kumo-line);
  color: var(--kumo-heading);
}

.modal-body {
  padding: 16px 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--kumo-hairline);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--kumo-subtle);
}

/* PDF Preview Frame - Ultra Large & Crisp */
#pdf-iframe {
  width: 100%;
  height: 76vh;
  min-height: 600px;
  border: 1px solid var(--kumo-line);
  border-radius: var(--radius-lg);
  background-color: #525659;
}
