/* ============================================
   Custom Panel Theme
   ============================================ */

:root{
  --c-primary:#6366F1;--c-primary-hover:#4F46E5;--c-primary-light:rgba(99,102,241,.08);
  --c-primary-glow:rgba(99,102,241,.15);
  --c-bg:#F8FAFC;--c-surface:#FFFFFF;--c-surface-hover:#F1F5F9;
  --c-border:#E2E8F0;--c-border-light:#F1F5F9;
  --c-text:#0F172A;--c-text-secondary:#64748B;--c-text-muted:#94A3B8;
  --c-success:#10B981;--c-warning:#F59E0B;--c-error:#EF4444;
  --c-radius:16px;--c-radius-md:10px;--c-radius-sm:8px;--c-radius-xs:6px;
  --c-shadow:0 1px 2px rgba(0,0,0,.04),0 1px 3px rgba(0,0,0,.06);
  --c-shadow-md:0 2px 8px rgba(0,0,0,.06),0 4px 16px rgba(0,0,0,.04);
  --c-shadow-lg:0 8px 24px rgba(0,0,0,.08),0 2px 8px rgba(0,0,0,.04);
  --c-font:'Inter',system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  --c-mono:'JetBrains Mono','SF Mono',monospace;
}
body,html{
  font-family:var(--c-font)!important;-webkit-font-smoothing:antialiased;
  background:var(--c-bg)!important;color:var(--c-text)!important;
  font-size:14px!important;line-height:1.6!important;letter-spacing:-.01em;
}
::selection{background:var(--c-primary-light);color:var(--c-primary)}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--c-border);border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:var(--c-text-muted)}

/* --- App Shell --- */
.fullscreen-app{background:var(--c-bg)!important}
.ant-layout,.ant-layout-content{background:var(--c-bg)!important}
.ant-layout-sider{background:var(--c-surface)!important;border-right:1px solid var(--c-border)!important;box-shadow:none!important}

/* --- Header --- */
.ant-layout-header,.ant-page-header{
  background:var(--c-surface)!important;border-bottom:1px solid var(--c-border)!important;
  box-shadow:none!important;backdrop-filter:blur(12px);
}

/* --- Cards --- */
.ant-card{
  background:var(--c-surface)!important;border:1px solid var(--c-border)!important;
  border-radius:var(--c-radius)!important;box-shadow:none!important;
  transition:border-color .2s,box-shadow .2s!important;
}
.ant-card:hover{border-color:var(--c-primary)!important;box-shadow:0 0 0 1px var(--c-primary-glow)!important}
.ant-card-head{border-bottom:1px solid var(--c-border-light)!important;padding:16px 20px!important;min-height:unset!important}
.ant-card-head-title{font-weight:600!important;font-size:15px!important}
.ant-card-body{padding:20px!important}

