:root{
  --ai-bg: #0b0f1a;
  --ai-panel: rgba(255,255,255,0.06);
  --ai-panel2: rgba(255,255,255,0.08);
  --ai-border: rgba(255,255,255,0.10);
  --ai-text: rgba(255,255,255,0.92);
  --ai-muted: rgba(255,255,255,0.78);
  --ai-accent: #7c3aed;
  --ai-accent2: #06b6d4;
}

/* Smooth page transitions (soft fade on navigation)
   Enabled only when JS is running (html.js), so pages never stay invisible if JS fails. */
html.js body{
  opacity: 0;
  transition: opacity .22s ease;
}
html.js body.page-ready{ opacity: 1; }
html.js body.page-leave{ opacity: 0; }

/* Global AI font */
html, body{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: .005em;
  line-height: 1.55;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ai-brand, .ai-side-group, .ai-chip, .ai-topbar .badge, h1, h2, h3, h4, h5, h6{
  font-family: "Orbitron", Inter, system-ui, sans-serif;
}

button, input, select, textarea{
  font-family: inherit;
}

.ai-bg{
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(124,58,237,0.25), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(6,182,212,0.18), transparent 60%),
    linear-gradient(180deg, #070a12, var(--ai-bg));
  color: var(--ai-text);
}

.ai-topbar{
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: rgba(10,14,24,0.82);
  border-bottom: 1px solid var(--ai-border);
  backdrop-filter: blur(12px);
}

/* Mobile/tablet usability */
@media (max-width: 575.98px){
  .ai-topbar{ flex-wrap: wrap; gap: .5rem; padding: .65rem .75rem; }
  .ai-sub{ display:none; }
  .ai-brand-logo{ height:24px; }
  .ai-topbar form{ width:auto; }
}

/* Make long tables/forms usable on small screens */
.table-responsive{ border-radius: 16px; }

/* Respect iOS safe areas */
.ai-offcanvas .offcanvas-body{ padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
.toast-container{ padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

.ai-brand{ line-height: 1.2; display:flex; align-items:center; gap:.6rem; }
.ai-brand-logo{ height:28px; width:auto; display:block; filter: drop-shadow(0 2px 10px rgba(0,0,0,.35)); }
.ai-sub{
  display: inline-block;
  margin-left: .5rem;
  font-size: .75rem;
  color: var(--ai-muted);
  vertical-align: middle;
}

.ai-dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ai-accent), var(--ai-accent2));
  box-shadow: 0 0 18px rgba(124,58,237,0.6);
  display: inline-block;
}

.ai-sidebar{
  position: fixed;
  top: 54px;
  right: 0;
  width: 280px;
  bottom: 0;
  border-left: 1px solid var(--ai-border);
  background: rgba(10,14,24,0.62);
  backdrop-filter: blur(12px);
}

.ai-side-inner{
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: .25rem;
}

/* Keep the footer always visible and allow the menu to scroll on smaller screens */
.ai-side-scroll{
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: .25rem;
}

/* Tighter sidebar spacing for laptop-height viewports */
@media (max-height: 900px){
  .ai-side-inner{ padding: .75rem; }
  .ai-side-group{ margin: .55rem 0 .25rem; }
  .ai-side-link{ padding: .52rem .65rem; border-radius: 12px; }
}

.ai-side-group{
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ai-muted);
  margin: .75rem 0 .35rem;
}

.ai-side-link{
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .75rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ai-text);
  border: 1px solid transparent;
  background: transparent;
}
.ai-side-link i { opacity: .9; }
.ai-side-link:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
.ai-side-link.active{
  background: rgba(124,58,237,0.14);
  border-color: rgba(124,58,237,0.35);
}

.ai-side-footer{
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.ai-main{
  padding-right: 280px;
}

@media (max-width: 991.98px){
  .ai-main{ padding-right: 0; }
}

.ai-panel, .ai-card{
  background: var(--ai-panel);
  border: 1px solid var(--ai-border);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}

.ai-item{
  background: var(--ai-panel2);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
}

.ai-input{
  background: rgba(0,0,0,0.25) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  color: var(--ai-text) !important;
}

/* Better readability for <select> controls on dark UI */
select.ai-input{
  background-color: rgba(0,0,0,0.35) !important;
  color: rgba(255,255,255,0.92) !important;
}
select.ai-input option,
select.ai-input optgroup{
  background: rgba(10,10,18,0.98) !important;
  color: rgba(255,255,255,0.92) !important;
}
select.ai-input:disabled{
  opacity: 0.7;
}
.ai-input:focus{
  border-color: rgba(124,58,237,0.55) !important;
  box-shadow: 0 0 0 .2rem rgba(124,58,237,0.20) !important;
}

.ai-btn{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(135deg, var(--ai-accent), var(--ai-accent2));
}
.ai-btn:hover{
  filter: brightness(1.05);
}
.ai-btn-soft{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.ai-chip{
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-size: .85rem;
}

.ai-hr{
  border-color: rgba(255,255,255,0.12);
  opacity: 1;
}

.table-dark{
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,0.04);
  --bs-table-hover-bg: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.ai-modal{
  background: rgba(12,16,28,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  color: var(--ai-text);
}

.ai-offcanvas{
  background: rgba(12,16,28,0.92);
  color: var(--ai-text);
  border-left: 1px solid rgba(255,255,255,0.12);
}
.ai-toast{
  background: rgba(12,16,28,0.92);
  color: var(--ai-text);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
}
.ai-toast .toast-header{
  background: rgba(255,255,255,0.06);
  color: var(--ai-text);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

/* --- Readability & contrast improvements --- */
.text-muted{ color: var(--ai-muted) !important; }
.form-label{ color: rgba(255,255,255,0.88) !important; font-weight: 500; }
.small.text-muted{ color: rgba(255,255,255,0.78) !important; }
.ai-input::placeholder{ color: rgba(255,255,255,0.55) !important; }

/* Links on dark background */
a{ color: rgba(6,182,212,0.95); }
a:hover{ color: rgba(255,255,255,0.95); }

/* Make auth cards more legible */
.ai-auth-card{
  background: rgba(12,16,28,0.88) !important;
  border-color: rgba(255,255,255,0.14) !important;
}
.ai-auth-card .h4, .ai-auth-card h1, .ai-auth-card h2{ color: rgba(255,255,255,0.96); }

  .ai-login-copyright{ font-size: 11px; }
}

/* AI feeling: subtle glow + animated grid */
.ai-glow{ position: relative; overflow: hidden; }
.ai-glow::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.08), transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(255,255,255,0.06), transparent 45%),
              radial-gradient(circle at 50% 90%, rgba(255,255,255,0.05), transparent 55%);
  filter: blur(10px);
  opacity: 0.8;
  pointer-events:none;
}
.ai-glow::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.12;
  animation: aiGridMove 12s linear infinite;
  pointer-events:none;
  mix-blend-mode: screen;
}
@keyframes aiGridMove{
  from{ background-position: 0 0, 0 0; }
  to{ background-position: 160px 160px, 160px 160px; }
}

