/* ==========================================================================
   FARHAH Enterprise UI DNA Baseline
   Designed for clarity, focus, operational calmness and speed.
   Zero runtime Node.js requirement.
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #eef2ff;
  --color-success: #10b981;
  --color-success-light: #ecfdf5;
  --color-success-text: #065f46;
  --color-danger: #ef4444;
  --color-danger-light: #fef2f2;
  --color-danger-text: #991b1b;
  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;
  --color-warning-text: #92400e;
  --color-info: #0ea5e9;
  --color-info-light: #f0f9ff;
  --color-info-text: #075985;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

.sidebar {
  width: 256px;
  background-color: #0b1329;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
  border-right: 1px solid #1e293b;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
  transition: padding 0.22s ease;
}

.sidebar-brand-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.sidebar-brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: 100%;
}

.sidebar-brand:hover {
  text-decoration: none;
  color: #ffffff;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease;
}

.sidebar-brand:hover .sidebar-brand-icon {
  transform: scale(1.05);
}

.sidebar-brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 18px;
  color: #ffffff;
}

.sidebar-brand-badge {
  font-size: 10px;
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #93c5fd;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.sidebar-tagline {
  display: none;
}

.sidebar-nav {
  padding: 14px 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}

.sidebar-section-header {
  padding: 14px 14px 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
  overflow: visible;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 6px;
  line-height: 1.4;
}

.sidebar-section-header span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sidebar-divider {
  height: 1px;
  background: #1e293b;
  margin: 6px 8px;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  text-decoration: none;
}

.nav-item.active {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.nav-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.nav-item:hover .nav-icon-wrap {
  color: #ffffff;
}

.nav-item.active .nav-icon-wrap {
  color: #ffffff;
}

.nav-text {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid #1e293b;
  background-color: rgba(11, 19, 41, 0.5);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer-toggle-btn {
  background: transparent;
  border: 1px solid #1e293b;
  border-radius: 6px;
  color: #64748b;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  width: 100%;
  transition: all 0.15s ease;
}

.sidebar-footer-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  border-color: #334155;
}

.sidebar-footer-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #475569;
}

.sidebar-version-pill {
  font-size: 10px;
  font-weight: 700;
  background: #1e293b;
  color: #94a3b8;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Topbar Toggle Button */