/* --- Buttons --- */
.ant-btn{
  border-radius:999px!important;font-weight:500!important;font-size:13px!important;
  box-shadow:none!important;transition:all .2s ease!important;
}
.ant-btn-primary{background:var(--c-primary)!important;border-color:var(--c-primary)!important;color:#fff!important}
.ant-btn-primary:hover{background:var(--c-primary-hover)!important;border-color:var(--c-primary-hover)!important}
.ant-btn-default{border-color:var(--c-border)!important;color:var(--c-text)!important;background:var(--c-surface)!important}
.ant-btn-default:hover{border-color:var(--c-primary)!important;color:var(--c-primary)!important;background:var(--c-primary-light)!important}
.ant-btn-link{color:var(--c-primary)!important}
.ant-btn-text{border:none!important;color:var(--c-text-secondary)!important}
.ant-btn-text:hover{background:var(--c-surface-hover)!important;color:var(--c-text)!important}
.ant-btn-dangerous{background:var(--c-error)!important;border-color:var(--c-error)!important}
.ant-btn-icon-only{
  border-radius:var(--c-radius-sm)!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
}
.ant-btn-group{display:inline-flex!important;align-items:stretch!important}
.ant-btn-group>.ant-btn{border-radius:0!important}
.ant-btn-group>.ant-btn:first-child{border-radius:var(--c-radius-sm) 0 0 var(--c-radius-sm)!important}
.ant-btn-group>.ant-btn:last-child{border-radius:0 var(--c-radius-sm) var(--c-radius-sm) 0!important}
.ant-btn-group>.ant-btn:only-child{border-radius:var(--c-radius-sm)!important}

/* --- Tables --- */
.ant-table{border-radius:var(--c-radius)!important;overflow:hidden!important;border:1px solid var(--c-border)!important}
.ant-table-container{border:none!important}
.ant-table-thead>tr>th{
  background:var(--c-bg)!important;font-weight:600!important;font-size:12px!important;
  text-transform:uppercase!important;letter-spacing:.04em!important;color:var(--c-text-secondary)!important;
  border-bottom:1px solid var(--c-border)!important;padding:10px 16px!important;
}
.ant-table-tbody>tr>td{padding:10px 16px!important;border-bottom:1px solid var(--c-border-light)!important;font-size:13px!important}
.ant-table-tbody>tr:nth-child(even)>td{background:var(--c-bg)!important}
.ant-table-tbody>tr:hover>td{background:var(--c-primary-light)!important}
.ant-table-tbody>tr:last-child>td{border-bottom:none!important}

/* --- Inputs: only touch radius/border, leave background to Ant Design tokens
   (otherwise portal-rendered modals stay light in dark mode) --- */
.ant-input,.ant-input-number,.ant-picker,.ant-select-selector{
  border-radius:var(--c-radius-sm)!important;font-size:13px!important;
}
.ant-input-affix-wrapper{border-radius:var(--c-radius-sm)!important}
.ant-input:focus,.ant-input-focused,.ant-input-number-focused,.ant-input-affix-wrapper-focused,.ant-select-focused .ant-select-selector{
  box-shadow:0 0 0 3px var(--c-primary-glow)!important;
}
.ant-input-group-addon{border-radius:var(--c-radius-sm) 0 0 var(--c-radius-sm)!important}
textarea.ant-input{border-radius:var(--c-radius-sm)!important}

/* --- Select dropdown --- */
.ant-select-dropdown{border-radius:var(--c-radius-md)!important;box-shadow:var(--c-shadow-lg)!important;padding:4px!important}
.ant-select-item{border-radius:var(--c-radius-xs)!important;font-size:13px!important}
.ant-select-item-option-selected{background:var(--c-primary-light)!important;color:var(--c-primary)!important;font-weight:500!important}
.ant-select-item-option-active{background:var(--c-surface-hover)!important}

/* --- Tags --- */
.ant-tag{
  border-radius:999px!important;font-size:12px!important;font-weight:500!important;
  padding:2px 10px!important;border:none!important;background:var(--c-bg)!important;color:var(--c-text-secondary)!important;
}
.ant-tag-blue,.ant-tag-processing{background:rgba(99,102,241,.1)!important;color:var(--c-primary)!important}
.ant-tag-green,.ant-tag-success{background:rgba(16,185,129,.1)!important;color:var(--c-success)!important}
.ant-tag-red,.ant-tag-error{background:rgba(239,68,68,.1)!important;color:var(--c-error)!important}
.ant-tag-orange,.ant-tag-warning{background:rgba(245,158,11,.1)!important;color:var(--c-warning)!important}
.ant-tag-checkable-checked{background:var(--c-primary)!important;color:#fff!important}

/* --- Switch --- */
.ant-switch{border-radius:999px!important}
.ant-switch-checked{background:var(--c-primary)!important}

/* --- Modal --- */
.ant-modal-content{border-radius:var(--c-radius)!important;box-shadow:var(--c-shadow-lg)!important;overflow:hidden}
.ant-modal-header{padding:20px 24px!important}
.ant-modal-title{font-weight:600!important;font-size:16px!important}
.ant-modal-body{padding:24px!important}
.ant-modal-footer{padding:12px 24px!important}
.ant-modal-mask{backdrop-filter:blur(4px)!important;background:rgba(15,23,42,.4)!important}

/* --- Drawer --- */
.ant-drawer-content{border-radius:var(--c-radius) 0 0 var(--c-radius)!important}
.ant-drawer-mask{backdrop-filter:blur(4px)!important}

/* --- Tabs --- */
.ant-tabs-tab{font-weight:500!important;font-size:13px!important;color:var(--c-text-secondary)!important;padding:8px 4px!important}
.ant-tabs-tab-active .ant-tabs-tab-btn{color:var(--c-primary)!important;font-weight:600!important}
.ant-tabs-ink-bar{background:var(--c-primary)!important;border-radius:2px!important;height:3px!important}

/* --- Menu --- */
.ant-menu{background:transparent!important;border:none!important}
.ant-menu-item,.ant-menu-submenu-title{border-radius:var(--c-radius-sm)!important;margin:2px 8px!important;font-size:13px!important;font-weight:500!important;height:36px!important;line-height:36px!important}
.ant-menu-item-selected{background:var(--c-primary-light)!important;color:var(--c-primary)!important}
.ant-menu-item:hover{background:var(--c-surface-hover)!important}

/* --- Dropdown --- */
.ant-dropdown{z-index:99999!important}
.ant-dropdown .ant-dropdown-menu{
  border-radius:var(--c-radius-md)!important;box-shadow:var(--c-shadow-lg)!important;padding:4px!important;
}
.ant-dropdown .ant-dropdown-menu-item{border-radius:var(--c-radius-xs)!important;font-size:13px!important}

/* --- Notifications / Messages --- */
.ant-message-notice-content{border-radius:var(--c-radius-md)!important;box-shadow:var(--c-shadow-lg)!important;font-size:13px!important}
.ant-notification-notice{border-radius:var(--c-radius)!important;box-shadow:var(--c-shadow-lg)!important}

/* --- Tooltip / Popover --- */
.ant-tooltip-inner{border-radius:var(--c-radius-sm)!important;font-size:12px!important;padding:6px 12px!important}
.ant-popover-inner{border-radius:var(--c-radius-md)!important;box-shadow:var(--c-shadow-lg)!important}

/* --- Progress --- */
.ant-progress-inner{border-radius:999px!important}
.ant-progress-bg{border-radius:999px!important;background:var(--c-primary)!important}
.ant-progress-success-bg{background:var(--c-success)!important}

/* --- Form --- */
.ant-form-item-label>label{font-weight:500!important;font-size:13px!important;color:var(--c-text-secondary)!important}
.ant-form-item-explain-error{font-size:12px!important}

/* --- Breadcrumb --- */
.ant-breadcrumb{font-size:13px!important}
.ant-breadcrumb a{color:var(--c-text-secondary)!important}
.ant-breadcrumb a:hover{color:var(--c-primary)!important}

/* --- Pro Table --- */
.ant-pro-table .ant-pro-card{background:transparent!important;padding:0!important}
.ant-pro-table-search{border-radius:var(--c-radius)!important;background:var(--c-surface)!important;border:1px solid var(--c-border)!important;margin-bottom:16px!important}
.ant-pro-table-list-toolbar{padding:12px 0!important}
.ant-pro-table-list-toolbar-title{font-weight:600!important;font-size:15px!important}

/* --- Segmented --- */
.ant-segmented{background:var(--c-bg)!important;border-radius:var(--c-radius-sm)!important;padding:2px!important}
.ant-segmented-item{border-radius:var(--c-radius-xs)!important}
.ant-segmented-item-selected{background:var(--c-surface)!important;box-shadow:var(--c-shadow)!important}

/* --- Badge --- */
.ant-badge-count{border-radius:999px!important;font-size:11px!important}

/* --- Alert --- */
.ant-alert{border-radius:var(--c-radius-md)!important}

/* --- Collapse --- */
.ant-collapse{border-radius:var(--c-radius)!important;border:1px solid var(--c-border)!important}
.ant-collapse-item:last-child{border-radius:0 0 var(--c-radius) var(--c-radius)!important}

/* --- Misc --- */
.app-settings-flex-line{gap:8px!important}
.dq-1{font-weight:600!important;font-size:14px!important}
.ant-typography h4,.ant-typography h3{font-weight:600!important}
.ant-empty-description{color:var(--c-text-muted)!important}
.ant-pagination-item-active{border-color:var(--c-primary)!important}
.ant-pagination-item-active a{color:var(--c-primary)!important}
.ant-checkbox-checked .ant-checkbox-inner{background:var(--c-primary)!important;border-color:var(--c-primary)!important}
.ant-radio-checked .ant-radio-inner{border-color:var(--c-primary)!important}
.ant-radio-inner::after{background:var(--c-primary)!important}
.ant-layout-header h2{font-size:16px!important;font-weight:600!important;color:var(--c-text)!important}
.ant-space-compact.ant-dropdown-button>.ant-btn{border-radius:0!important}
.ant-space-compact.ant-dropdown-button>.ant-btn:first-child{border-radius:var(--c-radius-sm) 0 0 var(--c-radius-sm)!important}
.ant-space-compact.ant-dropdown-button>.ant-btn:last-child{border-radius:0 var(--c-radius-sm) var(--c-radius-sm) 0!important}
.ant-space-compact.ant-dropdown-button{overflow:visible!important}
.ant-dropdown,.ant-dropdown *,.ant-dropdown-trigger,.ant-dropdown-menu{transition-duration:unset!important}

/* --- Transparent Theme: Frosted Glass --- */
.my-theme-trans .ant-card{backdrop-filter:blur(24px) saturate(180%)!important;-webkit-backdrop-filter:blur(24px) saturate(180%)!important;background:rgba(255,255,255,.65)!important;border-color:rgba(255,255,255,.3)!important}
.my-theme-trans .ant-table{backdrop-filter:blur(20px) saturate(160%)!important;background:rgba(255,255,255,.6)!important;border-color:rgba(255,255,255,.3)!important}
.my-theme-trans .ant-layout-sider{backdrop-filter:blur(24px)!important;background:rgba(255,255,255,.55)!important}
.my-theme-trans .ant-layout-header{backdrop-filter:blur(20px) saturate(180%)!important;background:rgba(255,255,255,.72)!important}

/* ============================================
   DARK THEME
   NOTE: class is also mirrored to <html> by a
   MutationObserver in index.html, so rules
   below reach React portals (modals, dropdowns).
   ============================================ */
.my-theme-dark{
  --c-bg:#0B0F1A;--c-surface:#111827;--c-surface-hover:#1E293B;
  --c-border:#1E293B;--c-border-light:#1E293B;
  --c-text:#F1F5F9;--c-text-secondary:#94A3B8;--c-text-muted:#475569;
  --c-primary-light:rgba(99,102,241,.15);--c-primary-glow:rgba(99,102,241,.2);
  --c-shadow:0 1px 2px rgba(0,0,0,.2),0 1px 3px rgba(0,0,0,.3);
  --c-shadow-md:0 2px 8px rgba(0,0,0,.3),0 4px 16px rgba(0,0,0,.2);
  --c-shadow-lg:0 8px 24px rgba(0,0,0,.4),0 2px 8px rgba(0,0,0,.2);
}
.my-theme-dark body{background:var(--c-bg)!important;color:var(--c-text)!important}
.my-theme-dark .ant-card{background:var(--c-surface)!important;border-color:var(--c-border)!important}
.my-theme-dark .ant-card-head{border-bottom-color:var(--c-border)!important}
.my-theme-dark .ant-table-thead>tr>th{background:#0F172A!important;color:var(--c-text-secondary)!important;border-bottom-color:var(--c-border)!important}
.my-theme-dark .ant-table-tbody>tr>td{color:var(--c-text)!important;border-bottom-color:var(--c-border)!important}
.my-theme-dark .ant-table-tbody>tr:nth-child(even)>td{background:rgba(15,23,42,.5)!important}
.my-theme-dark .ant-table-tbody>tr:hover>td{background:var(--c-primary-light)!important}
/* Inputs / selects / date-pickers / affix wrappers — all dark */
.my-theme-dark .ant-input,
.my-theme-dark .ant-input-number,
.my-theme-dark .ant-input-number-input,
.my-theme-dark .ant-input-affix-wrapper,
.my-theme-dark .ant-input-group-addon,
.my-theme-dark .ant-picker,
.my-theme-dark .ant-select-selector,
.my-theme-dark textarea.ant-input{
  background:var(--c-surface)!important;border-color:var(--c-border)!important;color:var(--c-text)!important;
}
.my-theme-dark .ant-input::placeholder,
.my-theme-dark .ant-input-number-input::placeholder,
.my-theme-dark textarea.ant-input::placeholder,
.my-theme-dark .ant-select-selection-placeholder{
  color:var(--c-text-muted)!important;
}
.my-theme-dark .ant-select-selection-item{color:var(--c-text)!important}
.my-theme-dark .ant-picker-input>input{color:var(--c-text)!important}
.my-theme-dark .ant-picker-input>input::placeholder{color:var(--c-text-muted)!important}
/* Modals / drawers / dropdowns / popovers — portal-rendered, need html-scoped rule */
.my-theme-dark .ant-modal-content,
.my-theme-dark .ant-drawer-content{
  background:var(--c-surface)!important;border:1px solid var(--c-border)!important;color:var(--c-text)!important;
}
.my-theme-dark .ant-modal-header,
.my-theme-dark .ant-drawer-header{background:transparent!important;border-bottom:1px solid var(--c-border)!important}
.my-theme-dark .ant-modal-title,
.my-theme-dark .ant-drawer-title{color:var(--c-text)!important}
.my-theme-dark .ant-modal-body,
.my-theme-dark .ant-drawer-body{color:var(--c-text)!important}
.my-theme-dark .ant-modal-footer{border-top:1px solid var(--c-border)!important}
.my-theme-dark .ant-modal-close{color:var(--c-text-secondary)!important}
.my-theme-dark .ant-modal-close:hover{color:var(--c-text)!important}
.my-theme-dark .ant-dropdown-menu{background:var(--c-surface)!important;border:1px solid var(--c-border)!important}
.my-theme-dark .ant-dropdown-menu-item{color:var(--c-text)!important}
.my-theme-dark .ant-dropdown-menu-item:hover{background:var(--c-surface-hover)!important}
.my-theme-dark .ant-select-dropdown{background:var(--c-surface)!important;border:1px solid var(--c-border)!important}
.my-theme-dark .ant-select-item{color:var(--c-text)!important}
.my-theme-dark .ant-select-item-option-active{background:var(--c-surface-hover)!important}
.my-theme-dark .ant-popover-inner{background:var(--c-surface)!important;color:var(--c-text)!important;border:1px solid var(--c-border)!important}
.my-theme-dark .ant-popover-inner-content{color:var(--c-text)!important}
.my-theme-dark .ant-tooltip-inner{background:#1E293B!important;color:var(--c-text)!important}
/* Form labels inside modals */
.my-theme-dark .ant-form-item-label>label{color:var(--c-text)!important}
/* Default buttons inside modals */
.my-theme-dark .ant-btn-default{background:var(--c-surface)!important;border-color:var(--c-border)!important;color:var(--c-text)!important}
.my-theme-dark .ant-btn-default:hover{background:var(--c-surface-hover)!important;color:var(--c-primary)!important;border-color:var(--c-primary)!important}
.my-theme-dark .ant-btn-text{color:var(--c-text-secondary)!important}
.my-theme-dark .ant-btn-text:hover{background:var(--c-surface-hover)!important;color:var(--c-text)!important}
/* Collapse panels inside modals */
.my-theme-dark .ant-collapse{background:transparent!important;border-color:var(--c-border)!important}
.my-theme-dark .ant-collapse-header{color:var(--c-text)!important}
.my-theme-dark .ant-collapse-content{background:transparent!important;border-top-color:var(--c-border)!important;color:var(--c-text)!important}
/* Menu */
.my-theme-dark .ant-menu-item{color:var(--c-text-secondary)!important}
.my-theme-dark .ant-menu-item-selected{background:var(--c-primary-light)!important;color:var(--c-primary)!important}
.my-theme-dark .ant-menu-item:hover{background:var(--c-surface-hover)!important;color:var(--c-text)!important}
/* Layout */
.my-theme-dark .ant-layout,.my-theme-dark .ant-layout-content,.my-theme-dark .fullscreen-app{background:var(--c-bg)!important}
.my-theme-dark .ant-layout-sider{background:var(--c-surface)!important;border-color:var(--c-border)!important}
.my-theme-dark .ant-layout-header{background:var(--c-surface)!important;border-color:var(--c-border)!important}
/* Tags in dark */
.my-theme-dark .ant-tag{background:rgba(148,163,184,.1)!important;color:var(--c-text-secondary)!important}
.my-theme-dark .ant-tag-blue,.my-theme-dark .ant-tag-processing{background:rgba(99,102,241,.18)!important;color:#A5B4FC!important}
.my-theme-dark .ant-tag-green,.my-theme-dark .ant-tag-success{background:rgba(16,185,129,.18)!important;color:#6EE7B7!important}
.my-theme-dark .ant-tag-red,.my-theme-dark .ant-tag-error{background:rgba(239,68,68,.18)!important;color:#FCA5A5!important}
.my-theme-dark .ant-tag-orange,.my-theme-dark .ant-tag-warning{background:rgba(245,158,11,.18)!important;color:#FCD34D!important}
/* Segmented */
.my-theme-dark .ant-segmented{background:#0F172A!important}
.my-theme-dark .ant-segmented-item-selected{background:var(--c-surface)!important}
/* Scrollbar */
.my-theme-dark ::-webkit-scrollbar-thumb{background:#334155}
.my-theme-dark ::-webkit-scrollbar-thumb:hover{background:#475569}

/* Transparent + Dark */
.my-theme-trans.my-theme-dark .ant-card{background:rgba(17,24,39,.65)!important;border-color:rgba(255,255,255,.06)!important}
.my-theme-trans.my-theme-dark .ant-table{background:rgba(17,24,39,.6)!important;border-color:rgba(255,255,255,.06)!important}
.my-theme-trans.my-theme-dark .ant-layout-sider{background:rgba(17,24,39,.55)!important}
.my-theme-trans.my-theme-dark .ant-layout-header{background:rgba(11,15,26,.78)!important}


/* ============================================
   LOGIN — Minimal engineer panel (v3, 2026-05-05)
   Drops aurora/gradients in favour of a quiet
   white card on a near-white surface, navy
   submit, accent-only on focus.
   ============================================ */

div[style*="padding-top: 15vh"],
div[style*="padding-top:15vh"]{
  /* override v2 mesh */
  background:#F7F8FA!important;
  animation:none!important;
  font-family:'Inter Tight','Inter',system-ui,-apple-system,BlinkMacSystemFont,sans-serif!important;
  color:#0F172A!important;
  overflow:hidden!important;
  isolation:auto!important;
}
/* kill the v2 aurora ::before + dot ::after */
div[style*="padding-top: 15vh"]::before,
div[style*="padding-top:15vh"]::before,
div[style*="padding-top: 15vh"]::after,
div[style*="padding-top:15vh"]::after{
  content:none!important; background:none!important; animation:none!important;
}

/* form column — kill the gradient brand square + tagline I added */
div[style*="padding-top: 15vh"]>*:first-child::before,
div[style*="padding-top:15vh"]>*:first-child::before,
div[style*="padding-top: 15vh"]>*:first-child::after,
div[style*="padding-top:15vh"]>*:first-child::after{
  content:none!important; background:none!important; box-shadow:none!important;
}
div[style*="padding-top: 15vh"]>*:first-child,
div[style*="padding-top:15vh"]>*:first-child{
  width:100%!important; max-width:420px!important; padding:0 24px!important;
  animation:none!important;
}

/* Card — flat white, 1px line, soft drop shadow */
div[style*="padding-top: 15vh"] .ant-card,
div[style*="padding-top:15vh"] .ant-card{
  background:#FFFFFF!important;
  backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
  border:1px solid rgba(15,23,42,.08)!important;
  border-radius:14px!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 30px 80px -30px rgba(15,23,42,.18)!important;
  overflow:visible!important;
}
/* kill the gradient frame line */
div[style*="padding-top: 15vh"] .ant-card::before,
div[style*="padding-top:15vh"] .ant-card::before{
  content:none!important; background:none!important;
}

/* Header */
div[style*="padding-top: 15vh"] .ant-card-head,
div[style*="padding-top:15vh"] .ant-card-head{
  border-bottom:none!important; background:transparent!important;
  padding:32px 32px 0!important; min-height:auto!important;
}
div[style*="padding-top: 15vh"] .ant-card-head-title,
div[style*="padding-top:15vh"] .ant-card-head-title{
  background:none!important; -webkit-background-clip:initial!important;
  background-clip:initial!important; -webkit-text-fill-color:initial!important;
  color:#0F172A!important;
  font-family:'Inter Tight','Inter',system-ui,sans-serif!important;
  font-size:24px!important; font-weight:500!important;
  letter-spacing:-.025em!important;
}
div[style*="padding-top: 15vh"] .ant-card-body,
div[style*="padding-top:15vh"] .ant-card-body{padding:20px 32px 32px!important}

/* Inputs — clean, 1px line, accent ring on focus */
div[style*="padding-top: 15vh"] .ant-input,
div[style*="padding-top: 15vh"] .ant-input-affix-wrapper,
div[style*="padding-top:15vh"] .ant-input,
div[style*="padding-top:15vh"] .ant-input-affix-wrapper{
  background:#FFFFFF!important;
  border:1px solid rgba(15,23,42,.12)!important;
  border-radius:10px!important;
  height:48px!important; font-size:14px!important;
  color:#0F172A!important; box-shadow:none!important;
  transition:border-color .18s ease, box-shadow .18s ease!important;
}
div[style*="padding-top: 15vh"] .ant-input::placeholder,
div[style*="padding-top:15vh"] .ant-input::placeholder{color:rgba(15,23,42,.38)!important}
div[style*="padding-top: 15vh"] .ant-input-affix-wrapper:hover,
div[style*="padding-top:15vh"] .ant-input-affix-wrapper:hover{
  border-color:rgba(15,23,42,.20)!important; background:#FFFFFF!important;
}
div[style*="padding-top: 15vh"] .ant-input-affix-wrapper:focus-within,
div[style*="padding-top:15vh"] .ant-input-affix-wrapper:focus-within{
  background:#FFFFFF!important;
  border-color:#5B7FB8!important;
  box-shadow:0 0 0 3px rgba(91,127,184,.18)!important;
}
div[style*="padding-top: 15vh"] .ant-input-prefix,
div[style*="padding-top:15vh"] .ant-input-prefix,
div[style*="padding-top: 15vh"] .ant-input-suffix,
div[style*="padding-top:15vh"] .ant-input-suffix{color:rgba(15,23,42,.38)!important}

/* Submit — solid navy, white text */
div[style*="padding-top: 15vh"] .ant-btn-primary,
div[style*="padding-top:15vh"] .ant-btn-primary{
  background:#0F172A!important;
  background-size:auto!important;
  border:none!important;
  border-radius:10px!important;
  height:48px!important; width:100%!important;
  font-size:14px!important; font-weight:500!important; color:#fff!important;
  letter-spacing:-.005em!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12)!important;
  transition:transform .12s ease, background-color .15s ease!important;
}
div[style*="padding-top: 15vh"] .ant-btn-primary:hover,
div[style*="padding-top:15vh"] .ant-btn-primary:hover{
  background:#1E293B!important; transform:none!important;
  background-position:initial!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12)!important;
}
div[style*="padding-top: 15vh"] .ant-btn-primary:active,
div[style*="padding-top:15vh"] .ant-btn-primary:active{
  transform:translateY(.5px)!important;
}

/* Form spacing */
div[style*="padding-top: 15vh"] .ant-form-item,
div[style*="padding-top:15vh"] .ant-form-item{margin-bottom:14px!important}
div[style*="padding-top: 15vh"] .ant-form-item-label>label,
div[style*="padding-top:15vh"] .ant-form-item-label>label{
  font-family:'JetBrains Mono','SF Mono',ui-monospace,monospace!important;
  font-size:10.5px!important; font-weight:600!important;
  letter-spacing:.06em!important; text-transform:uppercase!important;
  color:rgba(15,23,42,.6)!important;
}

/* Links — subtle, accent + faint underline */
div[style*="padding-top: 15vh"] a,
div[style*="padding-top:15vh"] a{
  color:#5B7FB8!important; font-weight:500!important;
  border-bottom:1px solid rgba(91,127,184,.4)!important;
  text-decoration:none!important;
}
div[style*="padding-top: 15vh"] a:hover,
div[style*="padding-top:15vh"] a:hover{
  color:#3F5F94!important; border-bottom-color:rgba(91,127,184,.7)!important;
}

/* Invite addon — quiet */
div[style*="padding-top: 15vh"] .ant-input-group-addon,
div[style*="padding-top:15vh"] .ant-input-group-addon{
  background:rgba(15,23,42,.04)!important;
  border-color:rgba(15,23,42,.08)!important;
  color:rgba(15,23,42,.6)!important;
  border-radius:10px 0 0 10px!important;
  font-family:'JetBrains Mono',ui-monospace,monospace!important;
  font-size:12px!important;
}

/* ─────────────────────────  DARK (system-driven)  ─────────────────────────
   Auto-switch with the user's OS / browser preference.
   Independent of the panel's theme_policy class — login page only.
   ─────────────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark){
  div[style*="padding-top: 15vh"],
  div[style*="padding-top:15vh"]{
    background:#0B0D10!important; color:#E6E8EC!important;
  }
  div[style*="padding-top: 15vh"] .ant-card,
  div[style*="padding-top:15vh"] .ant-card{
    background:#13161B!important;
    border:1px solid rgba(255,255,255,.08)!important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.04),
      0 30px 80px -30px rgba(0,0,0,.6)!important;
  }
  div[style*="padding-top: 15vh"] .ant-card-head-title,
  div[style*="padding-top:15vh"] .ant-card-head-title{ color:#E6E8EC!important }
  div[style*="padding-top: 15vh"] .ant-input,
  div[style*="padding-top: 15vh"] .ant-input-affix-wrapper,
  div[style*="padding-top:15vh"] .ant-input,
  div[style*="padding-top:15vh"] .ant-input-affix-wrapper{
    background:#13161B!important;
    border:1px solid rgba(255,255,255,.10)!important;
    color:#E6E8EC!important;
  }
  div[style*="padding-top: 15vh"] .ant-input::placeholder,
  div[style*="padding-top:15vh"] .ant-input::placeholder{color:rgba(230,232,236,.38)!important}
  div[style*="padding-top: 15vh"] .ant-input-affix-wrapper:hover,
  div[style*="padding-top:15vh"] .ant-input-affix-wrapper:hover{
    border-color:rgba(255,255,255,.16)!important; background:#13161B!important;
  }
  div[style*="padding-top: 15vh"] .ant-input-affix-wrapper:focus-within,
  div[style*="padding-top:15vh"] .ant-input-affix-wrapper:focus-within{
    background:#13161B!important;
    border-color:#7C9BD1!important;
    box-shadow:0 0 0 3px rgba(124,155,209,.18)!important;
  }
  div[style*="padding-top: 15vh"] .ant-btn-primary,
  div[style*="padding-top:15vh"] .ant-btn-primary{
    background:#E6E8EC!important; color:#0B0D10!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.5)!important;
  }
  div[style*="padding-top: 15vh"] .ant-btn-primary:hover,
  div[style*="padding-top:15vh"] .ant-btn-primary:hover{ background:#FFFFFF!important }
  div[style*="padding-top: 15vh"] a,
  div[style*="padding-top:15vh"] a{
    color:#7C9BD1!important; border-bottom-color:rgba(124,155,209,.4)!important;
  }
  div[style*="padding-top: 15vh"] a:hover,
  div[style*="padding-top:15vh"] a:hover{ color:#A4BCDD!important }
  div[style*="padding-top: 15vh"] .ant-form-item-label>label,
  div[style*="padding-top:15vh"] .ant-form-item-label>label{ color:rgba(230,232,236,.62)!important }
  div[style*="padding-top: 15vh"] .ant-input-prefix,
  div[style*="padding-top:15vh"] .ant-input-prefix,
  div[style*="padding-top: 15vh"] .ant-input-suffix,
  div[style*="padding-top:15vh"] .ant-input-suffix{ color:rgba(230,232,236,.38)!important }
  div[style*="padding-top: 15vh"] .ant-input-group-addon,
  div[style*="padding-top:15vh"] .ant-input-group-addon{
    background:rgba(255,255,255,.04)!important;
    border-color:rgba(255,255,255,.08)!important;
    color:rgba(230,232,236,.6)!important;
  }
}

/* ============================================
   Mode-aware typography fix (2026-05-07)
   Antd 5 css-in-js doesn't switch back when the panel toggles
   .my-theme-dark off — we have to force the colors.
   ============================================ */

/* ───── LIGHT MODE — text on white must be DARK ───── */
.fullscreen-app:not(.my-theme-dark){ color:#0F172A !important; }
.fullscreen-app:not(.my-theme-dark) body,
.fullscreen-app:not(.my-theme-dark) .ant-app,
.fullscreen-app:not(.my-theme-dark) .ant-layout,
.fullscreen-app:not(.my-theme-dark) .ant-layout-content{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-typography,
.fullscreen-app:not(.my-theme-dark) .ant-typography h1,
.fullscreen-app:not(.my-theme-dark) .ant-typography h2,
.fullscreen-app:not(.my-theme-dark) .ant-typography h3,
.fullscreen-app:not(.my-theme-dark) .ant-typography h4,
.fullscreen-app:not(.my-theme-dark) .ant-typography h5,
.fullscreen-app:not(.my-theme-dark) .ant-typography p,
.fullscreen-app:not(.my-theme-dark) .ant-typography span,
.fullscreen-app:not(.my-theme-dark) .ant-typography div{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-card,
.fullscreen-app:not(.my-theme-dark) .ant-card-body,
.fullscreen-app:not(.my-theme-dark) .ant-card-head{ color:#0F172A !important; }
.fullscreen-app:not(.my-theme-dark) .ant-card-head-title{ color:#0F172A !important; font-weight:600 !important; }

.fullscreen-app:not(.my-theme-dark) .ant-statistic{ color:#0F172A !important; }
.fullscreen-app:not(.my-theme-dark) .ant-statistic-title{ color:rgba(15,23,42,.55) !important; }
.fullscreen-app:not(.my-theme-dark) .ant-statistic-content,
.fullscreen-app:not(.my-theme-dark) .ant-statistic-content-value,
.fullscreen-app:not(.my-theme-dark) .ant-statistic-content-prefix,
.fullscreen-app:not(.my-theme-dark) .ant-statistic-content-suffix{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-form-item-label>label{ color:rgba(15,23,42,.7) !important; }

.fullscreen-app:not(.my-theme-dark) .ant-table-thead>tr>th{ color:rgba(15,23,42,.6) !important; }
.fullscreen-app:not(.my-theme-dark) .ant-table-tbody>tr>td{ color:#0F172A !important; }
.fullscreen-app:not(.my-theme-dark) .ant-table-cell{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-descriptions-item-label{ color:rgba(15,23,42,.6) !important; }
.fullscreen-app:not(.my-theme-dark) .ant-descriptions-item-content{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-tabs-tab-btn,
.fullscreen-app:not(.my-theme-dark) .ant-tabs-tab{ color:rgba(15,23,42,.7) !important; }
.fullscreen-app:not(.my-theme-dark) .ant-tabs-tab-active .ant-tabs-tab-btn{ color:var(--c-primary) !important; }

.fullscreen-app:not(.my-theme-dark) .ant-menu-item,
.fullscreen-app:not(.my-theme-dark) .ant-menu-item-selected,
.fullscreen-app:not(.my-theme-dark) .ant-menu-submenu-title{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-modal-content,
.fullscreen-app:not(.my-theme-dark) .ant-modal-title,
.fullscreen-app:not(.my-theme-dark) .ant-modal-body,
.fullscreen-app:not(.my-theme-dark) .ant-drawer-content,
.fullscreen-app:not(.my-theme-dark) .ant-drawer-title,
.fullscreen-app:not(.my-theme-dark) .ant-drawer-body{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-empty-description,
.fullscreen-app:not(.my-theme-dark) .ant-empty-normal{ color:rgba(15,23,42,.5) !important; }

.fullscreen-app:not(.my-theme-dark) .ant-list-item,
.fullscreen-app:not(.my-theme-dark) .ant-list-item-meta-title,
.fullscreen-app:not(.my-theme-dark) .ant-list-item-meta-description{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-radio-wrapper,
.fullscreen-app:not(.my-theme-dark) .ant-checkbox-wrapper,
.fullscreen-app:not(.my-theme-dark) .ant-switch-inner-checked,
.fullscreen-app:not(.my-theme-dark) .ant-switch-inner-unchecked{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-divider-inner-text,
.fullscreen-app:not(.my-theme-dark) .ant-divider-horizontal{ color:rgba(15,23,42,.5) !important; }

.fullscreen-app:not(.my-theme-dark) .ant-popover-inner-content,
.fullscreen-app:not(.my-theme-dark) .ant-popover-title,
.fullscreen-app:not(.my-theme-dark) .ant-popover-message-title{ color:#0F172A !important; }

.fullscreen-app:not(.my-theme-dark) .ant-tooltip-inner{
  background:#1E293B !important; color:#F5F5F7 !important;
}

/* Light mode: kill the dark gradient bleed on charts containers */
.fullscreen-app:not(.my-theme-dark) .ant-card-body>div[style*="background:rgb(15"],
.fullscreen-app:not(.my-theme-dark) .ant-card-body>div[style*="background-color:rgb(15"],
.fullscreen-app:not(.my-theme-dark) .ant-card-body>div[style*="background:#0"],
.fullscreen-app:not(.my-theme-dark) .ant-card-body>div[style*="background-color:#0"]{
  background:transparent !important;
}

/* ───── DARK MODE — bump label readability ───── */
.my-theme-dark .ant-statistic-title,
.my-theme-dark .ant-card-head-title{ color:rgba(245,245,247,.85) !important; }
.my-theme-dark .ant-statistic-content,
.my-theme-dark .ant-statistic-content-value,
.my-theme-dark .ant-statistic-content-prefix,
.my-theme-dark .ant-statistic-content-suffix{ color:#F5F5F7 !important; }
.my-theme-dark .ant-typography{ color:rgba(245,245,247,.92) !important; }
.my-theme-dark .ant-card-body,
.my-theme-dark .ant-card-body *:not(.ant-tag):not(.ant-btn-primary){ color:rgba(245,245,247,.92) !important; }
.my-theme-dark .ant-form-item-label>label{ color:rgba(245,245,247,.7) !important; }
.my-theme-dark .ant-empty-description{ color:rgba(245,245,247,.5) !important; }
.my-theme-dark .ant-tabs-tab-btn{ color:rgba(245,245,247,.65) !important; }
.my-theme-dark .ant-tabs-tab-active .ant-tabs-tab-btn{ color:#A5B4FC !important; }

/* ============================================
   Mobile fixes (rules / probe / general)
   ============================================ */
@media (max-width:760px){
  /* Side-bar collapse on mobile — Antd already responds to <Sider breakpoint>
     but keep it tucked + give the content full width. */
  .fullscreen-app .ant-layout-sider:not(.ant-layout-sider-collapsed){
    position:fixed !important; left:0; top:0; bottom:0; z-index:1000;
    box-shadow:0 0 40px rgba(0,0,0,.4);
  }
  .fullscreen-app .ant-layout{ overflow-x:hidden; }
  .fullscreen-app .ant-layout-content{
    padding:12px !important;
  }
  .fullscreen-app .ant-card-body{ padding:14px !important; }

  /* Make all Antd tables horizontally scrollable on phones.
     The legacy panel did NOT pass scroll={{x: 'max-content'}} for some tables,
     so columns are clipped. Force a scroll wrapper. */
  .fullscreen-app .ant-table-wrapper{ overflow-x:auto !important; -webkit-overflow-scrolling:touch; }
  .fullscreen-app .ant-table{ min-width:max-content !important; }
  .fullscreen-app .ant-table-container{ overflow:visible !important; }

  /* Tag chips wrap nicely on mobile (the folder filter row) */
  .fullscreen-app .ant-tag{ margin-bottom:6px !important; }

  /* Top toolbar buttons should wrap on mobile */
  .fullscreen-app .ant-card-head{ padding:0 14px !important; }
  .fullscreen-app .ant-card-head-wrapper{ flex-wrap:wrap; gap:6px; padding:10px 0; }

  /* Page header: pack admin email + role icons tighter */
  .fullscreen-app .ant-layout-header{
    padding:0 12px !important; height:56px !important; line-height:56px !important;
  }

  /* Statistic groups: stack to single column when very narrow */
  .fullscreen-app .ant-row{ row-gap:10px !important; }
}

/* Tiny phones: charts that have hardcoded width sometimes break — let them shrink */
@media (max-width:420px){
  .fullscreen-app canvas{ max-width:100% !important; height:auto !important; }
  .fullscreen-app .ant-card-body>div[style*="height"]{ min-height:200px !important; }
}