/* ElevenLabs quota badge */
.ai-badge-soft{backdrop-filter:blur(6px);box-shadow:0 0 14px rgba(0,255,255,.18);} 
.ai-badge-overdraw{color:#fff !important;font-weight:700;animation:aiBadgeOverdrawPulse 2.2s ease-in-out infinite;box-shadow:0 0 0 1px rgba(255,255,255,.18),0 0 12px rgba(220,53,69,.30),0 0 24px rgba(220,53,69,.18) !important;}
@keyframes aiBadgeOverdrawPulse{0%,100%{box-shadow:0 0 0 1px rgba(255,255,255,.18),0 0 12px rgba(220,53,69,.30),0 0 24px rgba(220,53,69,.18) !important;}50%{box-shadow:0 0 0 1px rgba(255,255,255,.22),0 0 18px rgba(220,53,69,.42),0 0 34px rgba(220,53,69,.24) !important;}}


/* Changelog modal enhancements */
.ai-changelog-item.ai-changelog-new{
  background: rgba(13,110,253,.08);
  border: 1px solid rgba(13,110,253,.18);
  border-radius: 12px;
  padding: 8px 10px;
}
.ai-changelog-item .ai-new-badge{
  vertical-align: middle;
}


/* Wish Studio API guide readability */
.wish-api-guide, .wish-api-guide * {
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.wish-api-guide .text-muted,
.wish-api-guide .small.text-muted,
.wish-api-guide .text-muted.small {
  color: rgba(255,255,255,.78) !important;
}
.wish-api-guide code {
  color: rgba(255,255,255,.92);
}
.wish-api-guide a {
  color: rgba(207,226,255,.95);
}

/* --- Modal readability (fix "glass" background) --- */
.modal-backdrop.show{
  opacity: .70;
}

.modal-content{
  background: rgba(10, 14, 30, 0.96) !important;
  border: 1px solid var(--ai-border) !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  backdrop-filter: none !important;
}

.modal-header, .modal-footer{
  border-color: rgba(255,255,255,0.10) !important;
}

.modal-title{
  color: rgba(255,255,255,0.95);
}

.modal-body{
  color: rgba(255,255,255,0.90);
}

.modal .form-control, .modal select, .modal textarea{
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.92) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}
.modal .form-control::placeholder, .modal textarea::placeholder{
  color: rgba(255,255,255,0.55);
}


/* Docs Markdown */
.md-body .md-h1,.md-body .md-h2,.md-body .md-h3,.md-body .md-h4,.md-body .md-h5,.md-body .md-h6{margin-top:1rem;margin-bottom:.5rem}
.md-body .md-p{margin-bottom:.75rem}
.md-body .md-code{background:rgba(0,0,0,.05);padding:.75rem;border-radius:.75rem;overflow:auto}
.md-body .md-inline-code{background:rgba(0,0,0,.08);padding:.1rem .35rem;border-radius:.35rem}
.md-body .md-ul,.md-body .md-ol{margin-bottom:.75rem;padding-left:1.25rem}



/* Docs: make documentation readable on dark theme */
.ai-docs .ai-card,
.ai-docs .card{
  background: #ffffff;
  color: #111111;
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}
.ai-docs .text-muted{ color: #5b616a !important; }
.ai-docs a{ color: #0b5ed7; }
.ai-docs .list-group-item{
  background: #ffffff;
  color: #111111;
  border-color: rgba(0,0,0,0.10);
}
.ai-docs .list-group-item.active{
  background: #0b5ed7;
  border-color: #0b5ed7;
  color: #ffffff;
}
.ai-docs .ai-markdown h1,
.ai-docs .ai-markdown h2,
.ai-docs .ai-markdown h3{ color: #0f172a; }
.ai-docs .ai-markdown p,
.ai-docs .ai-markdown li{ color: #111111; }
.ai-docs .ai-markdown code{
  background: rgba(0,0,0,0.06);
  padding: 0.1rem 0.25rem;
  border-radius: 6px;
}
.ai-docs .ai-markdown pre{
  background: #0b1220;
  color: #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  overflow: auto;
}
.ai-docs .ai-markdown pre code{
  background: transparent;
  padding: 0;
}



body, p, li, td, th, label, .form-text, .text-muted, .small, .btn, .form-control, .form-select, .input-group-text {
  font-weight: 450;
}

.text-muted,
.small,
.form-text,
.ai-readable-subtitle{
  color: rgba(255,255,255,0.84) !important;
}

.ai-panel p,
.ai-panel li,
.ai-panel .table,
.ai-panel .form-label,
.ai-panel .form-text,
.ai-panel .text-muted,
.ai-card p,
.ai-card li{
  line-height: 1.6;
}

.ai-panel .form-label,
.ai-card .form-label,
label{
  font-weight: 600;
  margin-bottom: .45rem;
}

.ai-input,
.form-control,
.form-select,
textarea{
  font-size: .98rem;
  line-height: 1.5;
}

.table > :not(caption) > * > *{
  padding: .8rem .85rem;
  vertical-align: middle;
}

.ai-health-stack > * + *{ margin-top: .85rem; }
.ai-health-card{
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 1rem;
}
.ai-health-card.ok{ border-color: rgba(34,197,94,0.35); box-shadow: inset 0 0 0 1px rgba(34,197,94,0.12); }
.ai-health-card.bad{ border-color: rgba(239,68,68,0.35); box-shadow: inset 0 0 0 1px rgba(239,68,68,0.10); }
.ai-health-card.warn{ border-color: rgba(245,158,11,0.35); box-shadow: inset 0 0 0 1px rgba(245,158,11,0.10); }
.ai-health-title{ font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.ai-health-meta{ font-size: .88rem; color: rgba(255,255,255,0.8); }
.ai-health-kv{ display: grid; grid-template-columns: 150px 1fr; gap: .35rem .85rem; }
.ai-health-kv .k{ color: rgba(255,255,255,0.72); }
.ai-health-kv .v{ color: rgba(255,255,255,0.96); word-break: break-word; }
.ai-status-dot{ width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.ai-status-dot.ok{ background: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,.6); }
.ai-status-dot.bad{ background: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,.6); }
.ai-status-dot.warn{ background: #f59e0b; box-shadow: 0 0 12px rgba(245,158,11,.6); }
.ai-pretty-code{
  white-space: pre-wrap;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: .9rem 1rem;
  font-size: .92rem;
  line-height: 1.55;
}
@media (max-width: 767.98px){
  html, body{ font-size: 15px; }
  .ai-health-kv{ grid-template-columns: 1fr; }
}

/* Dashboard redesign v1.35 */
.ai-dashboard-page{ color:#1f2a37; }
.ai-dashboard-page .text-muted{ color:#6b7280 !important; }
.ai-dash-hero{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  padding:2rem 2rem;
  color:#fff;
  background:linear-gradient(90deg,#0d1b3d 0%,#10244c 55%,#172c4f 100%);
  box-shadow:0 20px 48px rgba(13,27,61,.18);
}
.ai-dash-hero:after{
  content:"";
  position:absolute; inset:auto -80px -60px auto;
  width:320px; height:320px; pointer-events:none;
  background:radial-gradient(circle,rgba(255,180,0,.30) 0%,rgba(255,180,0,.08) 35%,rgba(255,180,0,0) 72%);
}
.ai-dash-kicker{ font-size:.82rem; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.72); margin-bottom:.35rem; }
.ai-dash-title{ font-size:2rem; font-weight:800; letter-spacing:-.02em; }
.ai-dash-lead{ max-width:760px; color:rgba(255,255,255,.84); font-size:1rem; line-height:1.65; }
.ai-dash-hero-aside{ display:flex; flex-wrap:wrap; gap:.75rem; justify-content:flex-end; align-items:flex-start; position:relative; z-index:1; }
.ai-dash-hero-badge{
  padding:.7rem 1rem; border-radius:999px; font-size:.92rem; font-weight:600;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); color:#fff;
  backdrop-filter: blur(6px);
}
.ai-dash-cta{ border-radius:14px; font-weight:700; padding:.8rem 1.15rem; }
.ai-dash-cta-secondary{ border-radius:14px; padding:.8rem 1.15rem; }
.ai-dash-card, .ai-dash-stat-card{
  background:#fff; border:1px solid #e5e7eb; border-radius:22px; padding:1.35rem 1.4rem;
  box-shadow:0 12px 32px rgba(15,23,42,.06);
}
.ai-dash-stat-card{ height:100%; }
.ai-dash-card-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; }
.ai-dash-section-title{ font-size:1.15rem; font-weight:800; color:#1f2a37; margin:0; }
.ai-dash-section-subtitle{ color:#7b8794; font-size:.92rem; margin-top:.2rem; }
.ai-dash-stat-top{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.ai-dash-stat-label{ font-size:.92rem; color:#7b8794; margin-bottom:.7rem; }
.ai-dash-stat-value{ font-size:2.1rem; line-height:1; font-weight:800; color:#14213d; letter-spacing:-.03em; }
.ai-dash-stat-note{ margin-top:.55rem; font-size:.9rem; font-weight:600; }
.ai-dash-stat-note.ok{ color:#059669; }
.ai-dash-stat-note.warn{ color:#d97706; }
.ai-dash-stat-note.bad{ color:#dc2626; }
.ai-dash-stat-icon{ width:44px; height:44px; display:flex; align-items:center; justify-content:center; border-radius:14px; background:#fff7e8; color:#f59e0b; font-size:1.1rem; }
.ai-dash-activity-list > * + *{ margin-top:.75rem; }
.ai-dash-activity-item{ display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:.9rem 0; border-bottom:1px solid #eef2f7; }
.ai-dash-activity-item:last-child{ border-bottom:none; }
.ai-dash-activity-main{ display:flex; gap:.9rem; min-width:0; }
.ai-dash-activity-icon{ width:42px; height:42px; border-radius:14px; background:#f3f4f6; display:flex; align-items:center; justify-content:center; color:#64748b; flex:0 0 auto; }
.ai-dash-activity-title{ font-weight:700; color:#1f2937; }
.ai-dash-activity-meta{ color:#64748b; font-size:.92rem; }
.ai-dash-activity-time{ color:#94a3b8; font-size:.9rem; white-space:nowrap; }
.ai-dash-week-wrap{ display:grid; gap:1rem; }
.ai-dash-week-chart{ display:grid; grid-template-columns:repeat(5,1fr); gap:.85rem; align-items:end; min-height:180px; }
.ai-dash-week-col{ text-align:center; }
.ai-dash-week-bar-wrap{ height:120px; display:flex; align-items:flex-end; justify-content:center; }
.ai-dash-week-bar{
  width:24px; border-radius:999px; background:linear-gradient(180deg,#fcd34d 0%, #f59e0b 100%);
  box-shadow: inset 0 8px 12px rgba(255,255,255,.35), 0 6px 16px rgba(245,158,11,.28);
  min-height:18px;
}
.ai-dash-week-label{ font-weight:700; color:#64748b; margin-top:.55rem; }
.ai-dash-week-value{ font-size:.82rem; color:#94a3b8; }
.ai-dash-legend{ display:grid; gap:.5rem; }
.ai-dash-legend-item{ display:flex; align-items:center; gap:.55rem; color:#475569; font-size:.92rem; }
.ai-dash-legend-dot{ width:8px; height:8px; border-radius:999px; display:inline-block; }
.ai-dash-legend-dot.ok{ background:#10b981; }
.ai-dash-legend-dot.warn{ background:#f59e0b; }
.ai-dash-legend-dot.bad{ background:#ef4444; }
.ai-dash-quicklink{
  display:flex; flex-direction:column; gap:.8rem; align-items:flex-start; justify-content:center;
  background:#fff; border:1px solid #e5e7eb; border-radius:20px; padding:1.1rem 1rem; text-decoration:none; color:#111827;
  box-shadow:0 10px 28px rgba(15,23,42,.05); height:100%; transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ai-dash-quicklink:hover{ transform:translateY(-2px); box-shadow:0 16px 34px rgba(15,23,42,.08); border-color:#d1d5db; color:#111827; }
.ai-dash-quickicon{ width:52px; height:52px; display:flex; align-items:center; justify-content:center; border-radius:16px; font-size:1.2rem; }
.ai-dash-quicktext{ font-weight:700; }
.ai-dashboard-page .ai-health-card{
  background:#fff; color:#1f2937; border:1px solid #e5e7eb; border-radius:18px; box-shadow:none;
}
.ai-dashboard-page .ai-health-card.ok{ border-color:rgba(16,185,129,.22); box-shadow:inset 0 0 0 1px rgba(16,185,129,.05); }
.ai-dashboard-page .ai-health-card.bad{ border-color:rgba(239,68,68,.22); box-shadow:inset 0 0 0 1px rgba(239,68,68,.05); }
.ai-dashboard-page .ai-health-card.warn{ border-color:rgba(245,158,11,.22); box-shadow:inset 0 0 0 1px rgba(245,158,11,.05); }
.ai-dashboard-page .ai-health-title{ color:#111827; }
.ai-dashboard-page .ai-health-meta{ color:#64748b; }
.ai-dashboard-page .ai-health-kv .k{ color:#6b7280; }
.ai-dashboard-page .ai-health-kv .v{ color:#111827; }
.ai-dashboard-page .ai-pretty-code{ background:#f8fafc; border-color:#e5e7eb; color:#334155; }
.ai-dashboard-page .badge.bg-danger{ background:#fee2e2 !important; color:#b91c1c !important; border:1px solid #fecaca; }
.ai-dashboard-page .badge.bg-success{ background:#dcfce7 !important; color:#166534 !important; border:1px solid #bbf7d0; }
.ai-dashboard-page .badge.bg-warning{ background:#fef3c7 !important; color:#92400e !important; border:1px solid #fde68a; }
@media (max-width: 991.98px){
  .ai-dash-hero{ padding:1.5rem; }
  .ai-dash-title{ font-size:1.6rem; }
  .ai-dash-hero-aside{ justify-content:flex-start; }
}
@media (max-width: 767.98px){
  .ai-dash-week-chart{ grid-template-columns:repeat(5, minmax(0,1fr)); gap:.55rem; }
  .ai-dash-stat-value{ font-size:1.75rem; }
  .ai-dash-card,.ai-dash-stat-card{ border-radius:18px; padding:1rem; }
  .ai-dash-activity-item{ flex-direction:column; }
}


/* =========================
   SDNS Desk login screen
   ========================= */
body.sdns-login-bg{
  min-height:100vh;
  background:
    linear-gradient(135deg, #0f4d88 0%, #0a67a8 28%, #1180bf 52%, #0b5c9d 74%, #083e73 100%);
  color:#ffffff;
  overflow:hidden;
}

body.sdns-login-bg::before,
body.sdns-login-bg::after{
  content:"";
  position:fixed;
  inset:-12%;
  pointer-events:none;
}

body.sdns-login-bg::before{
  background:
    linear-gradient(128deg, transparent 0 44%, rgba(255,255,255,0.07) 44% 46%, transparent 46% 100%),
    linear-gradient(128deg, transparent 0 56%, rgba(255,255,255,0.08) 56% 58%, transparent 58% 100%),
    linear-gradient(128deg, transparent 0 68%, rgba(255,255,255,0.05) 68% 70%, transparent 70% 100%);
  transform:translateX(10%) skewX(-12deg);
  opacity:.95;
}

body.sdns-login-bg::after{
  background:
    radial-gradient(circle at 78% 24%, rgba(255,255,255,0.12), transparent 26%),
    radial-gradient(circle at 22% 82%, rgba(255,255,255,0.10), transparent 24%);
  mix-blend-mode:screen;
  opacity:.8;
}

body.sdns-login-bg main{
  position:relative;
  z-index:1;
}

.sdns-login-screen{
  position:relative;
  width:min(100%, 520px);
  min-height:560px;
}

.sdns-login-brand{
  position:fixed;
  top:1.25rem;
  left:1.5rem;
  display:flex;
  align-items:center;
  gap:.6rem;
  font-size:.95rem;
  letter-spacing:.04em;
  color:rgba(255,255,255,.88);
  text-shadow:0 1px 1px rgba(0,0,0,.28);
}

.sdns-login-brand-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  box-shadow:0 0 14px rgba(255,255,255,.45);
}

.sdns-login-center{
  width:min(100%, 360px);
  margin:0 auto;
}

.sdns-login-userpic{
  width:112px;
  height:112px;
  margin:0 auto 1.35rem;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:radial-gradient(circle at 50% 38%, rgba(255,255,255,0.26), rgba(255,255,255,0.08) 64%, rgba(3,22,52,0.34) 100%);
  border:1px solid rgba(255,255,255,0.28);
  box-shadow:0 10px 26px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.16);
  overflow:hidden;
}

.sdns-login-avatar{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:none;
  padding:10px;
  filter:drop-shadow(0 4px 12px rgba(0,0,0,.24));
}

.sdns-login-userpic.has-avatar .sdns-login-avatar{ display:block; }
.sdns-login-userpic.has-avatar .sdns-login-avatar-fallback{ display:none; }

.sdns-login-avatar-fallback{
  font-size:3rem;
  color:rgba(255,255,255,0.96);
  text-shadow:0 1px 1px rgba(0,0,0,.28);
}

.sdns-login-heading h1{
  margin:0;
  font-size:2rem;
  font-weight:400;
  letter-spacing:.01em;
  text-shadow:0 1px 1px rgba(0,0,0,.22);
}

.sdns-login-heading p{
  margin:.4rem 0 1.6rem;
  color:rgba(255,255,255,.86);
  font-size:.98rem;
}

.sdns-login-form{
  display:flex;
  flex-direction:column;
  gap:.95rem;
}

.sdns-field .form-label{
  font-size:.86rem;
  color:rgba(255,255,255,.86);
  margin-bottom:.35rem;
}

.sdns-input{
  min-height:44px;
  border-radius:2px;
  border:1px solid rgba(0,0,0,.34);
  background:rgba(245,249,255,.97);
  color:#0f172a;
  box-shadow:inset 0 1px 1px rgba(255,255,255,.85), inset 0 -1px 0 rgba(0,0,0,.06);
}

.sdns-input:focus{
  background:#ffffff;
  border-color:#003f75;
  box-shadow:0 0 0 1px rgba(255,255,255,.46), 0 0 0 2px rgba(0,72,135,.55);
}

.sdns-input-static{
  background:rgba(223,235,247,.95);
  color:#163657;
  font-weight:600;
}

.sdns-login-button{
  margin-top:.35rem;
  min-height:42px;
  border-radius:3px;
  color:#ffffff;
  border:1px solid rgba(0,0,0,.42);
  background:linear-gradient(180deg, #2a8bdb 0%, #1d74bf 48%, #0f5f9f 52%, #0a578f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    inset 0 -1px 0 rgba(0,0,0,.18),
    0 2px 4px rgba(0,0,0,.18);
  text-shadow:0 -1px 0 rgba(0,0,0,.24);
}

.sdns-login-button:hover,
.sdns-login-button:focus{
  color:#fff;
  background:linear-gradient(180deg, #3597ea 0%, #2280cf 48%, #126aaf 52%, #0d5d98 100%);
}

.sdns-login-button:active{
  transform:translateY(1px);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.24), 0 1px 1px rgba(0,0,0,.16);
  background:linear-gradient(180deg, #0f5f9f 0%, #1d74bf 100%);
}

.sdns-login-alert{
  border-radius:4px;
}

.sdns-login-bottom-left{
  position:fixed;
  left:1.5rem;
  bottom:1.4rem;
  color:rgba(255,255,255,.96);
  text-shadow:0 1px 1px rgba(0,0,0,.28);
}

.sdns-login-clock{
  font-size:2.5rem;
  line-height:1;
  font-weight:300;
}

.sdns-login-date{
  margin-top:.35rem;
  font-size:.95rem;
  color:rgba(255,255,255,.88);
}

.sdns-login-bottom-right{
  position:fixed;
  right:1.35rem;
  bottom:1.25rem;
  display:flex;
  gap:.9rem;
  font-size:1.1rem;
  color:rgba(255,255,255,.92);
  text-shadow:0 1px 1px rgba(0,0,0,.28);
}

.sdns-status-icon{
  opacity:.96;
}

.ai-login-clock,
.ai-login-copyright,
.ai-login-copyright-mobile,
.win10-login-screen,
.win10-login-shell,
.win10-login-panel{
  display:none !important;
}

@media (max-width: 575.98px){
  body.sdns-login-bg main{ padding:1.25rem !important; }
  .sdns-login-center{ width:100%; }
  .sdns-login-userpic{ width:92px; height:92px; font-size:2.5rem; }
  .sdns-login-heading h1{ font-size:1.75rem; }
  .sdns-login-bottom-left{ left:1.1rem; bottom:1.1rem; }
  .sdns-login-clock{ font-size:2.2rem; }
  .sdns-login-date{ font-size:.9rem; }
  .sdns-login-bottom-right{ right:1rem; bottom:1rem; gap:.75rem; font-size:1rem; }
}


/* ===== SDNS DESKTOP SHELL ===== */
body.sdns-desktop-bg{
  min-height:100vh;
  background:
    radial-gradient(circle at 22% 20%, rgba(91,180,255,.24), transparent 22%),
    radial-gradient(circle at 78% 16%, rgba(255,255,255,.13), transparent 18%),
    linear-gradient(135deg, #0b3f79 0%, #0d4d94 28%, #1467b3 52%, #0c5a9d 100%);
  overflow-x:hidden;
}
body.sdns-desktop-bg::before,
body.sdns-desktop-bg::after{
  content:'';
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
}
body.sdns-desktop-bg::before{
  background:
    linear-gradient(115deg, rgba(255,255,255,.16) 0, rgba(255,255,255,.03) 18%, transparent 18%) 0 0 / 50% 100% no-repeat,
    linear-gradient(205deg, rgba(255,255,255,.16) 0, rgba(255,255,255,.02) 22%, transparent 22%) 100% 0 / 50% 100% no-repeat;
  mix-blend-mode:screen;
  opacity:.5;
}
body.sdns-desktop-bg::after{
  background: linear-gradient(to top, rgba(0,0,0,.30), transparent 38%);
}
.sdns-desktop-shell{ position:relative; min-height:100vh; padding:1rem 1rem 4.75rem; z-index:1; }
.sdns-desktop-wallpaper{ position:fixed; inset:0; pointer-events:none; }
.sdns-desktop-icons{
  position:fixed; left:1.1rem; top:1.1rem; z-index:3; width:112px; display:flex; flex-direction:column; gap:.55rem;
}
.sdns-desktop-icon{
  display:flex; flex-direction:column; align-items:center; gap:.35rem; padding:.55rem .35rem; color:#fff; text-decoration:none; border-radius:10px;
  text-align:center; font-size:.78rem; text-shadow:0 1px 2px rgba(0,0,0,.45); border:1px solid transparent;
}
.sdns-desktop-icon i{ font-size:1.55rem; line-height:1; }
.sdns-desktop-icon:hover, .sdns-desktop-icon.active{ background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.22); color:#fff; }
.sdns-desktop-main{ position:relative; z-index:2; padding-left:132px; padding-top:.2rem; padding-right:0; }
.sdns-app-window{
  min-height:calc(100vh - 6.4rem); border-radius:8px; overflow:hidden;
  background:rgba(239,244,251,.92); color:#0e2338;
  box-shadow:0 24px 60px rgba(0,0,0,.24), 0 4px 18px rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.35);
}
.sdns-window-titlebar{
  height:48px; display:flex; align-items:center; justify-content:space-between; padding:0 .8rem 0 1rem;
  background:linear-gradient(to bottom, rgba(249,252,255,.95), rgba(226,235,247,.88)); border-bottom:1px solid rgba(0,0,0,.09);
}
.sdns-window-title-left{ display:flex; align-items:center; gap:.75rem; min-width:0; }
.sdns-window-appicon{ width:30px; height:30px; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; background:#1a73bf; color:#fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.sdns-window-kicker{ font-size:.66rem; letter-spacing:.08em; text-transform:uppercase; color:#516579; }
.sdns-window-title{ font-size:1rem; font-weight:600; color:#10273c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sdns-window-controls{ display:flex; align-items:center; gap:.45rem; }
.sdns-window-controls span{ width:12px; height:12px; border-radius:50%; background:#dce4ee; box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 1px rgba(0,0,0,.06); }
.sdns-window-controls span.close{ background:#e88f8f; }
.sdns-window-content{ min-height:calc(100vh - 9.4rem); background:linear-gradient(to bottom, rgba(255,255,255,.82), rgba(235,241,248,.96)); }

.sdns-taskbar{
  position:fixed; left:0; right:0; bottom:0; height:48px; z-index:30; display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:0 .65rem; background:linear-gradient(to bottom, rgba(25,35,49,.94), rgba(12,19,30,.97));
  border-top:1px solid rgba(255,255,255,.12); box-shadow:0 -6px 18px rgba(0,0,0,.22);
}
.sdns-taskbar-left, .sdns-taskbar-right{ display:flex; align-items:center; gap:.4rem; min-width:0; }
.sdns-start-button, .sdns-taskbar-icon, .sdns-taskbar-app, .sdns-taskbar-power{
  height:36px; min-width:36px; padding:0 .8rem; border:none; border-radius:4px; text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center; gap:.45rem; color:#f3f7fb;
  background:linear-gradient(to bottom, rgba(255,255,255,.12), rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.34), 0 1px 0 rgba(0,0,0,.24);
}
.sdns-start-button:hover, .sdns-taskbar-icon:hover, .sdns-taskbar-app:hover, .sdns-taskbar-power:hover{ background:linear-gradient(to bottom, rgba(255,255,255,.2), rgba(255,255,255,.07)); color:#fff; }
.sdns-start-button:active, .sdns-taskbar-icon:active, .sdns-taskbar-app:active, .sdns-taskbar-power:active{ transform:translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08); }
.sdns-start-logo{ font-size:1rem; }
.sdns-taskbar-search{
  height:36px; min-width:220px; max-width:320px; padding:0 .9rem; border-radius:4px; text-decoration:none; color:#dbe8f5;
  background:linear-gradient(to bottom, rgba(255,255,255,.16), rgba(255,255,255,.07)); border:1px solid rgba(255,255,255,.11);
  display:none; align-items:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.sdns-taskbar-pill{ height:32px; padding:0 .7rem; border-radius:4px; display:inline-flex; align-items:center; color:#e7f0fb; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.1); }
.sdns-taskbar-user{ height:36px; padding:0 .55rem; border-radius:4px; text-decoration:none; color:#fff; display:inline-flex; align-items:center; gap:.5rem; }
.sdns-taskbar-user:hover{ background:rgba(255,255,255,.08); color:#fff; }
.sdns-taskbar-avatar{ width:26px; height:26px; border-radius:50%; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; background:rgba(255,255,255,.14); }
.sdns-taskbar-avatar img{ width:100%; height:100%; object-fit:cover; }
.sdns-taskbar-status{ gap:.55rem; color:#e6eef8; }
.sdns-taskbar-clock{ min-width:92px; text-align:right; color:#fff; line-height:1.05; font-size:.73rem; }
.sdns-taskbar-clock #sdnsDesktopClock{ font-size:.9rem; font-weight:600; }

.sdns-start-menu{
  position:fixed; left:.8rem; bottom:3.35rem; width:min(560px, calc(100vw - 1.6rem)); max-height:72vh; overflow:auto; z-index:28;
  border-radius:6px; padding:1rem; background:linear-gradient(to bottom, rgba(26,36,53,.96), rgba(14,22,34,.98));
  border:1px solid rgba(255,255,255,.12); box-shadow:0 20px 46px rgba(0,0,0,.35); opacity:0; transform:translateY(12px) scale(.985);
  pointer-events:none; transition:opacity .18s ease, transform .18s ease;
}
body.sdns-start-open .sdns-start-menu{ opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
.sdns-start-menu-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; color:#fff; }
.sdns-start-kicker{ font-size:.74rem; letter-spacing:.09em; text-transform:uppercase; color:#a5bfda; }
.sdns-start-title{ font-size:1.15rem; font-weight:600; }
.sdns-start-build{ padding:.35rem .55rem; border-radius:4px; background:rgba(255,255,255,.1); color:#e7f1fb; font-size:.82rem; }
.sdns-start-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:.75rem; }
.sdns-start-tile{
  min-height:104px; border-radius:4px; padding:.9rem; text-decoration:none; color:#fff;
  display:flex; flex-direction:column; justify-content:space-between; gap:.55rem;
  background:linear-gradient(135deg, rgba(24,120,210,.9), rgba(16,82,149,.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.18);
}
.sdns-start-tile i{ font-size:1.45rem; }
.sdns-start-tile:hover, .sdns-start-tile.active{ color:#fff; filter:brightness(1.08); }
.sdns-start-tile:nth-child(3n){ background:linear-gradient(135deg, rgba(40,147,112,.92), rgba(22,108,81,.95)); }
.sdns-start-tile:nth-child(4n){ background:linear-gradient(135deg, rgba(187,88,34,.94), rgba(157,62,14,.97)); }
.sdns-start-tile:nth-child(5n){ background:linear-gradient(135deg, rgba(121,72,180,.94), rgba(88,47,139,.97)); }

body[data-boot-desktop="1"] .sdns-app-window,
body[data-boot-desktop="1"] .sdns-desktop-icons,
body[data-boot-desktop="1"] .sdns-taskbar{ opacity:0; transform:scale(.992); animation:sdnsDesktopReveal .65s ease .95s forwards; }
@keyframes sdnsDesktopReveal{ to{ opacity:1; transform:none; } }
.sdns-boot-overlay{
  position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg, #0f4280 0%, #1164b1 100%);
  animation:sdnsBootFade 1.3s ease .8s forwards;
}
@keyframes sdnsBootFade{ to{ opacity:0; visibility:hidden; } }
.sdns-boot-core{ text-align:center; color:#fff; }
.sdns-boot-logo{ font-size:3rem; margin-bottom:.85rem; }
.sdns-boot-title{ font-size:1.6rem; font-weight:600; letter-spacing:.04em; }
.sdns-boot-sub{ opacity:.82; margin-top:.35rem; }
.sdns-boot-loader{ display:flex; justify-content:center; gap:.45rem; margin-top:1rem; }
.sdns-boot-loader span{ width:8px; height:8px; border-radius:50%; background:#fff; animation:sdnsBootDot 1s ease-in-out infinite; }
.sdns-boot-loader span:nth-child(2){ animation-delay:.15s; }
.sdns-boot-loader span:nth-child(3){ animation-delay:.3s; }
@keyframes sdnsBootDot{ 0%,80%,100%{ transform:scale(.7); opacity:.45; } 40%{ transform:scale(1); opacity:1; } }
body.sdns-login-submitting .sdns-login-screen{ opacity:.45; transform:scale(.99); transition:opacity .18s ease, transform .18s ease; }

body.sdns-desktop-bg .ai-card,
body.sdns-desktop-bg .ai-dash-card,
body.sdns-desktop-bg .ai-dash-hero,
body.sdns-desktop-bg .ai-modal,
body.sdns-desktop-bg .ai-toast,
body.sdns-desktop-bg .offcanvas{
  background:rgba(255,255,255,.72);
  color:#10273c;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 8px 26px rgba(0,0,0,.08);
}
body.sdns-desktop-bg .text-muted, body.sdns-desktop-bg .ai-dash-section-subtitle, body.sdns-desktop-bg .ai-dash-kicker{ color:#60758a !important; }
body.sdns-desktop-bg .ai-dash-title,
body.sdns-desktop-bg .ai-dash-section-title,
body.sdns-desktop-bg h1, body.sdns-desktop-bg h2, body.sdns-desktop-bg h3, body.sdns-desktop-bg h4{ color:#10273c; }
body.sdns-desktop-bg .form-control, body.sdns-desktop-bg .form-select{ background:#fff; color:#10273c; border-color:#bdd0e1; }
body.sdns-desktop-bg .btn-primary{
  background:linear-gradient(to bottom, #48a3ff, #1a73bf); border-color:#125995; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.15), 0 1px 0 rgba(255,255,255,.35);
}
body.sdns-desktop-bg .table-dark{ --bs-table-bg: rgba(255,255,255,.78); --bs-table-color:#10273c; --bs-table-striped-bg: rgba(17,99,171,.05); --bs-table-hover-bg: rgba(17,99,171,.08); border-color:rgba(0,0,0,.08); }
body.sdns-desktop-bg .ai-offcanvas{ background:linear-gradient(to bottom, rgba(25,35,49,.98), rgba(15,22,34,.99)); color:#fff; }

@media (min-width: 992px){ .sdns-taskbar-search{ display:inline-flex; } }
@media (max-width: 991.98px){
  .sdns-desktop-shell{ padding:.7rem .7rem 4.2rem; }
  .sdns-desktop-main{ padding-left:0; }
  .sdns-app-window{ min-height:calc(100vh - 5.5rem); }
  .sdns-window-content{ min-height:calc(100vh - 8rem); }
  .sdns-taskbar-pill{ display:none; }
  .sdns-taskbar-search{ display:none; }
}
@media (max-width: 575.98px){
  .sdns-window-titlebar{ padding:0 .65rem 0 .75rem; }
  .sdns-window-title{ font-size:.92rem; }
  .sdns-taskbar{ padding:0 .35rem; }
  .sdns-taskbar-clock{ min-width:74px; font-size:.66rem; }
}


/* --- SDNS Desktop shell --- */
.sdns-desktop-shell{position:relative;min-height:100vh;overflow:hidden;background:linear-gradient(180deg,#0f4c81 0%,#0d3c67 36%,#0b2e52 100%);} 
.sdns-desktop-wallpaper{position:absolute;inset:0;background:radial-gradient(1200px 500px at 50% 10%,rgba(117,206,255,.24),transparent 60%),linear-gradient(135deg,rgba(255,255,255,.11),transparent 36%),linear-gradient(225deg,rgba(255,255,255,.05),transparent 28%),linear-gradient(180deg,rgba(6,26,49,.14),rgba(6,26,49,.42));pointer-events:none;}
.sdns-desktop-wallpaper::before{content:"";position:absolute;inset:0;background:linear-gradient(130deg,transparent 0 42%,rgba(163,225,255,.12) 42% 50%,transparent 50% 100%),linear-gradient(310deg,transparent 0 47%,rgba(255,255,255,.08) 47% 53%,transparent 53% 100%);mix-blend-mode:screen;opacity:.7;}
.sdns-desktop-main{padding:28px 26px 90px 150px;position:relative;z-index:2;}
.sdns-app-window{position:relative;min-height:calc(100vh - 145px);border:1px solid rgba(255,255,255,.35);background:rgba(233,240,248,.86);box-shadow:0 26px 60px rgba(0,0,0,.28),0 3px 0 rgba(255,255,255,.45) inset;border-radius:6px;overflow:hidden;backdrop-filter:blur(14px);}
.sdns-app-window.is-maximized{position:fixed!important;left:8px!important;top:8px!important;right:8px;bottom:58px;min-height:auto;width:auto;z-index:15;}
.sdns-app-window.is-minimized,.sdns-app-window.is-closed{display:none;}
.sdns-window-titlebar{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:linear-gradient(180deg,#f5f9fe,#d9e6f3);border-bottom:1px solid rgba(11,48,82,.18);cursor:move;user-select:none;}
.sdns-window-title-left{display:flex;gap:10px;align-items:center;color:#12395c;}
.sdns-window-appicon{width:34px;height:34px;border-radius:8px;background:linear-gradient(180deg,#0c75d8,#095bb2);display:grid;place-items:center;color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 8px 18px rgba(9,91,178,.28);} 
.sdns-window-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#4f7292;}
.sdns-window-title{font-size:18px;font-weight:700;color:#133a5d;}
.sdns-window-controls{display:flex;align-items:center;gap:4px;}
.sdns-window-control{width:44px;height:32px;border:0;background:transparent;position:relative;border-radius:2px;}
.sdns-window-control:hover{background:rgba(9,91,178,.12);} 
.sdns-window-control.close:hover{background:#e81123;}
.sdns-window-control::before,.sdns-window-control::after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#274863;}
.sdns-window-control.close:hover::before,.sdns-window-control.close:hover::after{background:#fff;}
.sdns-window-control.is-minimize::before{width:12px;height:2px;top:58%;}
.sdns-window-control.is-maximize::before{width:12px;height:10px;border:2px solid #274863;background:transparent;}
.sdns-window-control.close::before{width:14px;height:2px;transform:translate(-50%,-50%) rotate(45deg);} 
.sdns-window-control.close::after{width:14px;height:2px;transform:translate(-50%,-50%) rotate(-45deg);} 
.sdns-window-content{color:#14212f;min-height:calc(100vh - 220px);overflow:auto;background:linear-gradient(180deg,rgba(255,255,255,.75),rgba(243,247,251,.94));}
.sdns-desktop-icons{position:absolute;left:18px;top:18px;bottom:76px;width:110px;z-index:4;display:block!important;}
.sdns-desktop-icon{position:absolute;width:82px;padding:10px 8px;border-radius:6px;display:flex;flex-direction:column;align-items:center;gap:8px;color:#fff;text-decoration:none;text-shadow:0 1px 2px rgba(0,0,0,.5);user-select:none;cursor:default;}
.sdns-desktop-icon i{font-size:30px;line-height:1;width:52px;height:52px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.04));box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 10px 22px rgba(0,0,0,.18);} 
.sdns-desktop-icon span{font-size:12px;line-height:1.2;text-align:center;word-break:break-word;}
.sdns-desktop-icon:hover,.sdns-desktop-icon.is-selected{background:rgba(255,255,255,.18);outline:1px solid rgba(255,255,255,.35);} 
.sdns-desktop-widget{position:absolute;right:22px;top:18px;width:320px;z-index:6;background:rgba(16,42,74,.56);border:1px solid rgba(255,255,255,.25);backdrop-filter:blur(14px);border-radius:14px;padding:16px 18px;box-shadow:0 22px 50px rgba(0,0,0,.22);color:#fff;}
.sdns-widget-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px;}
.sdns-widget-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:rgba(255,255,255,.72);} 
.sdns-widget-title{font-size:20px;font-weight:700;line-height:1.1;}
.sdns-widget-pulse{width:12px;height:12px;border-radius:50%;background:#40d97b;box-shadow:0 0 0 0 rgba(64,217,123,.45);animation:sdnsPulse 2s infinite;}
.sdns-widget-pulse.is-error{background:#ff6b7c;box-shadow:0 0 0 0 rgba(255,107,124,.4);} 
@keyframes sdnsPulse{0%{box-shadow:0 0 0 0 rgba(64,217,123,.42)}70%{box-shadow:0 0 0 10px rgba(64,217,123,0)}100%{box-shadow:0 0 0 0 rgba(64,217,123,0)}}
.sdns-widget-status{font-size:14px;color:rgba(255,255,255,.84);margin-bottom:14px;}
.sdns-widget-credits{font-size:32px;font-weight:800;line-height:1;display:flex;flex-direction:column;gap:6px;margin-bottom:12px;}
.sdns-widget-credits small{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:rgba(255,255,255,.62);} 
.sdns-widget-meta{font-size:13px;color:rgba(255,255,255,.72);} 
.sdns-taskbar{position:fixed;left:0;right:0;bottom:0;height:54px;display:flex;justify-content:space-between;align-items:center;padding:0 10px;background:linear-gradient(180deg,rgba(31,54,82,.94),rgba(18,34,54,.96));border-top:1px solid rgba(255,255,255,.16);backdrop-filter:blur(10px);z-index:20;}
.sdns-taskbar-left,.sdns-taskbar-right{display:flex;align-items:center;gap:8px;min-width:0;}
.sdns-start-button,.sdns-taskbar-app,.sdns-taskbar-power{height:40px;padding:0 14px;border:1px solid rgba(255,255,255,.12);border-radius:3px;background:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.03));color:#fff;display:inline-flex;align-items:center;gap:8px;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 1px 0 rgba(0,0,0,.28);text-decoration:none;}
.sdns-start-button:hover,.sdns-taskbar-app:hover,.sdns-taskbar-power:hover,.sdns-taskbar-app.is-active{background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.06));color:#fff;}
.sdns-taskbar-app{width:42px;justify-content:center;padding:0;}
.sdns-taskbar-search{height:40px;display:flex;align-items:center;padding:0 14px;border-radius:3px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.12);color:rgba(255,255,255,.86);text-decoration:none;min-width:220px;}
.sdns-taskbar-pill{height:34px;display:inline-flex;align-items:center;padding:0 12px;border-radius:16px;background:rgba(255,255,255,.1);color:#fff;border:1px solid rgba(255,255,255,.12);} 
.sdns-taskbar-user{display:flex;align-items:center;gap:8px;color:#fff;text-decoration:none;padding:4px 10px;border-radius:20px;}
.sdns-taskbar-avatar{width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.16);display:grid;place-items:center;overflow:hidden;}
.sdns-taskbar-avatar img{width:100%;height:100%;object-fit:cover;}
.sdns-taskbar-status,.sdns-taskbar-clock{color:#fff;font-size:13px;}
.sdns-taskbar-clock{text-align:right;line-height:1.1;min-width:88px;}
.sdns-start-menu{position:fixed;left:10px;bottom:60px;width:610px;max-width:calc(100vw - 20px);padding:16px;border-radius:8px;background:rgba(24,39,59,.94);border:1px solid rgba(255,255,255,.18);box-shadow:0 28px 56px rgba(0,0,0,.28);display:none;z-index:25;}
.sdns-start-menu.is-open{display:block;}
.sdns-start-menu-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px;color:#fff;}
.sdns-start-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
.sdns-start-tile{min-height:94px;padding:12px;border-radius:4px;background:linear-gradient(180deg,rgba(0,120,215,.72),rgba(0,96,172,.82));color:#fff;text-decoration:none;display:flex;flex-direction:column;justify-content:space-between;box-shadow:inset 0 1px 0 rgba(255,255,255,.18);} 
.sdns-start-tile i{font-size:24px;}
@media (max-width: 1199.98px){.sdns-desktop-widget{width:280px}.sdns-desktop-main{padding-left:138px}}
@media (max-width: 991.98px){.sdns-desktop-main{padding:18px 14px 86px 14px}.sdns-desktop-widget,.sdns-desktop-icons{display:none!important}.sdns-taskbar-search{min-width:0;width:150px}}

/* SDNS Desk multi-window desktop */
.sdns-desktop-main.is-desktop-home{padding-right:360px;}
.sdns-window-layer{position:relative;min-height:calc(100vh - 118px);z-index:3;}
.sdns-desktop-main.is-desktop-home .sdns-window-layer{min-height:calc(100vh - 118px);}
.sdns-desktop-welcome{position:absolute;left:160px;bottom:102px;max-width:540px;color:rgba(255,255,255,.9);text-shadow:0 2px 16px rgba(0,0,0,.28);pointer-events:none;user-select:none;}
.sdns-desktop-welcome-title{font-size:2.2rem;font-weight:300;letter-spacing:.02em;}
.sdns-desktop-welcome-sub{font-size:1.05rem;opacity:.96;margin-top:.25rem;}
.sdns-desktop-welcome-hint{font-size:.95rem;opacity:.8;margin-top:.6rem;}
.sdns-app-window{position:absolute;left:100px;top:66px;min-width:760px;max-width:min(1240px,calc(100vw - 210px));width:min(1040px,calc(100vw - 250px));min-height:620px;height:calc(100vh - 170px);}
.sdns-app-window .sdns-window-content.is-frame{padding:0;height:calc(100% - 54px);background:#dfe8f2;}
.sdns-window-frame{display:block;width:100%;height:100%;border:0;background:#eef3f8;}
.sdns-app-window.is-active .sdns-window-titlebar{background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(220,232,243,.82));}
.sdns-app-window:not(.is-active) .sdns-window-titlebar{filter:saturate(.86) brightness(.96);}
.sdns-app-window.is-maximized{left:8px!important;top:8px!important;right:8px;bottom:58px;height:auto!important;max-width:none;width:auto!important;}
.sdns-taskbar-windows{display:flex;align-items:center;gap:6px;}
.sdns-taskbar-app{width:auto;min-width:42px;max-width:220px;justify-content:flex-start;padding:0 12px;overflow:hidden;}
.sdns-taskbar-app span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:none;}
.sdns-taskbar-app[data-taskbar-app] span{display:inline;max-width:132px;}
.sdns-taskbar-app.is-empty span{display:none;}
.sdns-taskbar-app.is-empty{width:42px;padding:0;justify-content:center;}
.sdns-taskbar-app.is-active{box-shadow:inset 0 2px 0 rgba(120,190,255,.9), inset 0 1px 0 rgba(255,255,255,.14), 0 1px 0 rgba(0,0,0,.28);}
.sdns-desktop-embed-body{background:#e8eff6!important;min-height:100vh;}
.sdns-desktop-embed{padding:16px 18px 18px;}
@media (max-width: 1199.98px){.sdns-desktop-main.is-desktop-home{padding-right:310px}.sdns-app-window{max-width:calc(100vw - 170px);width:calc(100vw - 190px)}}
@media (max-width: 991.98px){.sdns-desktop-main.is-desktop-home{padding-right:14px}.sdns-desktop-welcome{left:22px;bottom:88px;max-width:calc(100vw - 44px)}.sdns-app-window{left:12px;top:14px;width:calc(100vw - 24px)!important;max-width:none;min-width:0;min-height:calc(100vh - 118px);height:calc(100vh - 118px)}}

/* v2.1.14 desktop shell refinements */
.sdns-desktop-widgets{position:absolute;right:22px;top:18px;display:flex;flex-direction:column;gap:14px;z-index:6}
.sdns-desktop-widget{position:relative;right:auto;top:auto;width:320px}
.sdns-desktop-widget.is-uploads .sdns-widget-title{color:#dff1ff}
.sdns-widget-meta{line-height:1.35}

.sdns-taskbar{height:48px;padding:0 6px;background:linear-gradient(180deg,rgba(29,50,74,.98),rgba(13,25,39,.98));border-top:1px solid rgba(255,255,255,.12);box-shadow:0 -8px 28px rgba(0,0,0,.28)}
.sdns-taskbar-left,.sdns-taskbar-right{gap:4px}
.sdns-start-button,.sdns-taskbar-app,.sdns-taskbar-power{height:40px;border-radius:0;border:1px solid rgba(255,255,255,.10);background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.03));box-shadow:inset 0 1px 0 rgba(255,255,255,.15), inset 0 -1px 0 rgba(0,0,0,.24), 0 1px 0 rgba(0,0,0,.34)}
.sdns-start-button:hover,.sdns-taskbar-app:hover,.sdns-taskbar-power:hover,.sdns-taskbar-app.is-active{background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.06))}
.sdns-taskbar-app.is-active{box-shadow:inset 0 -3px 0 #66b8ff, inset 0 1px 0 rgba(255,255,255,.16), 0 1px 0 rgba(0,0,0,.34)}
.sdns-start-button:active,.sdns-taskbar-app:active,.sdns-taskbar-power:active{transform:none;background:linear-gradient(180deg,rgba(0,0,0,.15),rgba(255,255,255,.06));box-shadow:inset 0 2px 5px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08)}
.sdns-taskbar-search{height:38px;border-radius:0;background:rgba(255,255,255,.08)}
.sdns-taskbar-user{padding:4px 8px;border-radius:0}
.sdns-taskbar-status,.sdns-taskbar-clock{font-size:12px}
.sdns-taskbar-power{width:40px;justify-content:center;padding:0}

.sdns-window-layer{position:relative;min-height:calc(100vh - 108px);z-index:3}
.sdns-app-window{min-width:560px;min-height:380px;border-radius:2px;box-shadow:0 20px 46px rgba(0,0,0,.34),0 1px 0 rgba(255,255,255,.48) inset;overflow:visible}
.sdns-app-window .sdns-window-content,.sdns-app-window .sdns-window-content.is-frame{overflow:hidden;border-radius:0 0 2px 2px}
.sdns-window-titlebar{border-radius:2px 2px 0 0}
.sdns-window-resize-handle{position:absolute;z-index:8}
.sdns-window-resize-handle.is-e,.sdns-window-resize-handle.is-w{top:8px;bottom:8px;width:8px}
.sdns-window-resize-handle.is-e{right:-4px;cursor:e-resize}
.sdns-window-resize-handle.is-w{left:-4px;cursor:w-resize}
.sdns-window-resize-handle.is-n,.sdns-window-resize-handle.is-s{left:8px;right:8px;height:8px}
.sdns-window-resize-handle.is-n{top:-4px;cursor:n-resize}
.sdns-window-resize-handle.is-s{bottom:-4px;cursor:s-resize}
.sdns-window-resize-handle.is-ne,.sdns-window-resize-handle.is-nw,.sdns-window-resize-handle.is-se,.sdns-window-resize-handle.is-sw{width:12px;height:12px}
.sdns-window-resize-handle.is-ne{top:-4px;right:-4px;cursor:ne-resize}
.sdns-window-resize-handle.is-nw{top:-4px;left:-4px;cursor:nw-resize}
.sdns-window-resize-handle.is-se{right:-4px;bottom:-4px;cursor:se-resize}
.sdns-window-resize-handle.is-sw{left:-4px;bottom:-4px;cursor:sw-resize}
.sdns-app-window.is-maximized .sdns-window-resize-handle{display:none}

.sdns-desktop-icon{touch-action:none}
.sdns-desktop-icon:hover,.sdns-desktop-icon.is-selected{background:rgba(255,255,255,.14);outline:1px solid rgba(255,255,255,.28)}
.sdns-desktop-icon.is-selected::after{content:'';position:absolute;inset:3px;border:1px dotted rgba(255,255,255,.78);border-radius:4px;pointer-events:none}

@media (max-width: 1199.98px){
  .sdns-desktop-widgets{right:16px;top:16px}
  .sdns-desktop-widget{width:280px}
  .sdns-desktop-main.is-desktop-home{padding-right:312px}
}
@media (max-width: 991.98px){
  .sdns-desktop-main.is-desktop-home{padding-right:14px}
  .sdns-desktop-widgets,.sdns-desktop-icons{display:none!important}
}


/* v2.1.15 desktop viewport + behavior */
html,body{height:100%;overflow:hidden;}
body.sdns-desktop-bg{overflow:hidden;}
body.sdns-desktop-bg .ai-main{overflow:hidden;}
.sdns-desktop-shell{height:100vh;min-height:100vh;max-height:100vh;overflow:hidden;}
.sdns-desktop-main{height:calc(100vh - 48px);overflow:hidden;}
.sdns-window-layer,.sdns-desktop-main.is-desktop-home .sdns-window-layer{height:calc(100vh - 108px);min-height:calc(100vh - 108px);overflow:hidden;}
.sdns-app-window{max-height:calc(100vh - 86px);}
.sdns-window-content{min-height:0;height:calc(100% - 44px);overflow:auto;}
.sdns-app-window .sdns-window-content,.sdns-app-window .sdns-window-content.is-frame{height:calc(100% - 44px);}
.sdns-window-frame{height:100%;min-height:100%;}
.sdns-taskbar{padding:0 4px;background:linear-gradient(180deg,rgba(38,55,76,.98),rgba(16,28,42,.99));}
.sdns-taskbar-left,.sdns-taskbar-right{gap:2px;}
.sdns-start-button,.sdns-taskbar-app,.sdns-taskbar-power{height:40px;border-color:rgba(255,255,255,.09);background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.02));box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.34),0 1px 0 rgba(0,0,0,.4);}
.sdns-start-button:hover,.sdns-taskbar-app:hover,.sdns-taskbar-power:hover,.sdns-taskbar-app.is-active{background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.05));}
.sdns-taskbar-search{height:36px;background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.10);}
.sdns-taskbar-app{max-width:180px;}
.sdns-taskbar-clock{min-width:78px;padding:0 6px;}
.sdns-window-titlebar{height:44px;}
.sdns-window-control{height:30px;}
.sdns-window-content.container-fluid{height:calc(100% - 44px);overflow:auto;}
@media (max-width: 991.98px){
  html,body,body.sdns-desktop-bg{overflow:auto;}
  .sdns-desktop-shell{height:auto;min-height:100vh;max-height:none;overflow:visible;}
  .sdns-desktop-main,.sdns-window-layer,.sdns-desktop-main.is-desktop-home .sdns-window-layer{height:auto;min-height:calc(100vh - 108px);overflow:visible;}
  .sdns-app-window{max-height:none;}
}