.sidebar-toggle-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle-btn:hover {
  background-color: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sidebar-toggle-btn svg,
.sidebar-footer-toggle-btn svg {
  pointer-events: none;
}

.sidebar-toggle-btn .toggle-icon {
  transition: transform 0.22s ease;
}

/* When expanded, flip topbar toggle arrow inward */
.app-shell:not(.sidebar-toggled) .sidebar-toggle-btn .toggle-icon {
  transform: scaleX(-1);
}

/* -------------------------------------------------------------
   Default Toggled (Collapsed / Compact) Sidebar Mode - Enterprise Grade
   ------------------------------------------------------------- */
.app-shell.sidebar-toggled .sidebar {
  width: 68px;
  background-color: #03192f;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-shell.sidebar-toggled .sidebar-header {
  height: 64px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-shell.sidebar-toggled .sidebar-brand-wrapper {
  justify-content: center;
  width: 100%;
}

.app-shell.sidebar-toggled .sidebar-brand {
  justify-content: center;
  padding: 0;
  width: auto;
}

.app-shell.sidebar-toggled .sidebar-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.app-shell.sidebar-toggled .sidebar-brand-text,
.app-shell.sidebar-toggled .sidebar-tagline,
.app-shell.sidebar-toggled .sidebar-footer-full,
.app-shell.sidebar-toggled .footer-toggle-text {
  display: none !important;
}

.app-shell.sidebar-toggled .sidebar-section-header {
  display: none !important;
}

.app-shell.sidebar-toggled .sidebar-nav {
  padding: 14px 0 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.app-shell.sidebar-toggled .sidebar-nav::-webkit-scrollbar {
  display: none;
  width: 0;
}

.app-shell.sidebar-toggled .sidebar-divider {
  display: block;
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px auto;
  flex-shrink: 0;
}

/* Reference-Matching Squircle Tile: 48px width, 44px height, 13px radius */
.app-shell.sidebar-toggled .nav-item {
  width: 48px;
  height: 44px;
  min-width: 48px;
  min-height: 44px;
  max-width: 48px;
  max-height: 44px;
  flex-shrink: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border-radius: 13px;
  color: #94a3b8;
  background: transparent;
  border: none;
  transition: all 0.16s ease;
  position: relative;
}

.app-shell.sidebar-toggled .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

.app-shell.sidebar-toggled .nav-item .nav-icon-wrap {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.app-shell.sidebar-toggled .nav-item:hover .nav-icon-wrap {
  color: #ffffff;
}

.app-shell.sidebar-toggled .nav-item.active {
  background: #2563eb;
  border-radius: 13px;
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
  transform: none;
}

.app-shell.sidebar-toggled .nav-item.active .nav-icon-wrap {
  color: #ffffff;
}

.app-shell.sidebar-toggled .nav-item.active::before {
  display: none !important;
  content: none !important;
}

.app-shell.sidebar-toggled .nav-text {
  display: none !important;
}

.app-shell.sidebar-toggled .sidebar-footer {
  padding: 12px 0 10px 0;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-shell.sidebar-toggled .sidebar-footer-toggle-btn {
  width: 44px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  transition: all 0.2s ease;
}

.app-shell.sidebar-toggled .sidebar-footer-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.app-shell.sidebar-toggled .footer-toggle-icon {
  transform: rotate(180deg);
}

.app-shell.sidebar-toggled .sidebar-footer-copy {
  justify-content: center;
  width: 100%;
}

/* -------------------------------------------------------------
   Global High-Grade Enterprise Floating Tooltip Popup
   ------------------------------------------------------------- */
.sidebar-tooltip-popup {
  position: fixed;
  z-index: 999999;
  background: #020617;
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.2px;
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.sidebar-tooltip-popup.show {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-tooltip-popup::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px 6px 5px 0;
  border-style: solid;
  border-color: transparent #334155 transparent transparent;
}

.sidebar-tooltip-popup::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 4px 5px 4px 0;
  border-style: solid;
  border-color: transparent #020617 transparent transparent;
}

/* User Explicitly Expanded Preference Override (Zero Layout Jump) */
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar {
  width: 256px !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-header {
  padding: 0 20px !important;
  justify-content: flex-start !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-brand {
  justify-content: flex-start !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-brand-text,
html.sidebar-user-expanded .app-shell.sidebar-toggled .nav-text,
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-section-header,
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-footer-full,
html.sidebar-user-expanded .app-shell.sidebar-toggled .footer-toggle-text {
  display: block !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-brand-text {
  display: flex !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-divider {
  width: auto !important;
  margin: 6px 8px !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .nav-item {
  width: auto !important;
  height: auto !important;
  padding: 8px 12px !important;
  justify-content: flex-start !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-footer-toggle-btn {
  width: 100% !important;
  height: auto !important;
  padding: 6px 10px !important;
  justify-content: flex-start !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .footer-toggle-icon {
  transform: none !important;
}
html.sidebar-user-expanded .app-shell.sidebar-toggled .sidebar-toggle-btn .toggle-icon {
  transform: scaleX(-1) !important;
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-container {
  padding: 28px;
  flex-grow: 1;
}

/* Flash Messages & Alerts */
.flash-alert,
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}
.flash-alert .alert-icon,
.alert .alert-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.flash-alert .alert-content,
.alert .alert-content {
  flex-grow: 1;
}
.flash-alert .alert-dismiss,
.alert .alert-dismiss {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  border-radius: 4px;
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: opacity 0.15s, background-color 0.15s;
}
.flash-alert .alert-dismiss:hover,
.alert .alert-dismiss:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.06);
}
.flash-success,
.alert-success {
  background-color: var(--color-success-light, #ecfdf5);
  color: var(--color-success-text, #065f46);
  border: 1px solid #a7f3d0;
}
.flash-error,
.flash-danger,
.alert-error,
.alert-danger {
  background-color: var(--color-danger-light, #fef2f2);
  color: var(--color-danger-text, #991b1b);
  border: 1px solid #fecaca;
}
.flash-warning,
.alert-warning {
  background-color: var(--color-warning-light, #fffbeb);
  color: var(--color-warning-text, #92400e);
  border: 1px solid #fde68a;
}
.flash-info,
.alert-info {
  background-color: var(--color-info-light, #f0f9ff);
  color: var(--color-info-text, #075985);
  border: 1px solid #bae6fd;
}

/* Cards */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

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

/* Forms */
.form-group {
  margin-bottom: 20px;
}

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

.form-input, .form-select, .form-textarea, .form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--color-text);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input, .form-select, .form-control {
  min-height: 42px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus, .form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background-color: #ffffff;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover {
  background-color: #f1f5f9;
  text-decoration: none;
}

/* ==========================================================================
   ENTERPRISE TABLES & RESPONSIVE DATA GRIDS
   ========================================================================== */
.table-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #ffffff;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Custom sleek webkit scrollbar for touch & mouse users */
.table-container::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
.table-container::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 0 0 10px 10px;
}
.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Seamless integration when placed directly inside cards with padding: 0 */
.card > .table-container,
.card-flush .table-container,
.card-table .table-container {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.table {
  width: 100%;
  min-width: 680px; /* Ensures columns never get squished or awkwardly wrap on mobile */
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1e293b;
  text-align: left;
}

/* Compact variant for sidebars or dense tables */
.table-sm {
  min-width: 480px;
  font-size: 12.5px;
}
.table-sm th {
  padding: 9px 12px;
}
.table-sm td {
  padding: 10px 12px;
}

.table thead th {
  padding: 13px 18px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  background: #f8fafc;
  border-top: none;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
}

.table tbody tr {
  transition: background-color 0.15s ease;
}

.table tbody td {
  padding: 14px 18px;
  border-top: none;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

/* Row Hover Highlights */
.table tbody tr:hover td {
  background-color: #f8fafc;
}

/* Zebra Striping */
.table-striped tbody tr:nth-child(even) td {
  background-color: #fafbfc;
}
.table-striped tbody tr:hover td {
  background-color: #f1f5f9;
}

/* Remove bottom border on final row to avoid double border with container */
.table tbody tr:last-child td {
  border-bottom: none;
}

/* Actions Column & Buttons */
.table th.text-right,
.table td.text-right,
.table-actions {
  text-align: right;
  white-space: nowrap;
}

.table .btn,
.table .btn-secondary,
.table .btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
}

/* Column Utilities */
.table-cell-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
}
.table-cell-bold {
  font-weight: 700;
  color: #0f172a;
}
.table-cell-subtext {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* Empty State inside table card */
.table-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}
.table-empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  line-height: 1;
}
.table-empty-state .empty-title {
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
}
.table-empty-state .empty-desc {
  font-size: 13px;
  color: #64748b;
  max-width: 420px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}

/* Standard Enterprise Table Card & Filter Bar */
.card-table {
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  background: #ffffff;
}

.filter-bar {
  padding: 16px 20px;
  margin-bottom: 20px;
}

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fafbfc;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

.table-pagination-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Mobile-Friendly Adjustments */
@media (max-width: 768px) {
  .table thead th {
    padding: 10px 14px;
    font-size: 11px;
  }
  .table tbody td {
    padding: 12px 14px;
    font-size: 13px;
  }
  .table-container {
    border-radius: 8px;
    margin-left: -4px;
    margin-right: -4px;
    width: calc(100% + 8px);
  }
}

/* ==========================================================================
   ENTERPRISE STATUS BADGES
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 9999px;
  white-space: nowrap;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.badge-success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-warning {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-info,
.badge-secondary {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-primary,
.badge-indigo {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-terminated {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-cancelled {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background-color: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 2px;
}
.lang-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.lang-btn.active {
  background-color: #ffffff;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   ENTERPRISE FOOTER & MALAYSIA LOVE BADGE
   ========================================================================== */
.app-footer {
  margin-top: auto;
  padding: 18px 28px;
  border-top: 1px solid var(--color-border, #e2e8f0);
  background-color: #ffffff;
  font-size: 12.5px;
  color: #64748b;
  z-index: 10;
}

.app-footer-inner,
.client-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12.5px;
}

.footer-left strong {
  color: #0f172a;
  font-weight: 700;
}

.footer-dot {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1.35;
}

.footer-badge:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.footer-flag {
  font-size: 13px;
  line-height: 1;
}

.footer-heart {
  display: inline-block;
  color: #ef4444;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer-badge:hover .footer-heart {
  transform: scale(1.35);
}

/* Client Portal Specific Footer */
.client-footer {
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 22px 24px;
  color: #64748b;
  font-size: 12.5px;
}

.client-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .app-footer {
    padding: 16px;
  }
  .app-footer-inner,
  .client-footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 10px;
  }
  .footer-left,
  .footer-right {
    justify-content: center;
    width: 100%;
  }
}

/* ==========================================================================
   PRINT STYLES - Clean, Frame-Free Document Printing
   ========================================================================== */
@media print {
  /* Hide all Web UI Chrome, navigation, sidebars, headers, footers & action buttons */
  .sidebar,
  .topbar,
  .app-footer,
  .client-header,
  .client-footer,
  .no-print,
  .btn,
  button,
  form:not(.print-keep),
  .sidebar-footer,
  .sidebar-section-header,
  .sidebar-divider,
  .flash-alert,
  .flash-message,
  .flash-container,
  .alert,
  #creditNotice {
    display: none !important;
  }

  /* Page Setup: Standard A4 Portrait with clean margins */
  @page {
    size: A4 portrait;
    margin: 12mm 15mm 15mm 15mm;
  }

  /* Reset document and canvas backgrounds */
  html, body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: auto !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .app-shell {
    display: block !important;
    min-height: auto !important;
    height: auto !important;
  }

  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    display: block !important;
    min-height: auto !important;
  }

  .page-container,
  .content-body,
  .client-body {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
  }

  /* Grid Layout collapse to single column */
  .invoice-grid,
  .print-full-width {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Printable Invoice Document Container */
  #printableInvoice,
  .printable-invoice {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .card#printableInvoice,
  .card.printable-invoice {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  /* Table styling for clean print */
  .table-container {
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
  }

  table.table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  table.table th,
  table.table td {
    padding: 8px 10px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
  }

  table.table th {
    background-color: #f8fafc !important;
    font-weight: 700 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Status Badges in print */
  .badge {
    border: 1px solid currentColor !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .badge-success {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
  }

  .badge-warning {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border-color: #fcd34d !important;
  }

  .badge-danger {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #fca5a5 !important;
  }

  .badge-neutral {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
  }

  /* Clean up links */
  a {
    text-decoration: none !important;
    color: inherit !important;
  }

  a[href]::after {
    content: "" !important;
  }

  /* Prevent awkward page breaks */
  #printableInvoice tr,
  #printableInvoice .table-container,
  #printableInvoice > div {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* ==========================================================================
   HAMS WHOIS BADGE DNA
   ========================================================================== */
.whois-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: #2563eb;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  vertical-align: middle;
  margin-left: 6px;
  font-family: inherit;
  white-space: nowrap;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.whois-badge:hover {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
  transform: translateY(-0.5px);
}
.whois-badge svg {
  flex-shrink: 0;
}

/* =========================================================================
   Topbar Power Search (WHMCS-style Omnisearch - DNA HAMS)
   ========================================================================= */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 40%;
  overflow: hidden;
}

.topbar-center {
  flex: 1 1 480px;
  max-width: 480px;
  min-width: 200px;
  margin: 0 18px;
  position: relative;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-left: auto;
}

.topbar-power-search {
  position: relative;
  width: 100%;
}

.topbar-search-form {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.topbar-search-input {
  width: 100%;
  height: 38px;
  padding: 0 68px 0 36px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  font-family: inherit;
}

.topbar-search-input:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.topbar-search-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.topbar-search-input::placeholder {
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 400;
}

.search-icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease;
  z-index: 2;
}

.topbar-search-form:focus-within .search-icon-left {
  color: #2563eb;
}

.search-action-wrap {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.search-kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 22px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

.search-clear-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.search-clear-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* Results Dropdown */
.power-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 520px;
  max-width: 600px;
  max-height: 500px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.15), 0 10px 15px -5px rgba(15, 23, 42, 0.04);
  z-index: 1050;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.power-search-dropdown.is-open {
  display: flex;
}

.search-dropdown-header {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.search-dropdown-header .search-count-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

.search-dropdown-scroll {
  max-height: 400px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-group {
  border-bottom: 1px solid #f1f5f9;
}

.search-group:last-child {
  border-bottom: none;
}

.search-group-title {
  padding: 8px 16px 5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f8fafc;
  transition: all 0.1s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.search-result-item:hover,
.search-result-item.is-focused {
  background-color: #f0f7ff;
  border-left-color: #2563eb;
}

.search-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-item-icon.type-client { background: #eff6ff; color: #2563eb; }
.search-item-icon.type-service { background: #ecfdf5; color: #059669; }
.search-item-icon.type-domain { background: #f0fdf4; color: #16a34a; }
.search-item-icon.type-invoice { background: #fef3c7; color: #d97706; }
.search-item-icon.type-ticket { background: #f5f3ff; color: #7c3aed; }

.search-item-body {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.search-item-sub {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.search-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.search-badge-active,
.search-badge-paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.search-badge-pending,
.search-badge-unpaid {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.search-badge-suspended,
.search-badge-overdue {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.search-badge-terminated {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.search-badge-cancelled,
.search-badge-closed,
.search-badge-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.search-dropdown-footer {
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #64748b;
}

.search-dropdown-footer kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  color: #475569;
}

.search-empty-state {
  padding: 32px 20px;
  text-align: center;
  color: #64748b;
}

.search-empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: #94a3b8;
}

.search-loading-state {
  padding: 24px 20px;
  text-align: center;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
}

/* =========================================================================
   Universal Searchable Combobox Component (Enterprise Select)
   ========================================================================= */
.searchable-select-wrapper {
  position: relative;
  width: 100%;
  font-family: inherit;
  box-sizing: border-box;
}

.searchable-select-trigger {
  width: 100%;
  min-height: 42px;
  padding: 6px 12px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  text-align: left;
}

.searchable-select-trigger:hover {
  border-color: #94a3b8;
}

.searchable-select-wrapper.is-open .searchable-select-trigger,
.searchable-select-trigger:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.searchable-select-wrapper.has-error .searchable-select-trigger {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.searchable-select-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.searchable-select-icon {
  color: #64748b;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.searchable-select-text {
  font-size: 13.5px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.searchable-select-placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.searchable-select-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.searchable-select-clear {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: #94a3b8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  line-height: 1;
}

.searchable-select-clear:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.searchable-select-arrow {
  color: #94a3b8;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}

.searchable-select-wrapper.is-open .searchable-select-arrow {
  transform: rotate(180deg);
  color: #2563eb;
}

.searchable-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  z-index: 1050;
  display: none;
  box-sizing: border-box;
  overflow: hidden;
}

.searchable-select-wrapper.is-open .searchable-select-dropdown {
  display: block;
}

.searchable-select-search-box {
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  display: flex;
  align-items: center;
}

.searchable-select-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.searchable-select-search-input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.searchable-select-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.searchable-select-search-input::placeholder {
  color: #94a3b8;
  font-size: 12.5px;
}

.searchable-select-options {
  max-height: 270px;
  overflow-y: auto;
  padding: 4px 0;
  list-style: none;
  margin: 0;
  overscroll-behavior: contain;
}

.searchable-select-option {
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #1e293b;
  transition: background-color 0.1s ease;
  border-left: 3px solid transparent;
}

.searchable-select-option:hover,
.searchable-select-option.is-highlighted {
  background-color: #f1f5f9;
  border-left-color: #94a3b8;
}

.searchable-select-option.is-selected {
  background-color: #eff6ff;
  border-left-color: #2563eb;
  font-weight: 600;
  color: #1d4ed8;
}

.searchable-select-option-main {
  min-width: 0;
  flex: 1;
}

.searchable-select-option-title {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchable-select-option-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchable-select-option-badge {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.searchable-select-check {
  color: #2563eb;
  flex-shrink: 0;
}

.searchable-select-empty {
  padding: 20px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
}

.searchable-select-loading {
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.searchable-select-footer {
  padding: 6px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* HAMS Enterprise Interactive Button Loading State */
.btn.hams-btn-loading, button.hams-btn-loading, input[type="submit"].hams-btn-loading {
  position: relative !important;
  pointer-events: none !important;
  opacity: 0.82 !important;
  cursor: wait !important;
  padding-right: 36px !important;
}

.btn.hams-btn-loading::after, button.hams-btn-loading::after {
  content: '' !important;
  position: absolute !important;
  right: 12px !important;
  top: calc(50% - 7px) !important;
  width: 14px !important;
  height: 14px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-top-color: currentColor !important;
  border-radius: 50% !important;
  animation: hamsBtnSpin 0.65s linear infinite !important;
}

@keyframes hamsBtnSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* HAMS Sidebar & Menu Nav Item Loading Indicator */
.nav-item.nav-item-loading, .sidebar-nav a.nav-item-loading {
  position: relative !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
}

.nav-item.nav-item-loading::after, .sidebar-nav a.nav-item-loading::after {
  content: '' !important;
  position: absolute !important;
  right: 12px !important;
  top: calc(50% - 4px) !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #38bdf8 !important;
  box-shadow: 0 0 10px #38bdf8 !important;
  animation: hamsNavBlink 0.8s infinite !important;
}

@keyframes hamsNavBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.65); }
}

