/* =========================================================
   NORTHLAT AI — Light tech portal
   ========================================================= */

:root{
  --bg: #eff4fb;
  --bg-2: #e7eef8;
  --grid: rgba(26, 53, 88, .045);

  --surface: rgba(255,255,255,.78);
  --surface-2: rgba(247, 250, 255, .92);
  --surface-3: #ffffff;
  --surface-dark: #0f1727;
  --surface-dark-2: #121d31;

  --border: rgba(18, 42, 76, .09);
  --border-strong: rgba(18, 42, 76, .14);

  --text: #122441;
  --muted: rgba(18, 36, 65, .68);
  --muted-2: rgba(18, 36, 65, .46);

  --accent: #2272ff;
  --accent-2: #0ab6d8;
  --accent-soft: rgba(34,114,255,.12);
  --ok: #19b87c;
  --warn: #e7a738;
  --danger: #dc5571;

  --radius: 24px;
  --radius-2: 18px;
  --radius-3: 14px;

  --shadow: 0 28px 90px rgba(31, 55, 90, .10);
  --shadow-2: 0 14px 36px rgba(31, 55, 90, .08);
  --ring: 0 0 0 4px rgba(34,114,255,.12);
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  --sidebar-w: 312px;
  --topbar-h: 84px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(920px 660px at 15% 12%, rgba(34,114,255,.15), transparent 58%),
    radial-gradient(760px 520px at 82% 18%, rgba(10,182,216,.11), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  overflow-x: hidden;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, var(--grid), var(--grid) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, var(--grid), var(--grid) 1px, transparent 1px, transparent 32px);
  mask-image: radial-gradient(1100px 720px at 55% 12%, rgba(0,0,0,.82), transparent 74%);
}

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

.wrap,
.card{
  width: 100%;
  min-height: 100vh;
}

.card{
  background: transparent;
}

.card-inner{
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 24px) 24px 24px calc(var(--sidebar-w) + 24px);
}

.card-inner > hr:first-of-type{
  display: none;
}

.app-sidebar{
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 26px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background:
    radial-gradient(520px 340px at 20% 12%, rgba(34,114,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(251,253,255,.95), rgba(241,246,252,.98));
  border-right: 1px solid var(--border);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.7);
  overflow-y: auto;
  z-index: 30;
}

.sidebar-header{
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand-mark{
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(43,115,255,.18);
}

.sidebar-brand-copy strong{
  display: block;
  font-size: 20px;
  letter-spacing: -.02em;
}

.sidebar-brand-copy span{
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sidebar-section{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-group{
  gap: 8px;
}

.sidebar-section-account{
  margin-top: auto;
}

.sidebar-section-title{
  padding: 0 10px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
}

.sidebar-nav{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-subnav{
  padding-left: 2px;
  display: none;
}

.sidebar-group.is-open .sidebar-subnav{
  display: flex;
}

.sidebar-item-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}

.sidebar-link{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.48);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(29,58,96,.04);
  font-weight: 700;
}

.sidebar-sublink{
  min-height: 46px;
  border-radius: 14px;
}

.sidebar-link:hover{
  background: rgba(255,255,255,.82);
  border-color: rgba(43,115,255,.10);
}

.sidebar-link.is-active{
  background: linear-gradient(135deg, rgba(34,114,255,.16), rgba(10,182,216,.09));
  border-color: rgba(34,114,255,.18);
  box-shadow: 0 12px 24px rgba(34,114,255,.10);
}

.sidebar-link.is-disabled{
  color: var(--muted);
  background: rgba(255,255,255,.24);
  cursor: default;
}

.sidebar-link-icon{
  width: 22px;
  text-align: center;
  color: rgba(15,34,63,.70);
}

.sidebar-badge{
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15,34,63,.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-group-toggle{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.34);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(29,58,96,.04);
}

.sidebar-group-toggle:hover{
  background: rgba(255,255,255,.7);
}

.sidebar-group-toggle.is-active{
  background: linear-gradient(135deg, rgba(34,114,255,.12), rgba(10,182,216,.07));
  box-shadow: 0 12px 24px rgba(34,114,255,.08);
}

.sidebar-group-chevron{
  color: var(--muted);
  transition: transform .18s ease;
}

.sidebar-group.is-open .sidebar-group-chevron{
  transform: rotate(180deg);
}

.sidebar-favorite-toggle{
  width: 36px;
  height: 36px;
  border: 1px solid rgba(18,42,76,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.6);
  color: rgba(18,36,65,.42);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.sidebar-favorite-toggle:hover{
  background: rgba(255,255,255,.88);
  color: #d5a017;
}

.sidebar-favorite-toggle.is-active{
  color: #d5a017;
  background: rgba(255,249,222,.9);
  border-color: rgba(213,160,23,.22);
}

.sidebar-user-card{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}

.sidebar-user-avatar{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
}

.sidebar-user-meta strong{
  display: block;
  font-size: 15px;
}

.sidebar-user-meta span{
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 12px;
}

.app-topbar{
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  z-index: 25;
}

.app-topbar.is-chatbar{
  justify-content: stretch;
  gap: 0;
}

.app-topbar-left,
.app-topbar-right{
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-topbar-right{
  min-width: 0;
}

.app-topbar.is-chatbar .app-topbar-left{
  display: none;
}

.chat-topbar-tools{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: visible;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.chat-topbar-tools .btn-small{
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
  flex: 0 0 auto;
}

.chat-topbar-thread-select{
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
  color: var(--text);
  font-weight: 700;
  box-shadow: none;
  flex: 1 1 220px;
}

.chat-topbar-thread-select{
  min-width: 160px;
  max-width: 380px;
  appearance: none;
}

.chat-topbar-model-select{
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
  color: var(--text);
  font-weight: 700;
  box-shadow: none;
  flex: 0 1 190px;
  min-width: 150px;
  max-width: 240px;
  appearance: none;
}

.app-topbar.is-chatbar .app-topbar-right{
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  overflow: visible;
}

.app-topbar.is-chatbar .topbar-user-pill{
  margin-left: auto;
}

.app-topbar.is-chatbar .topbar-user-pill{
  min-height: 40px;
  min-width: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
  flex: 0 0 auto;
}

.app-topbar.is-chatbar .topbar-user-copy,
.app-topbar.is-chatbar .topbar-user-copy span{
  display: none;
}

.app-topbar.is-chatbar .topbar-user-avatar{
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.topbar-title strong{
  display: block;
  font-size: 18px;
}

.topbar-title span{
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.topbar-user-pill{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-2);
}

.topbar-profile-pill{
  min-height: 46px;
}

.topbar-user-avatar{
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
}

.topbar-user-copy strong{
  display: block;
  font-size: 14px;
}

.topbar-user-copy span{
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 12px;
}

.topbar-chat-launch{
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-2);
  cursor: pointer;
}

.topbar-chat-launch:hover{
  border-color: rgba(34,114,255,.28);
}

.topbar-chat-launch-icon{
  width: 20px;
  height: 20px;
  display: block;
}

.topbar-chat-launch-icon svg{
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.topbar-chat-launch-badge{
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(220,85,113,.26);
}

.topbar-worker-wake{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.78);
  color:var(--text);
  font:inherit;
  font-size:13px;
  font-weight:800;
  box-shadow:var(--shadow-2);
  cursor:pointer;
  transition:border-color .18s ease, transform .18s ease, background .18s ease, color .18s ease;
}

.topbar-worker-wake:hover{
  border-color:rgba(34,114,255,.28);
}

.topbar-worker-wake:disabled{
  cursor:wait;
  opacity:.84;
}

.topbar-worker-wake.is-success{
  border-color:rgba(33,153,88,.32);
  background:rgba(236,252,243,.92);
  color:#18603c;
}

.topbar-worker-wake.is-error{
  border-color:rgba(220,85,113,.28);
  background:rgba(255,242,245,.92);
  color:#a63a54;
}

.topbar-worker-wake-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow:0 0 0 4px var(--accent-soft);
  flex:0 0 auto;
}

.topbar-worker-wake.is-success .topbar-worker-wake-dot{
  background:#24a15f;
  box-shadow:0 0 0 4px rgba(36,161,95,.16);
}

.topbar-worker-wake.is-error .topbar-worker-wake-dot{
  background:#dc5571;
  box-shadow:0 0 0 4px rgba(220,85,113,.14);
}

.member-chat-overlay-root{
  position: fixed;
  right: 24px;
  top: calc(var(--topbar-h) + 12px);
  z-index: 45;
}

.member-chat-popover{
  width: 340px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(19,38,68,.18);
  padding: 14px;
}

.member-chat-popover[hidden],
.member-chat-overlay-box[hidden]{
  display: none !important;
}

.member-chat-popover-head,
.member-chat-overlay-box-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.member-chat-popover-subtitle,
.member-chat-overlay-meta{
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.member-chat-popover-link{
  white-space: nowrap;
}

.member-chat-popover-status{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
}

.member-chat-popover-status.is-error{
  border-color: rgba(220,85,113,.28);
  background: rgba(220,85,113,.08);
  color: #8b233f;
}

.member-chat-popover-status.is-warning{
  border-color: rgba(223,161,31,.26);
  background: rgba(255,208,84,.14);
  color: #8d5f00;
}

.member-chat-popover-status.is-info{
  border-color: rgba(34,114,255,.24);
  background: rgba(34,114,255,.08);
  color: #1a4fbd;
}

.member-chat-overlay-list{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(58vh, 480px);
  overflow-y: auto;
}

.member-chat-overlay-box{
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(380px, calc(100vw - 24px));
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 80px rgba(19,38,68,.2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-chat-overlay-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-chat-overlay-messages{
  min-height: 320px;
  max-height: 48vh;
}

.member-chat-overlay-composer textarea{
  min-height: 82px;
}

.sidebar-toggle{
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  cursor: pointer;
  padding: 0;
}

.sidebar-toggle span{
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.login-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-page .wrap{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-page .card{
  min-height: auto;
  width: min(100%, 640px);
  margin: 0 auto;
}

.login-wrap{
  width: 100%;
}

.login-card{
  width: 100%;
  min-height: auto;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card-inner{
  min-height: auto;
  padding: 36px 40px 34px;
}

.login-brand{
  display: flex;
  align-items: center;
}

.login-brand img{
  display: block;
  width: min(220px, 100%);
  height: auto;
  max-width: 100%;
}

.login-page .form{
  max-width: none;
}

h1{
  margin: 0 0 8px 0;
  font-size: 34px;
  letter-spacing: -.03em;
}

h2{
  margin: 0 0 10px 0;
  font-size: 22px;
  letter-spacing: -.02em;
}

.dashboard-stack{
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.page-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.page-head-copy{
  max-width: 720px;
}

.page-kicker,
.section-kicker,
.hero-card-label,
.stat-card-label,
.metric-label{
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 900;
}

.page-head p{
  max-width: 820px;
  font-size: 15px;
  line-height: 1.65;
}

.page-head-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.status-chip{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--shadow-2);
}

.status-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34,114,255,.10);
}

.status-chip.is-online .status-dot{
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(25,184,124,.12);
}

.status-chip.is-offline .status-dot{
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(220,85,113,.12);
}

.hero-panel,
.dashboard-panel{
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(580px 320px at 0% 0%, rgba(34,114,255,.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(247,250,255,.76));
  box-shadow: var(--shadow);
}

.hero-panel{
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .95fr);
  gap: 18px;
  padding: 22px;
}

.hero-main{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-card,
.stat-card,
.metric-card{
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,.64);
  box-shadow: 0 12px 30px rgba(31,55,90,.06);
}

.hero-card{
  padding: 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-card-value{
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -.03em;
  font-weight: 800;
}

.hero-card-meta,
.stat-card-meta,
.metric-meta,
.panel-head-meta,
.panel-head-link{
  color: var(--muted);
  font-size: 14px;
}

.stats-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card{
  padding: 18px;
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card-value{
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.05em;
  font-weight: 900;
}

.section-block{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
}

.section-head p{
  max-width: 520px;
}

.metrics-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card{
  min-height: 180px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-value{
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.03em;
  font-weight: 850;
}

.panel-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-panel{
  padding: 20px;
}

.dashboard-panel-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-pill-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.panel-pill,
.panel-stack{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-pill{
  justify-content: space-between;
  min-height: 88px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.66);
  box-shadow: 0 10px 24px rgba(31,55,90,.05);
}

.panel-pill span{
  color: var(--muted);
  font-size: 13px;
}

.panel-pill strong{
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.panel-pill-block{
  min-height: 100px;
}

.panel-action-row{
  margin-top: 16px;
}

.member-chat-page .card-inner{
  padding-bottom: 32px;
}

.member-chat-page{
  overflow: hidden;
}

.member-chat-page .wrap,
.member-chat-page .card,
.member-chat-page .card-inner{
  min-height: calc(100vh - 32px);
}

.member-chat-stack{
  height: calc(100vh - 148px);
  min-height: 0;
}

.member-chat-muted-note{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.member-chat-page-layout{
  display: grid;
  grid-template-columns: minmax(300px, .88fr) minmax(0, 1.72fr);
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.member-chat-v2-layout{
  display: grid;
  grid-template-columns: minmax(300px, .88fr) minmax(0, 1.72fr);
  gap: 16px;
  align-items: stretch;
}

.member-chat-v2-sidebar,
.member-chat-v2-main{
  min-height: 680px;
}

.member-chat-v2-main-head{
  align-items: center;
}

.member-chat-v2-status{
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(18, 42, 76, .12);
  background: rgba(255,255,255,.72);
  color: var(--text);
}

.member-chat-v2-status.is-success{
  border-color: rgba(25,184,124,.24);
  background: rgba(25,184,124,.10);
}

.member-chat-v2-status.is-error{
  border-color: rgba(220,85,113,.24);
  background: rgba(220,85,113,.10);
}

.member-chat-v2-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.member-chat-v2-card{
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,.62);
  box-shadow: var(--shadow-2);
  padding: 18px;
}

.member-chat-v2-card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.member-chat-v2-pill{
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(34,114,255,.10);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.member-chat-v2-summary{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-chat-v2-row,
.member-chat-v2-device{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(247,250,255,.88);
  border: 1px solid rgba(18, 42, 76, .08);
}

.member-chat-v2-row span,
.member-chat-v2-device span{
  color: var(--muted);
  font-size: 13px;
}

.member-chat-v2-row code,
.member-chat-v2-device code{
  font-family: var(--mono);
  font-size: 12px;
  word-break: break-all;
}

.member-chat-v2-code-card{
  margin-top: 18px;
}

.member-chat-v2-code{
  margin: 0;
  min-height: 280px;
  padding: 16px;
  border-radius: 18px;
  background: #0f1727;
  color: #d8e8ff;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
}

.member-chat-v2-empty{
  color: var(--muted);
  font-size: 14px;
}

.member-chat-v2-member{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(18, 42, 76, .08);
  border-radius: 16px;
  background: rgba(255,255,255,.68);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.member-chat-v2-member:hover{
  border-color: rgba(34,114,255,.18);
  background: rgba(255,255,255,.92);
}

.member-chat-v2-member.is-selected{
  border-color: rgba(34,114,255,.24);
  background: linear-gradient(135deg, rgba(34,114,255,.16), rgba(10,182,216,.08));
}

.member-chat-v2-member strong{
  font-size: 15px;
}

.member-chat-v2-member span{
  color: var(--muted);
  font-size: 13px;
}

.member-chat-page-sidebar,
.member-chat-page-conversation{
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.member-chat-page-sidebar{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.member-chat-page-sidebar-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.member-chat-page-section{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
}

.member-chat-page-section-title{
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 900;
}

.member-chat-search{
  margin-bottom: 4px;
}

.member-chat-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  min-height: 0;
  flex: 1;
}

.member-chat-page-sidebar-actions{
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.member-chat-list-item{
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 26px rgba(31,55,90,.05);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.member-chat-list-item.is-compact{
  padding: 12px 14px;
}

.member-chat-list-item:hover{
  transform: translateY(-1px);
  border-color: rgba(34,114,255,.28);
  box-shadow: 0 16px 30px rgba(31,55,90,.08);
}

.member-chat-list-item.is-active{
  border-color: rgba(34,114,255,.36);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(242,247,255,.92));
  box-shadow: 0 18px 34px rgba(34,114,255,.10);
}

.member-chat-list-item-head{
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-chat-list-avatar{
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #ecffff;
  background:
    radial-gradient(circle at 30% 20%, rgba(204,255,248,.72), transparent 38%),
    linear-gradient(135deg, rgba(26,113,123,.96), rgba(72,191,138,.88) 52%, rgba(63,101,197,.92));
  box-shadow: 0 12px 22px rgba(22,57,87,.15);
}

.member-chat-thread-copy{
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-chat-thread-copy strong{
  display: block;
}

.member-chat-thread-preview{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-chat-list-item-meta{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.member-chat-presence-dot{
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(18,36,65,.18);
  box-shadow: 0 0 0 3px rgba(18,36,65,.06);
}

.member-chat-presence-dot.is-online{
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.14);
}

.member-chat-list-item-badge,
.member-chat-thread-unread{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(34,114,255,.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.member-chat-page-conversation{
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.member-chat-conversation-head{
  margin-bottom: 0;
}

.member-chat-security-badge{
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.74);
  color: var(--muted);
  font-weight: 800;
}

.member-chat-security-badge.is-safe{
  color: var(--ok);
  border-color: rgba(25,184,124,.24);
  background: rgba(25,184,124,.08);
}

.member-chat-security-badge.is-warning{
  color: #9a6500;
  border-color: rgba(223,161,31,.26);
  background: rgba(255,208,84,.14);
}

.member-chat-notice{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.76);
  color: var(--text);
  font-size: 14px;
}

.member-chat-notice.is-error{
  border-color: rgba(220,85,113,.28);
  background: rgba(220,85,113,.08);
  color: #8b233f;
}

.member-chat-notice.is-success{
  border-color: rgba(25,184,124,.24);
  background: rgba(25,184,124,.08);
  color: #177650;
}

.member-chat-notice.is-warning{
  border-color: rgba(223,161,31,.26);
  background: rgba(255,208,84,.14);
  color: #8d5f00;
}

.member-chat-notice.is-info{
  border-color: rgba(34,114,255,.24);
  background: rgba(34,114,255,.08);
  color: #1a4fbd;
}

.member-chat-messages{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(460px 240px at 100% 0%, rgba(34,114,255,.07), transparent 56%),
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(245,249,255,.72));
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.member-chat-empty{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  padding: 6px 2px;
}

.member-chat-message,
.member-chat-message-row{
  display: flex;
}

.member-chat-message.is-self,
.member-chat-message-row.is-self{
  justify-content: flex-end;
}

.member-chat-bubble{
  max-width: min(78%, 720px);
  border-radius: 22px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 26px rgba(31,55,90,.06);
}

.member-chat-message.is-self .member-chat-bubble,
.member-chat-message-row.is-self .member-chat-bubble,
.member-chat-bubble.is-self{
  background: linear-gradient(180deg, rgba(34,114,255,.12), rgba(34,114,255,.07));
  border-color: rgba(34,114,255,.18);
}

.member-chat-bubble.is-error{
  border-color: rgba(220,85,113,.24);
  background: rgba(220,85,113,.08);
}

.member-chat-bubble-meta{
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.member-chat-bubble-content,
.member-chat-bubble-body{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.member-chat-composer{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-chat-composer textarea{
  min-height: 110px;
  resize: vertical;
}

.member-chat-composer-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jobs-panel{
  padding-bottom: 12px;
}

.jobs-panel .table{
  margin-top: 4px;
}

.chat-shell-page{
  overflow: hidden;
}

.chat-shell-page.chat-fullscreen{
  --sidebar-w: 0px;
  --topbar-h: 0px;
}

.chat-shell-page.chat-fullscreen .app-sidebar,
.chat-shell-page.chat-fullscreen .app-topbar{
  display: none;
}

.chat-shell-page.chat-fullscreen .card-inner{
  padding: 0;
}

.chat-shell-page.chat-fullscreen .chat-page{
  height: 100vh;
  min-height: 100vh;
  margin: 0;
}

.chat-shell-page.chat-fullscreen .chat-terminal-shell{
  min-height: 100vh;
}

.chat-fullscreen-exit{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(110, 255, 110, .18);
  background: rgba(8, 12, 8, .92);
  color: #d4ffd4;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
}

.chat-fullscreen-exit[hidden]{
  display: none;
}

.chat-shell-page .wrap,
.chat-shell-page .card,
.chat-shell-page .card-inner{
  height: 100vh;
  min-height: 100vh;
}

.chat-shell-page .card-inner{
  overflow: hidden;
}

.projects-shell-page{
  overflow: hidden;
}

.projects-shell-page .wrap,
.projects-shell-page .card,
.projects-shell-page .card-inner{
  height: 100vh;
  min-height: 100vh;
}

.projects-shell-page .card-inner{
  overflow: hidden;
}

.projects-shell-page.builder-focus{
  --sidebar-w: 0px;
  --topbar-h: 0px;
}

.projects-shell-page.builder-focus .app-sidebar,
.projects-shell-page.builder-focus .app-topbar{
  display: none;
}

.projects-shell-page.builder-focus .card-inner{
  padding: 0;
}

.projects-shell-page.builder-focus .builder-page{
  height: 100vh;
  min-height: 100vh;
  margin: 0;
}

.projects-shell-page.builder-focus .builder-finder{
  min-height: 100vh;
}

.chat-page{
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h));
  min-height: calc(100vh - var(--topbar-h));
  margin: -24px -24px -24px -24px;
  overflow: hidden;
}

.chat-terminal-shell{
  --chat-term-bg: #040606;
  --chat-term-bg-soft: rgba(4, 6, 6, .94);
  --chat-grid-color: rgba(110, 170, 110, .05);
  --chat-user-color: #d6d6d6;
  --chat-ai-color: #8dff8d;
  --chat-user-name-color: #7ad7ff;
  --chat-ai-name-color: #8dff8d;
  --chat-user-glow: rgba(214, 214, 214, .08);
  --chat-ai-glow: rgba(141, 255, 141, .10);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h));
  border-radius: 0;
  border: 0;
  background:
    linear-gradient(180deg, var(--chat-term-bg-soft), var(--chat-term-bg));
  box-shadow: none;
  overflow: hidden;
}

.chat-terminal-shell.is-dragover{
  box-shadow: inset 0 0 0 1px rgba(141, 255, 141, .28);
}

.chat-terminal-shell::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(60, 90, 60, .08), rgba(60, 90, 60, .08) 1px, transparent 1px, transparent 24px);
  opacity: .24;
}

.chat-thread,
.chat-form,
.chat-settings-popover{
  position: relative;
  z-index: 1;
}

.chat-settings-popover{
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: 24px;
  width: min(360px, calc(100% - 32px));
  padding: 18px;
  border-radius: 0;
  border: 1px solid rgba(110, 255, 110, .16);
  background: rgba(8, 12, 8, .98);
  box-shadow: 0 26px 60px rgba(0,0,0,.32);
  z-index: 80;
  pointer-events: auto;
}

.chat-model-popover{
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - var(--topbar-h) - 32px);
  overflow: auto;
}

.chat-settings-head,
.chat-settings-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-settings-head strong{
  color: var(--chat-ai-color);
}

.chat-settings-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.chat-setting{
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(210, 255, 210, .82);
  font-size: 12px;
  font-weight: 700;
}

.chat-setting-theme{
  grid-column: 1 / -1;
}

.chat-theme-note{
  grid-column: 1 / -1;
  margin-top: -4px;
  color: rgba(210, 255, 210, .56);
  font-size: 12px;
  line-height: 1.5;
}

.chat-setting input[type="color"]{
  height: 46px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(150, 255, 150, .14);
  background: rgba(4, 11, 21, .96);
}

.chat-setting select{
  height: 46px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(150, 255, 150, .14);
  background: rgba(4, 11, 21, .96);
  color: rgba(228, 255, 228, .92);
  font: inherit;
  outline: 0;
}

.chat-setting.is-disabled{
  opacity: .44;
}

.chat-model-list{
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.chat-model-card{
  padding: 14px;
  border: 1px solid rgba(110, 255, 110, .14);
  background: rgba(4, 9, 4, .86);
}

.chat-model-card-head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.chat-model-card-head strong{
  color: var(--chat-ai-color);
  font-size: 15px;
}

.chat-model-card-head span{
  color: rgba(210, 255, 210, .60);
  font-family: var(--mono);
  font-size: 12px;
}

.chat-model-card-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.chat-model-card-grid label{
  display: block;
  margin-bottom: 4px;
  color: rgba(210, 255, 210, .55);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.chat-model-card-grid p,
.chat-model-card-body{
  margin: 0;
  color: rgba(220, 255, 220, .88);
  line-height: 1.5;
}

.chat-model-card a{
  display: inline-block;
  margin-top: 10px;
  color: #9dc6ff;
  font-size: 12px;
}

.chat-thread{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 10px;
  font-family: var(--mono);
}

.chat-thread-scanline{
  display: none;
}

.chat-thread-inner{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-empty{
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
  min-height: 240px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: rgba(210, 255, 210, .82);
  font-family: var(--mono);
}

.chat-empty strong{
  font-size: 22px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chat-empty span{
  max-width: 760px;
  line-height: 1.7;
}

.chat-message{
  width: 100%;
  padding: 2px 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--mono);
}

.chat-message.is-user{
  border-left: 0;
  box-shadow: none;
}

.chat-message.is-assistant{
  border-left: 0;
  box-shadow: none;
}

.chat-message-role{
  display: inline-block;
  margin: 0 8px 0 0;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 900;
}

.chat-message.is-user .chat-message-role{
  color: var(--chat-user-name-color, var(--chat-user-color));
}

.chat-message.is-assistant .chat-message-role{
  color: var(--chat-ai-name-color, var(--chat-ai-color));
}

.chat-message.is-user .chat-message-body{
  color: var(--chat-user-color);
}

.chat-message.is-assistant .chat-message-body{
  color: var(--chat-ai-color);
}

.chat-message-body{
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  text-shadow: none;
}

.chat-markdown{
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.chat-markdown > * + *{
  margin-top: 12px;
}

.chat-markdown p{
  margin: 0;
  color: inherit;
}

.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4{
  margin: 14px 0 8px;
  color: inherit;
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0;
}

.chat-markdown h1{
  font-size: 22px;
}

.chat-markdown h2{
  font-size: 19px;
}

.chat-markdown h3{
  font-size: 17px;
}

.chat-markdown h4{
  font-size: 15px;
}

.chat-markdown h1:first-child,
.chat-markdown h2:first-child,
.chat-markdown h3:first-child,
.chat-markdown h4:first-child{
  margin-top: 0;
}

.chat-markdown ul,
.chat-markdown ol{
  margin: 0;
  padding-left: 22px;
}

.chat-markdown li + li{
  margin-top: 4px;
}

.chat-markdown blockquote{
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid rgba(141, 255, 141, .36);
  background: rgba(141, 255, 141, .05);
  color: inherit;
}

.chat-markdown hr{
  height: 1px;
  border: 0;
  background: rgba(141, 255, 141, .18);
}

.chat-markdown a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chat-markdown code{
  padding: 2px 5px;
  border: 1px solid rgba(141, 255, 141, .18);
  background: rgba(0, 0, 0, .32);
  color: #f2fff2;
  font: 12px/1.5 var(--mono);
}

.chat-code-block{
  margin: 12px 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(141, 255, 141, .18);
  background: rgba(0, 0, 0, .40);
}

.chat-code-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(141, 255, 141, .14);
  background: rgba(141, 255, 141, .06);
  color: rgba(230, 255, 230, .72);
  font: 11px/1 var(--mono);
}

.chat-code-head span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.chat-code-copy{
  flex: 0 0 auto;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(141, 255, 141, .20);
  border-radius: 6px;
  background: rgba(0, 0, 0, .22);
  color: rgba(230, 255, 230, .86);
  font: 11px/1 var(--mono);
  cursor: pointer;
}

.chat-code-copy:hover{
  border-color: rgba(141, 255, 141, .40);
}

.chat-code-block pre{
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  color: #eaffea;
  font: 13px/1.55 var(--mono);
  white-space: pre;
}

.chat-code-block pre code{
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.chat-token-keyword{
  color: #7dd3fc;
}

.chat-token-string{
  color: #bef264;
}

.chat-token-comment{
  color: #7f8c7f;
  font-style: italic;
}

.chat-token-number{
  color: #f9a8d4;
}

.chat-token-function{
  color: #fde68a;
}

.chat-token-tag{
  color: #fda4af;
}

.chat-token-attr{
  color: #c4b5fd;
}

.chat-message-asset{
  display: block;
  width: fit-content;
  max-width: min(360px, 100%);
  margin: 8px 0 10px;
  border: 1px solid rgba(110, 255, 110, .16);
  background: rgba(3, 6, 3, .94);
}

.chat-message-asset img{
  display: block;
  max-width: 100%;
  height: auto;
}

.chat-message-asset-meta{
  padding: 6px 8px;
  color: rgba(210, 255, 210, .72);
  font-size: 11px;
  font-family: var(--mono);
}

.chat-typing{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.chat-typing span{
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  background: var(--chat-ai-color);
  opacity: .35;
  animation: chatTypingBounce 1s ease-in-out infinite;
}

.chat-typing span:nth-child(2){
  animation-delay: .16s;
}

.chat-typing span:nth-child(3){
  animation-delay: .32s;
}

@keyframes chatTypingBounce{
  0%, 80%, 100%{
    transform: translateY(0) scale(.9);
    opacity: .28;
  }
  40%{
    transform: translateY(-5px) scale(1);
    opacity: 1;
  }
}

.chat-form{
  padding: 12px 24px 18px;
  border-top: 1px solid rgba(110, 255, 110, .14);
  background: linear-gradient(180deg, rgba(10,14,10,.72), rgba(6,10,6,.96));
}

.chat-attachment-preview{
  min-width: 0;
}

.chat-dropzone{
  position: absolute;
  inset: 0;
  padding: 0;
  border: 1px dashed rgba(141, 255, 141, .34);
  background: rgba(141, 255, 141, .04);
  z-index: 3;
  pointer-events: none;
}

.chat-attachment-card{
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(110, 255, 110, .18);
  background: rgba(3, 6, 3, .96);
  font-family: var(--mono);
}

.chat-attachment-glyph{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(110, 255, 110, .22);
  color: var(--chat-ai-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, .22);
}

.chat-attachment-card img{
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid rgba(110, 255, 110, .2);
}

.chat-attachment-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
}

.chat-attachment-copy strong{
  color: #e7ffe7;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chat-attachment-copy span{
  color: rgba(150, 255, 150, .54);
  font-size: 11px;
}

.chat-form textarea{
  border: 1px solid rgba(110, 255, 110, .18);
  background: rgba(3, 6, 3, .96);
  color: #eaffea;
  box-shadow: none;
  font-family: var(--mono);
}

.chat-form textarea::placeholder{
  color: rgba(150, 255, 150, .32);
}

.chat-composer-box{
  position: relative;
  border-radius: 0;
  border: 1px solid rgba(110, 255, 110, .16);
  background: rgba(3, 6, 3, .98);
  overflow: hidden;
}

.chat-composer-box.is-dragover{
  box-shadow: inset 0 0 0 1px rgba(141, 255, 141, .28);
}

.chat-composer-main{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 10px;
}

.chat-composer-input-row{
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.chat-composer-control-row{
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-prompt-mark{
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--chat-ai-color);
  text-shadow: 0 0 12px var(--chat-ai-glow);
  font-family: var(--mono);
  font-weight: 900;
  font-size: 18px;
}

.chat-composer-plus{
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(110, 255, 110, .18);
  background: rgba(0, 0, 0, .12);
  color: var(--chat-ai-color);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.chat-composer-plus:hover{
  border-color: rgba(141, 255, 141, .34);
}

.chat-composer-model-select{
  min-width: 112px;
  max-width: 170px;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(110, 255, 110, .18);
  background: rgba(0, 0, 0, .12);
  color: #dff6d2;
  font: 12px/1 var(--mono);
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(223, 246, 210, .78) 50%),
    linear-gradient(135deg, rgba(223, 246, 210, .78) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 11px,
    calc(100% - 9px) 11px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.chat-form textarea{
  min-height: 84px;
  resize: none;
  border: 0;
  padding: 0;
  background: transparent;
  outline: 0;
  border-radius: 0;
  overflow-y: hidden;
  line-height: 1.6;
  display: block;
  width: 100%;
}

.chat-statusline{
  margin-top: 10px;
  color: rgba(150, 255, 150, .62);
  font-size: 12px;
  font-family: var(--mono);
}

.chat-settings-popover.is-chatgpt-theme{
  border: 1px solid rgba(18, 42, 76, .10);
  border-radius: 24px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 30px 80px rgba(19, 38, 68, .16);
}

.chat-settings-popover.is-chatgpt-theme .chat-settings-head strong{
  color: var(--text);
}

.chat-settings-popover.is-chatgpt-theme .chat-theme-note,
.chat-settings-popover.is-chatgpt-theme .chat-setting{
  color: var(--muted);
}

.chat-settings-popover.is-chatgpt-theme .chat-setting input[type="color"],
.chat-settings-popover.is-chatgpt-theme .chat-setting select{
  border-color: var(--border);
  background: rgba(247, 250, 255, .94);
  color: var(--text);
}

.chat-terminal-shell[data-chat-theme="chatgpt"]{
  background:
    radial-gradient(circle at top left, rgba(76, 145, 255, .10), transparent 28%),
    radial-gradient(circle at top right, rgba(36, 201, 255, .10), transparent 24%),
    linear-gradient(180deg, #eff5ff 0%, #f7faff 40%, #f3f7fc 100%);
}

.chat-terminal-shell[data-chat-theme="chatgpt"].is-dragover{
  box-shadow: inset 0 0 0 1px rgba(34, 114, 255, .22);
}

.chat-terminal-shell[data-chat-theme="chatgpt"]::before{
  display: none;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-thread{
  padding: 28px 0 12px;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-thread-inner{
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 24px;
  gap: 18px;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-empty{
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-empty strong{
  color: var(--text);
  letter-spacing: -.03em;
  text-transform: none;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message{
  padding: 0;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message.is-user{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message.is-assistant{
  padding: 18px 20px;
  border-radius: 28px;
  border: 1px solid rgba(18, 42, 76, .08);
  background: rgba(255,255,255,.76);
  box-shadow: 0 18px 50px rgba(29, 58, 96, .08);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message.is-user .chat-message-role{
  display: none;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message.is-assistant .chat-message-role{
  display: block;
  margin: 0 0 10px;
  color: rgba(18, 36, 65, .50);
  letter-spacing: .08em;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message-body{
  display: block;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-markdown h1,
.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-markdown h2,
.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-markdown h3,
.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-markdown h4{
  color: #14223b;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-markdown blockquote{
  border-left-color: rgba(18, 42, 76, .18);
  background: rgba(18, 42, 76, .04);
  color: rgba(18, 36, 65, .76);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-markdown hr{
  background: rgba(18, 42, 76, .10);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-markdown code{
  border-color: rgba(18, 42, 76, .10);
  background: rgba(18, 42, 76, .06);
  color: #14223b;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-code-block{
  border-color: rgba(18, 42, 76, .10);
  border-radius: 8px;
  background: #101828;
  box-shadow: 0 12px 28px rgba(29, 58, 96, .08);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-code-head{
  border-bottom-color: rgba(255, 255, 255, .10);
  background: #1b2537;
  color: rgba(246, 249, 255, .70);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-code-copy{
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(246, 249, 255, .88);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-code-block pre{
  color: #eef5ff;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-code-block pre code{
  border: 0;
  background: transparent;
  color: inherit;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-token-keyword{
  color: #93c5fd;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-token-string{
  color: #86efac;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-token-comment{
  color: #94a3b8;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-token-number{
  color: #f0abfc;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-token-function{
  color: #fde68a;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-token-tag{
  color: #fda4af;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-token-attr{
  color: #c4b5fd;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message.is-user .chat-message-body{
  width: min(100%, 760px);
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(18, 42, 76, .08);
  background: linear-gradient(180deg, rgba(245,248,253,.98), rgba(235,241,250,.98));
  color: var(--text);
  box-shadow: 0 14px 32px rgba(29, 58, 96, .06);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message.is-assistant .chat-message-body{
  color: #1d2c49;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message-asset{
  margin: 0 0 12px;
  border-radius: 18px;
  border: 1px solid rgba(18, 42, 76, .10);
  background: rgba(255,255,255,.96);
  overflow: hidden;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-message-asset-meta{
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-typing span{
  background: rgba(18, 36, 65, .44);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-form{
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(18, 42, 76, .08);
  background: linear-gradient(180deg, rgba(246,250,255,.82), rgba(243,247,252,.96));
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-form > *{
  width: min(100%, 980px);
  margin-left: auto;
  margin-right: auto;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-dropzone{
  inset: 0;
  border-radius: 20px;
  border-color: rgba(34, 114, 255, .22);
  background: rgba(34, 114, 255, .04);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-attachment-card{
  border-radius: 18px;
  border-color: rgba(18, 42, 76, .10);
  background: rgba(255,255,255,.96);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  box-shadow: 0 12px 28px rgba(29, 58, 96, .06);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-attachment-glyph{
  border-radius: 12px;
  border-color: rgba(34, 114, 255, .14);
  background: rgba(34, 114, 255, .08);
  color: var(--accent);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-attachment-card img{
  border-color: rgba(18, 42, 76, .08);
  border-radius: 12px;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-attachment-copy{
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-attachment-copy strong{
  color: var(--text);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-attachment-copy span{
  color: var(--muted);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-composer-box{
  border-radius: 28px;
  border: 1px solid rgba(18, 42, 76, .10);
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 48px rgba(29, 58, 96, .08);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-composer-main{
  padding: 14px 18px 12px;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-composer-input-row{
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-prompt-mark{
  display: none;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-composer-control-row{
  gap: 8px;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-composer-plus{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border-color: rgba(18, 42, 76, .08);
  background: rgba(244, 247, 252, .76);
  color: var(--accent);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 20px;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-composer-model-select{
  min-width: 108px;
  max-width: 150px;
  height: 30px;
  padding: 0 26px 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(18, 42, 76, .08);
  background: rgba(244, 247, 252, .76);
  color: rgba(18, 36, 65, .88);
  font: 12px/1 "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(18, 36, 65, .58) 50%),
    linear-gradient(135deg, rgba(18, 36, 65, .58) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 11px,
    calc(100% - 9px) 11px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-form textarea{
  min-height: 54px;
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-form textarea::placeholder{
  color: rgba(18, 36, 65, .40);
}

.chat-terminal-shell[data-chat-theme="chatgpt"] .chat-statusline{
  color: rgba(18, 36, 65, .54);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
}

p{ margin: 0; color: var(--muted); }
.small{ font-size: 13px; color: var(--muted-2); }
.muted{ color: var(--muted); }
.text-error{ color: #b8354f; }

.builder-page{
  display: flex;
  flex-direction: column;
  gap: 0;
  height: calc(100vh - var(--topbar-h));
  min-height: calc(100vh - var(--topbar-h));
  margin: -24px -24px -24px -24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(76, 145, 255, .10), transparent 28%),
    radial-gradient(circle at top right, rgba(36, 201, 255, .10), transparent 24%),
    linear-gradient(180deg, #eff5ff 0%, #f7faff 40%, #f3f7fc 100%);
}

.builder-v2-page{
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: calc(100vh - var(--topbar-h));
  margin: -24px;
  padding: 32px;
  overflow: auto;
  background:
    radial-gradient(circle at top left, rgba(40, 133, 255, .12), transparent 30%),
    radial-gradient(circle at top right, rgba(3, 226, 193, .10), transparent 26%),
    linear-gradient(180deg, #f2f7ff 0%, #f7fbff 38%, #edf4ff 100%);
}

.builder-v2-hero{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .9fr);
  gap: 24px;
  align-items: stretch;
}

.builder-v2-hero-copy,
.builder-v2-hero-panel,
.builder-v2-card{
  border: 1px solid rgba(128, 154, 196, .16);
  background: rgba(255,255,255,.78);
  box-shadow: 0 30px 80px rgba(33, 55, 99, .10);
  backdrop-filter: blur(18px);
}

.builder-v2-hero-copy{
  padding: 36px;
}

.builder-v2-eyebrow,
.builder-v2-kicker{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #3b5c8d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.builder-v2-hero-copy h1{
  margin: 0 0 14px;
  color: #16253f;
  font-size: clamp(34px, 5vw, 56px);
  line-height: .98;
  letter-spacing: -.05em;
}

.builder-v2-hero-copy p,
.builder-v2-hero-panel p{
  margin: 0;
  color: #4f6487;
  line-height: 1.7;
}

.builder-v2-hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.builder-v2-hero-panel{
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.builder-v2-status-row{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #16253f;
  font-weight: 700;
}

.builder-v2-status-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #00d892, #00a7e1);
  box-shadow: 0 0 0 6px rgba(0, 216, 146, .12);
}

.builder-v2-checklist,
.builder-v2-roadmap{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.builder-v2-checklist li,
.builder-v2-roadmap li{
  padding: 14px 16px;
  border: 1px solid rgba(128, 154, 196, .14);
  background: rgba(246, 250, 255, .86);
  color: #304768;
}

.builder-v2-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 24px;
}

.builder-v2-card{
  padding: 24px;
}

.builder-v2-card-brief{
  grid-row: span 2;
}

.builder-v2-card-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.builder-v2-card-head h2{
  margin: 0;
  color: #16253f;
  font-size: 28px;
  letter-spacing: -.04em;
}

.builder-v2-badge{
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(128, 154, 196, .16);
  background: rgba(246,250,255,.92);
  color: #55709a;
  font-size: 13px;
  font-weight: 700;
}

.builder-v2-field{
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.builder-v2-field span{
  color: #58729a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.builder-v2-field select,
.builder-v2-field textarea{
  width: 100%;
  border: 1px solid rgba(128, 154, 196, .16);
  background: rgba(247,250,255,.96);
  color: #132540;
  font: inherit;
  outline: 0;
}

.builder-v2-field select{
  height: 52px;
  padding: 0 16px;
}

.builder-v2-field textarea{
  min-height: 220px;
  padding: 16px;
  resize: vertical;
  line-height: 1.7;
}

.builder-v2-pills{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 24px;
}

.builder-v2-pill{
  padding: 12px 14px;
  border: 1px solid rgba(128, 154, 196, .16);
  background: rgba(255,255,255,.88);
  color: #274163;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.builder-v2-pill:hover{
  border-color: rgba(61, 121, 255, .26);
  background: rgba(243, 248, 255, .98);
}

.builder-v2-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.builder-v2-steps{
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 14px;
}

.builder-v2-steps li{
  color: #304768;
  line-height: 1.6;
}

.builder-v2-steps strong{
  display: block;
  margin-bottom: 4px;
  color: #16253f;
}

.builder-v2-stack{
  display: grid;
  gap: 12px;
}

.builder-v2-stack div{
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid rgba(128, 154, 196, .14);
}

.builder-v2-stack div:first-child{
  border-top: 0;
  padding-top: 0;
}

.builder-v2-stack strong{
  color: #3c67b0;
  font-size: 20px;
}

.builder-v2-stack span{
  display: block;
  color: #16253f;
  font-weight: 800;
  margin-bottom: 4px;
}

.builder-v2-stack em{
  display: block;
  color: #58729a;
  font-style: normal;
  line-height: 1.6;
}

@media (max-width: 1100px){
  .builder-v2-hero,
  .builder-v2-grid{
    grid-template-columns: 1fr;
  }

  .builder-v2-card-brief{
    grid-row: auto;
  }
}

.builder-finder{
  --builder-sidebar-width: 260px;
  --builder-editor-width: 420px;
  display: grid;
  grid-template-columns: var(--builder-sidebar-width) 8px minmax(320px, 1fr) 8px var(--builder-editor-width);
  gap: 0;
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: rgba(255,255,255,.82);
  box-shadow:
    0 30px 80px rgba(33, 55, 99, .14),
    0 1px 0 rgba(255,255,255,.7) inset;
  position: relative;
  backdrop-filter: blur(18px);
}

.builder-sidebar-pane,
.builder-browser-pane,
.builder-editor-pane{
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(255,255,255,.7);
}

.builder-sidebar-pane{
  background:
    linear-gradient(180deg, rgba(247,250,255,.98), rgba(239,245,255,.95));
  border-right: 1px solid rgba(128, 154, 196, .22);
}

.builder-browser-pane{
  border-right: 1px solid rgba(128, 154, 196, .18);
  min-width: 0;
  background: rgba(255,255,255,.58);
}

.builder-editor-pane{
  background:
    linear-gradient(180deg, rgba(19,26,39,.98), rgba(11,16,27,.99));
}

.builder-editor-pane .builder-finder-toolbar{
  justify-content: space-between;
}

.builder-editor-toolbar{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.builder-editor-view-switch{
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(109, 136, 182, .22);
  background: rgba(255,255,255,.08);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.builder-editor-view-switch button{
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: rgba(219,229,247,.72);
  font: 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 10px;
}

.builder-editor-view-switch button.is-active{
  background: linear-gradient(180deg, #4d8dff, #0a63ff);
  color: #fff;
  box-shadow: 0 8px 20px rgba(10,99,255,.28);
}

.builder-ai-drawer{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 42vw);
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid rgba(125, 150, 190, .2);
  background:
    linear-gradient(180deg, rgba(251,253,255,.96), rgba(242,248,255,.94));
  box-shadow: -24px 0 60px rgba(36, 56, 92, .16);
  z-index: 5;
  backdrop-filter: blur(18px);
}

.builder-ai-drawer[hidden]{
  display: none;
}

.builder-ai-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid rgba(131, 154, 191, .18);
}

.builder-ai-head strong{
  display: block;
  color: #102347;
  font-size: 18px;
  font-weight: 800;
}

.builder-ai-head span{
  display: block;
  margin-top: 4px;
  color: #5f7398;
  font-size: 12px;
}

.builder-ai-meta{
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(131, 154, 191, .14);
  color: #6880a6;
  font-size: 12px;
  font-family: var(--mono);
}

.builder-ai-flow{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(131, 154, 191, .14);
  background: rgba(255,255,255,.38);
}

.builder-ai-flow span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(131, 154, 191, .16);
  background: rgba(255,255,255,.55);
  color: #6f85aa;
  font: 11px/1.2 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.builder-ai-flow span.is-active{
  border-color: rgba(10,99,255,.22);
  background: linear-gradient(180deg, rgba(82,140,255,.16), rgba(10,99,255,.08));
  color: #18428d;
}

.builder-ai-flow span.is-complete{
  border-color: rgba(67,191,112,.18);
  background: rgba(67,191,112,.08);
  color: #2f7f56;
}

.builder-ai-presets{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}

.builder-ai-chip{
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(126, 152, 197, .18);
  background: rgba(255,255,255,.72);
  color: #18305a;
  font: 12px/1 var(--mono);
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(52, 83, 138, .08);
}

.builder-ai-chip:hover{
  border-color: rgba(10,99,255,.24);
  background: rgba(234,243,255,.96);
}

.builder-ai-thread{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.builder-ai-empty{
  padding: 14px;
  border: 1px dashed rgba(128, 154, 196, .28);
  color: #5c739a;
  line-height: 1.7;
  background: rgba(255,255,255,.42);
}

.builder-ai-message{
  padding: 12px 14px;
  border: 1px solid rgba(130, 157, 198, .16);
  background: rgba(255,255,255,.68);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(44, 69, 116, .08);
}

.builder-ai-message.is-user{
  border-color: rgba(10,99,255,.18);
  background: linear-gradient(180deg, rgba(232,242,255,.98), rgba(222,236,255,.9));
}

.builder-ai-message.is-assistant{
  border-color: rgba(130, 157, 198, .14);
  background: rgba(255,255,255,.76);
}

.builder-ai-plan{
  padding: 12px 14px;
  border: 1px solid rgba(130, 157, 198, .16);
  background: rgba(255,255,255,.62);
  border-radius: 18px;
}

.builder-ai-plan ul{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.builder-ai-plan li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(130, 157, 198, .12);
  background: rgba(248,251,255,.94);
  color: #17305d;
  font: 12px/1.5 var(--mono);
  border-radius: 12px;
}

.builder-ai-plan li strong{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.builder-ai-plan li span{
  flex: 0 0 auto;
  color: #7790b5;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
}

.builder-ai-spec{
  padding: 14px;
  border: 1px solid rgba(130, 157, 198, .16);
  background: rgba(255,255,255,.62);
  border-radius: 18px;
}

.builder-ai-spec-grid{
  display: grid;
  gap: 10px;
}

.builder-ai-spec-grid section{
  padding: 10px 12px;
  border: 1px solid rgba(130, 157, 198, .12);
  background: rgba(248,251,255,.94);
  border-radius: 12px;
}

.builder-ai-spec-grid strong{
  display: block;
  margin-bottom: 6px;
  color: #18305a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.builder-ai-spec-grid p,
.builder-ai-spec-grid ul{
  margin: 0;
  color: #4f668f;
  font-size: 12px;
  line-height: 1.65;
}

.builder-ai-spec-grid ul{
  padding-left: 16px;
}

.builder-ai-palette{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.builder-ai-palette-swatch{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px 4px 4px;
  border: 1px solid rgba(130, 157, 198, .14);
  background: rgba(248,251,255,.96);
  color: #17305d;
  font: 11px/1.2 var(--mono);
  border-radius: 999px;
}

.builder-ai-palette-swatch::before{
  content: "";
  width: 18px;
  height: 18px;
  background: var(--swatch, #fff);
  border: 1px solid rgba(255,255,255,.12);
}

.builder-ai-palette-swatch em{
  font-style: normal;
}

.builder-ai-role{
  margin-bottom: 6px;
  color: #6d84ab;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.builder-ai-copy{
  color: #142b52;
  font-size: 13px;
  line-height: 1.65;
}

.builder-ai-form{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(131, 154, 191, .14);
  background: rgba(255,255,255,.42);
}

.builder-ai-form textarea{
  min-height: 110px;
  resize: vertical;
  border: 1px solid rgba(131, 154, 191, .16);
  padding: 12px 14px;
  background: rgba(255,255,255,.9);
  color: #102347;
  font: 13px/1.6 var(--mono);
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}

.builder-ai-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.builder-ai-status{
  color: #6d84ab;
  font-size: 12px;
  font-family: var(--mono);
}

.builder-finder.is-ai-open .builder-editor-pane{
  padding-right: min(420px, 42vw);
}

.builder-focus-exit{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(40,40,40,.92);
  color: rgba(255,255,255,.92);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
}

.builder-focus-exit[hidden]{
  display: none;
}

.builder-splitter{
  position: relative;
  background: rgba(208, 220, 239, .72);
  cursor: col-resize;
}

.builder-splitter::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.42);
}

.builder-splitter:hover::after{
  background: rgba(10,99,255,.24);
}

.builder-finder.is-sidebar-hidden{
  grid-template-columns: minmax(0, 1fr) 8px var(--builder-editor-width);
}

.builder-finder.is-sidebar-hidden .builder-sidebar-pane,
.builder-finder.is-sidebar-hidden .builder-splitter-sidebar{
  display: none;
}

.builder-finder-toolbar{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(128, 154, 196, .18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(243,247,255,.74));
  color: #17305d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.builder-finder-toolbar strong{
  font-size: 14px;
  font-weight: 700;
}

.builder-editor-language{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 6px 10px;
  border: 1px solid rgba(109, 136, 182, .2);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(232,239,251,.82);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.builder-editor-language[data-language="php"]{ color: #b79dff; }
.builder-editor-language[data-language="javascript"]{ color: #ffd166; }
.builder-editor-language[data-language="typescript"]{ color: #7bc3ff; }
.builder-editor-language[data-language="css"]{ color: #7df9ff; }
.builder-editor-language[data-language="html"]{ color: #ff9a76; }
.builder-editor-language[data-language="json"]{ color: #a9e34b; }
.builder-editor-language[data-language="sql"]{ color: #ffb86c; }
.builder-editor-language[data-language="markdown"]{ color: #ff8ad8; }
.builder-editor-language[data-language="shell"]{ color: #82ffaa; }
.builder-editor-language[data-language="python"]{ color: #8ecbff; }

.builder-toolbar-primary{
  margin-left: auto;
}

.builder-sidebar-group{
  padding: 14px 14px 18px;
  overflow: auto;
}

.builder-sidebar-title{
  margin-bottom: 10px;
  color: #6d84ab;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.builder-project-list{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.builder-project-card{
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.5);
  color: #17305d;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(48, 74, 119, .05);
}

.builder-project-card:hover{
  background: rgba(255,255,255,.82);
}

.builder-project-card.is-active{
  background: linear-gradient(180deg, #f0f6ff, #dfeeff);
  color: #0d2a59;
  box-shadow: inset 0 0 0 1px rgba(10,99,255,.18), 0 10px 26px rgba(54, 91, 156, .12);
}

.builder-project-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8cb9ff;
}

.builder-project-card.is-active .builder-project-dot{
  background: #0a63ff;
}

.builder-project-name{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.builder-nav,
.builder-toolbar-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder-pathbar{
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  color: #17305d;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-topbar-tools{
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
}

.builder-topbar-path,
.builder-topbar-file{
  min-width: 0;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  color: #17305d;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(128, 154, 196, .14);
}

.builder-topbar-select{
  min-width: 164px;
  max-width: 210px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(128, 154, 196, .18);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  color: #17305d;
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.builder-topbar-select:focus{
  border-color: rgba(10,99,255,.28);
  background: rgba(255,255,255,.94);
}

.builder-topbar-path{
  flex: 1 1 280px;
  max-width: 420px;
}

.builder-topbar-file{
  flex: 0 1 180px;
  max-width: 220px;
}

.app-topbar.is-chatbar .builder-topbar-tools{
  display: flex;
  overflow-x: auto;
  padding-bottom: 2px;
}

.app-topbar.is-chatbar .builder-topbar-tools::-webkit-scrollbar{
  height: 6px;
}

.builder-path-segment{
  border: 0;
  background: transparent;
  color: #17305d;
  font: inherit;
  font-weight: 600;
  cursor: default;
  padding: 2px 6px;
  border-radius: 8px;
}

.builder-path-segment:hover{
  background: rgba(223,236,255,.85);
}

.builder-path-segment.is-root{
  color: #0d2a59;
}

.builder-path-segment.is-drop-target{
  background: rgba(10, 99, 255, .38);
  box-shadow: inset 0 0 0 1px rgba(140, 185, 255, .55);
}

.builder-path-divider{
  color: #8aa0c2;
}

.builder-list-head{
  display: grid;
  grid-template-columns: minmax(260px, 1.9fr) minmax(160px, 1fr) 110px 110px;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(128, 154, 196, .16);
  background: rgba(244,248,255,.88);
  color: #6f85aa;
  font-size: 12px;
  font-weight: 700;
}

.builder-list{
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: rgba(255,255,255,.56);
}

.builder-list.is-drop-target{
  box-shadow: inset 0 0 0 2px rgba(10, 99, 255, .45);
}

.builder-list-row{
  display: grid;
  grid-template-columns: minmax(260px, 1.9fr) minmax(160px, 1fr) 110px 110px;
  gap: 16px;
  width: 100%;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid rgba(128, 154, 196, .08);
  background: transparent;
  color: #17305d;
  text-align: left;
  cursor: default;
}

.builder-list-row:hover{
  background: rgba(242,247,255,.92);
}

.builder-list-row.is-active{
  background: linear-gradient(180deg, #eaf3ff, #dbeaff);
  color: #0d2a59;
  box-shadow: inset 0 0 0 1px rgba(10,99,255,.14);
}

.builder-list-row.is-drop-target{
  box-shadow: inset 0 0 0 2px rgba(140, 185, 255, .55);
}

.builder-row-name{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: calc(var(--builder-depth, 0) * 22px);
}

.builder-row-icon{
  width: 14px;
  color: #7b93b7;
  text-align: center;
  flex: 0 0 14px;
}

.builder-list-row.is-active .builder-row-icon{
  color: #0a63ff;
}

.builder-row-icon.is-folder{
  cursor: pointer;
  transition: transform .14s ease;
}

.builder-row-icon.is-folder.is-open{
  transform: rotate(90deg);
}

.builder-row-label{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-browser-pane[data-density="no-date"] .builder-list-head,
.builder-browser-pane[data-density="no-date"] .builder-list-row{
  grid-template-columns: minmax(260px, 1.9fr) 110px 110px;
}

.builder-browser-pane[data-density="no-date"] .builder-col-modified{
  display: none;
}

.builder-browser-pane[data-density="no-type"] .builder-list-head,
.builder-browser-pane[data-density="no-type"] .builder-list-row{
  grid-template-columns: minmax(260px, 1.9fr) 110px;
}

.builder-browser-pane[data-density="no-type"] .builder-col-modified,
.builder-browser-pane[data-density="no-type"] .builder-col-kind{
  display: none;
}

.builder-browser-pane[data-density="name-only"] .builder-list-head,
.builder-browser-pane[data-density="name-only"] .builder-list-row{
  grid-template-columns: minmax(0, 1fr);
}

.builder-browser-pane[data-density="name-only"] .builder-col-modified,
.builder-browser-pane[data-density="name-only"] .builder-col-size,
.builder-browser-pane[data-density="name-only"] .builder-col-kind{
  display: none;
}

.builder-workspace{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .92fr);
  flex: 1;
  min-height: 0;
}

.builder-workspace[data-view="code"]{
  grid-template-columns: minmax(0, 1fr);
}

.builder-workspace[data-view="preview"]{
  grid-template-columns: minmax(0, 1fr);
}

.builder-workspace[data-view="code"] .builder-preview-pane,
.builder-workspace[data-view="preview"] .builder-editor-surface{
  display: none;
}

.builder-editor-surface{
  position: relative;
  min-height: 0;
  background:
    radial-gradient(circle at top left, rgba(95, 147, 255, .10), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    #101624;
  border-right: 1px solid rgba(125, 150, 190, .12);
}

.builder-editor-highlight,
.builder-editor-pane textarea{
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  overflow: auto;
  font: 13px/1.65 var(--mono);
  white-space: pre;
  tab-size: 2;
}

.builder-editor-highlight{
  z-index: 1;
  pointer-events: none;
  color: #d8dde7;
  background:
    linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0)),
    #181818;
  scrollbar-width: none;
}

.builder-editor-highlight::-webkit-scrollbar{
  width: 0;
  height: 0;
}

.builder-editor-highlight code{
  display: block;
  min-height: 100%;
}

.builder-editor-measure{
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: normal;
}

.builder-editor-caret-probe{
  display: inline-block;
  width: 1px;
  height: 1.65em;
}

.builder-editor-pane textarea{
  z-index: 2;
  width: 100%;
  background: transparent;
  color: transparent;
  caret-color: #f2f2f2;
  resize: none;
  outline: 0;
  text-shadow: 0 0 0 rgba(0,0,0,0);
}

.builder-editor-pane textarea::selection{
  background: rgba(10, 99, 255, .28);
}

.builder-editor-pane textarea::placeholder{
  color: transparent;
}

.builder-autocomplete{
  position: absolute;
  z-index: 5;
  width: min(320px, calc(100% - 24px));
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(26, 27, 31, .98);
  box-shadow: 0 18px 40px rgba(0,0,0,.32);
  backdrop-filter: blur(18px);
}

.builder-autocomplete[hidden]{
  display: none;
}

.builder-autocomplete-list{
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.builder-autocomplete-item{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.9);
  text-align: left;
  cursor: default;
  font: inherit;
}

.builder-autocomplete-item:hover,
.builder-autocomplete-item.is-active{
  background: rgba(10, 99, 255, .2);
}

.builder-autocomplete-main{
  color: #f3f5fb;
  font-size: 13px;
  font-weight: 700;
}

.builder-autocomplete-detail{
  color: rgba(255,255,255,.52);
  font-size: 11px;
}

.builder-status{
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(125, 150, 190, .12);
  color: rgba(214,225,244,.62);
  font-size: 12px;
  font-family: var(--mono);
  background: rgba(12, 17, 28, .92);
}

.builder-empty{
  padding: 18px;
  color: #6b81a5;
  font-size: 14px;
  line-height: 1.7;
}

.builder-context-menu{
  position: fixed;
  z-index: 120;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(130, 157, 198, .14);
  border-radius: 16px;
  background: rgba(250,252,255,.94);
  box-shadow: 0 24px 50px rgba(32, 53, 93, .18);
  backdrop-filter: blur(20px);
}

.builder-context-menu button{
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #16305c;
  text-align: left;
  cursor: default;
  font: inherit;
}

.builder-context-menu button:hover{
  background: rgba(235,243,255,.96);
}

.builder-context-menu button[disabled]{
  color: #9aacc8;
}

.builder-context-menu button[disabled]:hover{
  background: transparent;
}

.builder-context-menu .is-danger{
  color: #ff7a7a;
}

.builder-editor-highlight .token-placeholder{
  color: rgba(255,255,255,.34);
}

.builder-editor-highlight .token-comment{
  color: #6e7688;
}

.builder-editor-highlight .token-string{
  color: #a5d6ff;
}

.builder-editor-highlight .token-number{
  color: #ffb86c;
}

.builder-editor-highlight .token-keyword{
  color: #ff86c8;
}

.builder-editor-highlight .token-function{
  color: #82d7ff;
}

.builder-editor-highlight .token-variable{
  color: #ffd580;
}

.builder-editor-highlight .token-tag{
  color: #ff8f70;
}

.builder-editor-highlight .token-attr,
.builder-editor-highlight .token-property{
  color: #8fb6ff;
}

.builder-editor-highlight .token-selector{
  color: #b49bff;
}

.builder-editor-highlight .token-heading{
  color: #f9a8ff;
  font-weight: 700;
}

.builder-editor-highlight .token-link{
  color: #7fc8ff;
  text-decoration: underline;
}

body.is-resizing-builder{
  user-select: none;
  cursor: col-resize;
}

@media (max-width: 1280px){
  .builder-finder{
    grid-template-columns: var(--builder-sidebar-width) 8px minmax(0, 1fr);
  }

  .builder-editor-pane{
    display: none;
  }

  .builder-splitter-editor{
    display: none;
  }

  .builder-finder.is-sidebar-hidden{
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px){
  .builder-finder{
    grid-template-columns: 1fr;
  }

  .builder-sidebar-pane{
    display: none;
  }

  .builder-splitter{
    display: none;
  }

  .builder-list-head,
  .builder-list-row{
    grid-template-columns: minmax(220px, 1.8fr) minmax(120px, .9fr) 90px 80px;
  }
}

hr{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.grid{ display: grid; gap: 14px; }
.form{ margin-top: 18px; max-width: 620px; }

.label{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

input, select, textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

input::placeholder, textarea::placeholder{ color: rgba(15,34,63,.40); }

input:focus, textarea:focus, select:focus{
  border-color: rgba(43,115,255,.34);
  box-shadow: var(--ring);
}

textarea{ min-height: 110px; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(43,115,255,.18);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(43,115,255,.16);
}

.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }

.btn-small,
.up-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.80);
  color: var(--text);
  box-shadow: var(--shadow-2);
}

.btn-link-small{
  text-decoration: none;
}

.btn-link-small.is-disabled{
  opacity: .48;
  pointer-events: none;
}

.builder-preview-pane{
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}

.builder-preview-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(128, 154, 196, .16);
  background: rgba(255,255,255,.72);
}

.builder-preview-head strong{
  color: #17305d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.builder-preview-head span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6f85aa;
  font: 12px/1.4 var(--mono);
}

.builder-preview-pane iframe{
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.btn-danger{
  background: linear-gradient(135deg, rgba(220,85,113,.95), rgba(241,118,142,.88));
  border: 1px solid rgba(220,85,113,.18);
  color: #fff;
}

button:disabled{
  opacity: .48;
  cursor: not-allowed;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.76);
  color: rgba(15,34,63,.82);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(29,58,96,.05);
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(43,115,255,.10);
}

.error{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(220,85,113,.20);
  background: rgba(255,240,244,.95);
  color: #a22f48;
  font-weight: 800;
}

.notice{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  margin: 12px 0;
}

.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.table th, .table td{
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(18,42,76,.08);
  font-size: 14px;
}

.table th{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: rgba(239,245,252,.92);
}

.table tr:last-child td{ border-bottom: 0; }

div[style*="display:grid"]{
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(18,42,76,.08);
  background: rgba(255,255,255,.44);
  box-shadow: 0 10px 24px rgba(29,58,96,.04);
}

.thumbs,
.job-thumbs,
.job-thumbs-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbs .thumb img,
.job-thumb img,
.job-thumb2 img{
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow-2);
}

.job-progress{
  margin-top: 8px;
  min-width: 180px;
}

.job-progress-large{
  max-width: 520px;
  margin-bottom: 16px;
}

.job-progress-bar{
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(18,42,76,.10);
  border: 1px solid rgba(18,42,76,.08);
}

.job-progress-bar span{
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(34,114,255,.18);
}

.job-progress-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

.thumbs .thumb img{
  width: 88px;
  height: 88px;
  object-fit: cover;
}

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.gallery-item{
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(245,249,254,.76));
  color: inherit;
  box-shadow: var(--shadow-2);
}

.gallery-item:hover{ transform: translateY(-2px); }

.gallery-link{
  display: block;
  color: inherit;
}

.gallery-item img{
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.gallery-meta{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
}

.gallery-delete-form{
  padding: 0 10px 10px;
  margin: 0;
}

.gallery-delete-btn{
  width: 100%;
  border: 1px solid rgba(220,85,113,.18);
  border-radius: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(220,85,113,.95), rgba(241,118,142,.88));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.job-header{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.job-header-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.job-images{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.job-image,
.job-hero,
.job-thumb2{
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.80);
  box-shadow: var(--shadow-2);
}

.job-image img,
.job-hero img{
  width: 100%;
  height: auto;
  display: block;
}

.job-thumb img{
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.job-thumb2 img{
  width: 84px;
  height: 84px;
  object-fit: cover;
}

.mono-box{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kv{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kv > div{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
}

.up-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.up-grid2{
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 16px;
}

.up-card{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-2);
}

.up-card h2{
  margin: 0 0 10px;
  font-size: 16px;
}

.up-muted,
.up-preview-hint,
.up-status{
  color: var(--muted);
  font-size: 13px;
}

.up-preview{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(500px 300px at 30% 20%, rgba(43,115,255,.10), transparent 60%),
    radial-gradient(500px 300px at 75% 70%, rgba(18,184,214,.10), transparent 55%),
    rgba(240,246,253,.84);
  display: flex;
  align-items: center;
  justify-content: center;
}

.up-preview img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.up-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.up-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  flex: 1;
}

.up-field label{
  font-size: 12px;
  color: var(--muted);
}

.up-field input,
.up-field select,
.up-field textarea{
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
}

.up-field textarea{
  min-height: 70px;
  resize: vertical;
}

.up-details{
  border-top: 1px solid rgba(18,42,76,.08);
  margin-top: 12px;
  padding-top: 12px;
}

.up-details summary{
  cursor: pointer;
  font-weight: 650;
}

.up-imggrid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.up-thumb{
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: rgba(255,255,255,.66);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-2);
}

.up-thumb img{
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.up-thumb.selected{
  border-color: rgba(43,115,255,.84);
  box-shadow: 0 0 0 4px rgba(43,115,255,.10), var(--shadow-2);
}

.up-thumb .up-meta{
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  background: rgba(255,255,255,.90);
  color: var(--text);
  padding: 4px 6px;
  border-radius: 8px;
}

.up-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.up-chip{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(15,34,63,.82);
}

.up-chip.active{
  background: linear-gradient(135deg, rgba(43,115,255,.12), rgba(18,184,214,.08));
  border-color: rgba(43,115,255,.16);
  box-shadow: 0 0 0 4px rgba(43,115,255,.08);
}

.up-upload{
  border: 1px dashed rgba(18,42,76,.18);
  border-radius: 12px;
  padding: 12px;
  background: rgba(249,252,255,.72);
}

.dashboard-builder-page,
.dashboard-settings-page{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-builder-hero{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.dashboard-builder-copy{
  max-width: 760px;
}

.dashboard-builder-copy p{
  max-width: 760px;
  font-size: 15px;
  line-height: 1.7;
}

.dashboard-builder-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.settings-subnav{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.settings-subnav-link{
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-2);
}

.settings-subnav-link.is-active{
  border-color: rgba(43,115,255,.34);
  background: linear-gradient(135deg, rgba(43,115,255,.10), rgba(18,184,214,.08));
}

.dashboard-library-card,
.dashboard-settings-card,
.dashboard-widget-shell,
.dashboard-editor-footer{
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(580px 320px at 0% 0%, rgba(34,114,255,.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.84), rgba(247,250,255,.78));
  box-shadow: var(--shadow);
}

.dashboard-toolbar-counts{
  color: var(--muted);
  font-size: 14px;
}

.dashboard-editor-status{
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-editor-status[data-tone="pending"]{
  color: #1d63d5;
}

.dashboard-editor-status[data-tone="success"]{
  color: var(--ok);
}

.dashboard-editor-status[data-tone="error"]{
  color: var(--danger);
}

.dashboard-library-card{
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.dashboard-library-card[hidden]{
  display: none !important;
}

.dashboard-library-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-library-head p{
  max-width: 440px;
  color: var(--muted);
}

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

.dashboard-library-item{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px dashed rgba(24,48,88,.18);
  background: rgba(255,255,255,.74);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.dashboard-library-item strong{
  font-size: 17px;
}

.dashboard-library-item span{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-library-item em{
  color: #1d63d5;
  font-style: normal;
  font-weight: 800;
}

.dashboard-editor-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
}

.dashboard-editor-footer-meta{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-editor-footer-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-widget-grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: 10px;
  gap: 16px;
  align-items: start;
}

.dashboard-widget{
  min-width: 0;
}

.dashboard-widget--compact{
  grid-column: span 3;
}

.dashboard-widget--small{
  grid-column: span 4;
}

.dashboard-widget--medium,
.dashboard-widget--wide{
  grid-column: span 6;
}

.dashboard-widget--large,
.dashboard-widget--full{
  grid-column: span 8;
}

.dashboard-widget-shell{
  padding: 20px;
  height: 100%;
}

.dashboard-widget-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-widget-head h2{
  margin: 6px 0 0 0;
  font-size: 24px;
  line-height: 1.15;
}

.dashboard-widget-controls{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}

.dashboard-widget-size-controls{
  display: inline-grid;
  grid-template-columns: 30px minmax(58px, auto) 30px repeat(4, 26px);
  gap: 4px;
  align-items: center;
}

.dashboard-widget-size-step,
.dashboard-widget-size-preset{
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.74);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-2);
}

.dashboard-widget-size-text{
  min-width: 58px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,.56);
}

.dashboard-widget-size-preset.is-active{
  border-color: rgba(34,114,255,.34);
  background: linear-gradient(135deg, rgba(34,114,255,.18), rgba(10,182,216,.10));
  color: var(--accent);
}

.dashboard-widget--compact .dashboard-welcome-widget,
.dashboard-widget--small .dashboard-welcome-widget,
.dashboard-widget--compact .dashboard-pill-grid,
.dashboard-widget--small .dashboard-pill-grid,
.dashboard-widget--compact .dashboard-metric-grid,
.dashboard-widget--small .dashboard-metric-grid,
.dashboard-widget--compact .dashboard-quick-stats{
  grid-template-columns: 1fr;
}

.dashboard-widget--medium .dashboard-metric-grid,
.dashboard-widget--large .dashboard-metric-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-widget--compact .dashboard-weather-days,
.dashboard-widget--small .dashboard-weather-days{
  grid-template-columns: 1fr;
}

.dashboard-widget--compact .dashboard-news-item,
.dashboard-widget--small .dashboard-news-item{
  flex-direction: column;
}

.dashboard-widget--compact .dashboard-news-thumb,
.dashboard-widget--small .dashboard-news-thumb{
  width: 100%;
  min-width: 0;
  flex-basis: auto;
  height: 112px;
  max-height: 132px;
}

.dashboard-builder-page.is-editing .dashboard-widget-controls{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dashboard-widget-drag-handle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px dashed rgba(24,48,88,.18);
  background: rgba(255,255,255,.74);
  color: var(--muted-2);
  font-weight: 900;
  letter-spacing: .18em;
}

.dashboard-builder-page.is-editing .dashboard-widget{
  cursor: grab;
}

.dashboard-builder-page.is-editing .dashboard-widget-shell{
  box-shadow: 0 0 0 2px rgba(43,115,255,.08), var(--shadow);
}

.dashboard-widget.is-dragging{
  opacity: .64;
}

.dashboard-widget-body{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-welcome-widget{
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .9fr);
  gap: 16px;
}

.dashboard-welcome-card,
.dashboard-mini-stat,
.dashboard-pill-card,
.dashboard-highlight-card,
.dashboard-metric-card,
.dashboard-stat-row,
.dashboard-job-row{
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,.70);
  box-shadow: 0 12px 30px rgba(31,55,90,.05);
}

.dashboard-welcome-card{
  padding: 18px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-welcome-card h3{
  margin: 8px 0 0 0;
  font-size: 34px;
  letter-spacing: -.04em;
}

.dashboard-welcome-card p{
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.dashboard-welcome-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-quick-stats{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-mini-stat{
  min-height: 108px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-mini-stat span,
.dashboard-pill-card span,
.dashboard-highlight-card span,
.dashboard-metric-card span,
.dashboard-stat-row span,
.dashboard-news-item span{
  color: var(--muted);
  font-size: 13px;
}

.dashboard-mini-stat strong{
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.dashboard-pill-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-pill-card,
.dashboard-highlight-card,
.dashboard-stat-row{
  min-height: 98px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-pill-card strong,
.dashboard-highlight-card strong,
.dashboard-stat-row strong{
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.dashboard-widget-form-row{
  margin-top: 4px;
}

.dashboard-stat-stack,
.dashboard-highlight-stack{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-widget-note{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.dashboard-metric-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-metric-card{
  min-height: 158px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-metric-card strong{
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.04em;
}

.dashboard-metric-card small{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-jobs-list,
.dashboard-news-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-weather-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-job-row,
.dashboard-news-item{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  color: var(--text);
  text-decoration: none;
}

.dashboard-job-main,
.dashboard-news-copy{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-job-main strong,
.dashboard-news-copy strong{
  font-size: 16px;
  line-height: 1.45;
}

.dashboard-news-item{
  align-items: stretch;
}

.dashboard-news-thumb{
  display: block;
  flex: 0 0 108px;
  width: 108px;
  min-width: 108px;
  height: 78px;
  max-height: 86px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(214,226,245,.52);
}

.dashboard-news-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-news-copy{
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-job-main span{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.dashboard-job-time{
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
}

.dashboard-empty-state{
  padding: 20px;
  border-radius: 22px;
  border: 1px dashed rgba(24,48,88,.18);
  background: rgba(255,255,255,.64);
}

.dashboard-empty-state strong{
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.dashboard-empty-state p{
  margin: 0 0 14px 0;
  color: var(--muted);
  line-height: 1.65;
}

.dashboard-widget-footer-link a{
  color: #1d63d5;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-weather-card{
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 30px rgba(31,55,90,.05);
  padding: 16px;
}

.dashboard-weather-card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-weather-card-head strong{
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.dashboard-weather-card-head span{
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-weather-days{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.dashboard-weather-day{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(248,251,255,.92);
}

.dashboard-weather-day span,
.dashboard-weather-day small{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-weather-day strong{
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.dashboard-weather-day em{
  font-style: normal;
  color: var(--text);
  font-weight: 800;
}

.dashboard-settings-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .85fr);
  gap: 16px;
  align-items: start;
}

.dashboard-settings-section{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-settings-section-head h2{
  margin: 6px 0 0 0;
}

.dashboard-settings-card{
  padding: 22px;
}

.dashboard-settings-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.dashboard-settings-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-top: 18px;
}

.dashboard-field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-field span{
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-settings-feed-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.dashboard-feed-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 108px auto;
  gap: 12px;
  align-items: end;
}

.dashboard-location-row{
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-field-url{
  min-width: 0;
}

.dashboard-feed-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.70);
  font-weight: 700;
}

.dashboard-feed-toggle input[type="hidden"]{
  display: none;
}

.dashboard-settings-actions{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.dashboard-settings-hint{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dashboard-settings-preview{
  min-height: 100%;
}

.terminal-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.terminal-grid--wide{
  align-items: start;
}

.terminal-panel{
  min-width: 0;
}

.terminal-chip-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.terminal-inline-form{
  margin: 0;
}

.terminal-pill-button{
  cursor: pointer;
}

.terminal-note{
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.minecraft-detail-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.minecraft-detail-grid div{
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(128, 154, 196, .14);
  background: rgba(247,250,255,.72);
}

.minecraft-detail-grid strong{
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.minecraft-detail-grid span{
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.minecraft-flash{
  margin-bottom: 4px;
}

.minecraft-control-row{
  align-items: center;
}

.minecraft-player-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.minecraft-player-card{
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(18,42,76,.12);
  background: rgba(248,250,255,.84);
}

.minecraft-player-head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.minecraft-player-head strong{
  color: var(--text);
  font-size: 18px;
}

.minecraft-player-head span{
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.minecraft-player-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.minecraft-properties-editor{
  width: 100%;
  min-height: 320px;
  padding: 16px;
  border: 1px solid rgba(18,42,76,.12);
  border-radius: 16px;
  background: rgba(9,16,28,.98);
  color: #d4e4ff;
  font: 13px/1.65 var(--mono);
  resize: vertical;
  outline: 0;
  box-sizing: border-box;
}

.minecraft-modal{
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.minecraft-modal[hidden]{
  display: none;
}

.minecraft-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 24, .58);
  backdrop-filter: blur(8px);
}

.minecraft-modal-panel{
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: min(86vh, 980px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(128, 154, 196, .18);
  background: rgba(245, 249, 255, .98);
  box-shadow: 0 34px 90px rgba(14, 24, 42, .28);
}

.minecraft-modal-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.minecraft-modal-head h2{
  margin: 2px 0 0;
  color: var(--text);
  font-size: 24px;
  letter-spacing: -.03em;
}

.minecraft-modal-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.minecraft-admin-page .dashboard-stack{
  gap: 18px;
}

.minecraft-admin-page{
  --mc-grass: #63a34d;
  --mc-grass-dark: #457735;
  --mc-dirt: #6d4c33;
  --mc-dirt-dark: #4c3423;
  --mc-stone: #2f353d;
  --mc-stone-soft: #3b424d;
  --mc-obsidian: #10151d;
  --mc-obsidian-2: #171e28;
  --mc-gold: #f0c35a;
  --mc-red: #d36d52;
  --mc-text: #ecf2e9;
  --mc-muted: #a8b59f;
  background:
    linear-gradient(180deg, rgba(246,250,255,.72), rgba(234,241,251,.82)),
    linear-gradient(180deg, rgba(28, 55, 24, .16), rgba(57, 37, 20, .2)),
    url("assets/images.jpeg");
  background-size: auto, auto, 240px 240px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: center top, center top, left top;
  background-attachment: fixed;
}

.minecraft-admin-page .card-inner{
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(240,245,251,.82)),
    linear-gradient(180deg, rgba(27, 55, 23, .08), rgba(75, 50, 29, .1)),
    url("assets/images.jpeg");
  background-size: auto, auto, 200px 200px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: center top, center top, left top;
}

.minecraft-page-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.minecraft-page-title h1{
  margin: 4px 0 0;
  color: #152844;
  font-size: 30px;
  letter-spacing: -.03em;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
}

.minecraft-page-badges{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.minecraft-log-panel{
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(26,34,24,.5);
  border-radius: 0;
  box-shadow:
    0 18px 36px rgba(43, 55, 80, .14),
    inset 0 1px 0 rgba(255,255,255,.03);
  background:
    linear-gradient(180deg, rgba(21,27,35,.99), rgba(13,18,24,.995));
}

.minecraft-log-panel{
  border-radius: 18px !important;
}

.minecraft-log-head{
  border-radius: 18px 18px 0 0 !important;
}

.minecraft-terminal{
  border-radius: 0 0 18px 18px !important;
}

.minecraft-log-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 3px solid rgba(90, 60, 39, .75);
  background:
    linear-gradient(180deg, rgba(103, 164, 80, .92) 0 26%, rgba(85, 61, 42, .98) 26% 100%);
}

.minecraft-log-head .section-kicker{
  color: rgba(238, 247, 231, .82);
  text-shadow: 0 1px 0 rgba(0,0,0,.24);
}

.minecraft-log-head h2{
  margin: 2px 0 0;
  color: #f5f8f0;
  font-size: 18px;
  letter-spacing: -.02em;
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
}

.minecraft-log-meta{
  color: rgba(173, 196, 230, .74);
  font-size: 12px;
  font-family: var(--mono);
}

.minecraft-terminal{
  min-height: 320px;
  max-height: 420px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(20,27,36,.94), rgba(13,18,24,.98)),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.018) 0 1px,
      transparent 1px 24px
    );
  color: #d6e7ca;
  font-size: 12px;
  line-height: 1.55;
  text-shadow: 0 0 8px rgba(131, 195, 108, .12);
}

.minecraft-stats-grid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.minecraft-stat-card{
  padding: 16px 16px 14px;
  min-height: 0;
  border-radius: 14px;
  border: 1px solid rgba(92, 77, 56, .2);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,239,230,.95));
  box-shadow:
    inset 0 3px 0 rgba(103, 164, 80, .65),
    0 10px 24px rgba(57, 66, 87, .08);
  position: relative;
  overflow: hidden;
}

.minecraft-stat-card::before{
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(33, 45, 33, .18);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.16),
    0 2px 0 rgba(0,0,0,.08);
}

.minecraft-stat-card--rcon::before{
  background:
    linear-gradient(180deg, #71bb5a 0 50%, #4e803d 50% 100%);
}

.minecraft-stat-card--players::before{
  background:
    linear-gradient(180deg, #8fd2ff 0 50%, #578dca 50% 100%);
}

.minecraft-stat-card--process::before{
  background:
    linear-gradient(180deg, #d0d4dc 0 50%, #8d97a7 50% 100%);
}

.minecraft-stat-card--service::before{
  background:
    linear-gradient(180deg, #f0c35a 0 50%, #b98831 50% 100%);
}

.minecraft-stat-card--bridge::before{
  background:
    linear-gradient(180deg, #bf8bff 0 50%, #7856b8 50% 100%);
}

.minecraft-stat-card[data-state="online"],
.minecraft-stat-card[data-state="active"],
.minecraft-stat-card[data-state="running"]{
  box-shadow:
    inset 0 4px 0 rgba(103, 164, 80, .72),
    0 14px 30px rgba(57, 66, 87, .1);
}

.minecraft-stat-card[data-state="offline"],
.minecraft-stat-card[data-state="missing"]{
  box-shadow:
    inset 0 4px 0 rgba(191, 90, 73, .72),
    0 14px 30px rgba(57, 66, 87, .1);
}

.minecraft-stat-card .stat-card-value{
  font-size: 28px;
  color: #17263b;
}

.minecraft-control-grid{
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.minecraft-lower-grid{
  grid-template-columns: minmax(340px, .95fr) minmax(0, 1.05fr);
  gap: 14px;
}

.minecraft-config-grid{
  grid-template-columns: 1fr;
}

.minecraft-overview-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.minecraft-response-console{
  min-height: 220px;
  max-height: 320px;
  font-size: 12px;
  border-radius: 12px;
  border: 1px solid rgba(42, 51, 64, .7);
  background:
    linear-gradient(180deg, rgba(23,30,39,.98), rgba(15,20,27,.99));
  color: #dcebcf;
}

.minecraft-list-columns{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.minecraft-list-box,
.minecraft-world-card,
.minecraft-offline-card,
.minecraft-backup-row{
  border-radius: 12px;
  border: 1px solid rgba(105, 82, 58, .14);
  background: linear-gradient(180deg, rgba(251,248,241,.95), rgba(244,239,229,.98));
}

.minecraft-list-box{
  padding: 12px;
  display: grid;
  gap: 10px;
}

.minecraft-list-box h3{
  margin: 0;
  color: #37492e;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.minecraft-mini-list{
  display: grid;
  gap: 8px;
}

.minecraft-mini-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.minecraft-mini-row span{
  min-width: 0;
  color: #1f2e24;
  font: 12px/1.35 var(--mono);
  word-break: break-word;
}

.minecraft-world-grid,
.minecraft-offline-grid,
.minecraft-backup-list{
  display: grid;
  gap: 12px;
}

.minecraft-world-grid{
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.minecraft-offline-grid{
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.minecraft-world-card,
.minecraft-offline-card{
  display: grid;
  gap: 10px;
  padding: 14px;
}

.minecraft-world-head,
.minecraft-offline-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.minecraft-world-head strong,
.minecraft-offline-head strong{
  color: #17263b;
  font-size: 16px;
}

.minecraft-world-head span,
.minecraft-offline-head span{
  color: #5e7355;
  font: 11px/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.minecraft-world-meta,
.minecraft-world-rules,
.minecraft-offline-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.minecraft-world-meta span,
.minecraft-world-rules span,
.minecraft-offline-meta span{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(103, 164, 80, .1);
  color: #40533a;
  font: 11px/1 var(--mono);
}

.minecraft-backup-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.minecraft-backup-row strong{
  display: block;
  color: #17263b;
  font-size: 14px;
}

.minecraft-backup-row span{
  display: block;
  margin-top: 4px;
  color: #607551;
  font: 11px/1.2 var(--mono);
}

.minecraft-map-frame{
  width: 100%;
  min-height: 360px;
  border: 1px solid rgba(105, 82, 58, .18);
  border-radius: 12px;
  background: rgba(255,255,255,.65);
}

.minecraft-map-page{
  overflow: hidden;
}

.minecraft-map-page .wrap,
.minecraft-map-page .card,
.minecraft-map-page .card-inner{
  height: 100vh;
}

.minecraft-map-page .minecraft-page-stack{
  height: calc(100vh - var(--topbar-h) - 48px);
  min-height: calc(100vh - var(--topbar-h) - 48px);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  margin: 0;
  overflow: hidden;
}

.minecraft-map-page .card-inner{
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.minecraft-map-page-panel{
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  display: flex;
  overflow: hidden;
  padding: 0;
  position: relative;
  border-radius: 28px;
}

.minecraft-map-frame--page{
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  border-radius: 18px;
  display: block;
  border: 0;
}

.minecraft-map-back{
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: inline-flex;
  pointer-events: auto;
}

.minecraft-detail-grid{
  gap: 10px;
}

.minecraft-detail-grid div{
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(105, 82, 58, .14);
  background: linear-gradient(180deg, rgba(251,248,241,.95), rgba(244,239,229,.98));
}

.minecraft-player-card{
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(73, 88, 66, .22);
  background:
    linear-gradient(180deg, rgba(246,250,242,.96), rgba(235,243,228,.98));
  box-shadow: inset 0 2px 0 rgba(104, 168, 80, .45);
}

.minecraft-player-avatar{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 2px solid rgba(64, 89, 58, .26);
  background:
    linear-gradient(180deg, #83c065 0 50%, #5b8d46 50% 100%);
  color: #f4f8ef;
  font: 800 14px/1 var(--mono);
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.14),
    0 2px 0 rgba(0,0,0,.08);
}

.minecraft-player-head-copy{
  min-width: 0;
}

.minecraft-player-head strong{
  font-size: 16px;
  color: #1b2d21;
}

.minecraft-player-head{
  align-items: center;
}

.minecraft-player-head span{
  color: #5e7355;
  font: 11px/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.minecraft-player-summary{
  min-height: 18px;
}

.minecraft-player-summary span{
  color: #617460;
  font: 12px/1.35 var(--mono);
}

.minecraft-admin-page .dashboard-panel,
.minecraft-admin-page .terminal-panel{
  border-radius: 14px;
  border: 1px solid rgba(86, 74, 56, .16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(247,243,236,.96));
  box-shadow: 0 14px 26px rgba(58, 69, 90, .08);
}

.minecraft-admin-page .dashboard-panel-head h2,
.minecraft-admin-page .terminal-panel h2{
  color: #1d2d23;
}

.minecraft-admin-page .section-kicker{
  color: #607551;
  font-family: var(--mono);
  letter-spacing: .12em;
}

.minecraft-admin-page .status-chip{
  border: 1px solid rgba(94, 78, 56, .18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,239,230,.96));
  color: #32492d;
  box-shadow: inset 0 2px 0 rgba(104, 168, 80, .4);
}

.minecraft-admin-page .status-chip .status-dot{
  background: var(--mc-grass);
  box-shadow: 0 0 0 4px rgba(99,163,77,.14);
}

.minecraft-admin-page .btn-small,
.minecraft-admin-page .terminal-pill-button{
  border-radius: 10px;
  border: 1px solid rgba(76, 61, 43, .22);
  background:
    linear-gradient(180deg, #f7f3eb, #eae0cf);
  color: #263622;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.76),
    0 6px 14px rgba(68, 71, 54, .08);
}

.minecraft-admin-page .btn-small:hover,
.minecraft-admin-page .terminal-pill-button:hover{
  background:
    linear-gradient(180deg, #fdf9ef, #f0e5d3);
}

.minecraft-admin-page .terminal-pill-button[data-host-action="stop"]{
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.6),
    0 6px 14px rgba(68, 71, 54, .08),
    inset 0 0 0 999px rgba(211, 109, 82, .12);
}

.minecraft-admin-page .terminal-pill-button[data-host-action="restart"]{
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.6),
    0 6px 14px rgba(68, 71, 54, .08),
    inset 0 0 0 999px rgba(240, 195, 90, .12);
}

.minecraft-admin-page .terminal-command-form input{
  border-radius: 10px;
  border: 1px solid rgba(75, 60, 41, .22);
  background: rgba(255,255,255,.94);
  color: #17263b;
}

.minecraft-admin-page .terminal-note{
  color: #6d785f;
}

.minecraft-admin-page .minecraft-properties-editor{
  border-radius: 12px;
  border: 1px solid rgba(44, 53, 63, .72);
  background:
    linear-gradient(180deg, rgba(22,28,36,.98), rgba(15,20,27,.99));
  color: #ddebd2;
}

.minecraft-admin-page .minecraft-modal-panel{
  border-radius: 14px;
  border: 1px solid rgba(69, 59, 44, .28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,238,229,.98));
}

.minecraft-admin-page .minecraft-modal-head{
  border-bottom: 3px solid rgba(89, 62, 42, .64);
  background:
    linear-gradient(180deg, rgba(103, 164, 80, .95) 0 28%, rgba(88, 63, 42, .98) 28% 100%);
}

.minecraft-admin-page .minecraft-modal-head h2,
.minecraft-admin-page .minecraft-modal-head .section-kicker{
  color: #f2f7ec;
  text-shadow: 0 1px 0 rgba(0,0,0,.18);
}

.minecraft-player-modal-panel{
  width: min(1180px, 100%);
}

.minecraft-player-modal-meta{
  color: #5f735a;
  font: 12px/1.4 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.minecraft-player-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.minecraft-loadout-bar{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.minecraft-loadout-bar select{
  min-width: 220px;
  max-width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(75, 60, 41, .22);
  background: rgba(255,255,255,.94);
  color: #17263b;
}

.minecraft-player-detail-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.minecraft-player-detail-grid div{
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(105, 82, 58, .14);
  background: linear-gradient(180deg, rgba(251,248,241,.95), rgba(244,239,229,.98));
}

.minecraft-player-detail-grid strong{
  color: #54684c;
  font: 11px/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.minecraft-player-detail-grid span{
  color: #17263b;
  font-weight: 700;
}

.minecraft-inventory-split{
  display: grid;
  grid-template-columns: .65fr .3fr 1fr;
  gap: 14px;
}

.minecraft-inventory-section{
  display: grid;
  gap: 10px;
}

.minecraft-inventory-head{
  color: #5d714f;
  font: 12px/1.2 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.minecraft-inventory-grid{
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.minecraft-inventory-grid--compact{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.minecraft-item-slot{
  position: relative;
  min-height: 72px;
  padding: 18px 8px 8px;
  border-radius: 10px;
  border: 1px solid rgba(67, 57, 44, .16);
  background:
    linear-gradient(180deg, rgba(228, 222, 210, .92), rgba(205, 197, 183, .96));
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.45),
    inset 0 -2px 0 rgba(72, 57, 41, .08);
}

.minecraft-item-slot.has-item{
  border-color: rgba(100, 152, 82, .35);
  background:
    linear-gradient(180deg, rgba(244, 247, 236, .98), rgba(221, 234, 208, .98));
}

.minecraft-item-slot.is-selected{
  border-color: rgba(72, 132, 236, .72);
  box-shadow:
    inset 0 0 0 2px rgba(72, 132, 236, .24),
    0 0 0 3px rgba(72, 132, 236, .12);
}

.minecraft-item-slot-index{
  position: absolute;
  top: 6px;
  left: 8px;
  color: rgba(78, 74, 65, .72);
  font: 10px/1 var(--mono);
}

.minecraft-item-slot-body{
  display: grid;
  place-items: center;
  min-height: 40px;
  text-align: center;
}

.minecraft-item-slot-body strong{
  color: #213325;
  font-size: 11px;
  line-height: 1.25;
  text-transform: capitalize;
  word-break: break-word;
}

.minecraft-item-slot-count{
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: #243525;
  font: 700 12px/1 var(--mono);
}

.minecraft-admin-page .wrap,
.minecraft-admin-page .card{
  background: transparent;
}

@media (max-width: 1100px){
  .minecraft-page-head,
  .minecraft-log-head{
    flex-direction: column;
    align-items: flex-start;
  }

  .minecraft-page-badges{
    justify-content: flex-start;
  }

  .minecraft-stats-grid,
  .minecraft-control-grid,
  .minecraft-lower-grid,
  .minecraft-overview-grid{
    grid-template-columns: 1fr;
  }

  .minecraft-list-columns{
    grid-template-columns: 1fr;
  }

  .minecraft-player-detail-grid,
  .minecraft-inventory-split{
    grid-template-columns: 1fr;
  }
}

.terminal-service-form,
.terminal-command-form{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.terminal-service-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.terminal-output-panel{
  display: flex;
  flex-direction: column;
}

.terminal-meta{
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.terminal-console{
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(18,42,76,.14);
  background: rgba(11,20,35,.96);
  color: #d9e4f7;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-attempts{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.terminal-attempt{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.64);
}

.terminal-attempt code{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}

.terminal-attempt span{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.terminal-empty-state{
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(24,48,88,.18);
  background: rgba(255,255,255,.64);
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 1180px){
  .dashboard-widget--compact,
  .dashboard-widget--small{
    grid-column: span 6;
  }

  .dashboard-widget--medium,
  .dashboard-widget--wide{
    grid-column: span 6;
  }

  .dashboard-widget--large,
  .dashboard-widget--full{
    grid-column: span 8;
  }

  .dashboard-settings-layout{
    grid-template-columns: 1fr;
  }

  .terminal-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px){
  .up-grid2{ grid-template-columns: 1fr; }

  .hero-panel{
    grid-template-columns: 1fr;
  }

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

  .panel-grid{
    grid-template-columns: 1fr;
  }

  .dashboard-metric-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px){
  .card-inner{
    padding: calc(var(--topbar-h) + 18px) 16px 16px;
  }

  .app-topbar{
    left: 0;
    padding: 0 16px;
  }

  .sidebar-toggle{
    display: inline-block;
  }

  .app-sidebar{
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: 0 18px 60px rgba(29,58,96,.18);
  }

  .app-sidebar.is-open{
    transform: translateX(0);
  }

  .chat-page{
    height: calc(100vh - var(--topbar-h));
    margin: -18px -16px -16px -16px;
  }

  .chat-topbar-tools{
    gap: 8px;
    overflow-x: auto;
  }

  .chat-shell-page.chat-fullscreen .chat-page{
    margin: 0;
  }
}

@media (max-width: 900px){
  .page-head,
  .section-head,
  .dashboard-builder-hero,
  .dashboard-library-head,
  .dashboard-editor-footer,
  .dashboard-settings-head{
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-main{
    grid-template-columns: 1fr;
  }

  .stats-grid{
    grid-template-columns: 1fr 1fr;
  }

  .panel-pill-grid{
    grid-template-columns: 1fr;
  }

  .dashboard-welcome-widget,
  .dashboard-settings-grid{
    grid-template-columns: 1fr;
  }

  .dashboard-feed-row{
    grid-template-columns: 1fr;
  }

  .dashboard-location-row{
    grid-template-columns: 1fr;
  }

  .terminal-service-grid{
    grid-template-columns: 1fr;
  }

  .dashboard-settings-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-editor-footer-actions{
    width: 100%;
    justify-content: flex-start;
  }

  div[style*="grid-template-columns: repeat(4"]{
    grid-template-columns: repeat(2, 1fr) !important;
  }
  div[style*="grid-template-columns: 1fr 1fr 1fr"]{
    grid-template-columns: 1fr 1fr !important;
  }

  .member-chat-page-layout{
    grid-template-columns: 1fr;
  }

  .member-chat-stack{
    height: auto;
  }

  .member-chat-page-sidebar,
  .member-chat-page-conversation{
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .member-chat-page-section,
  .member-chat-list{
    flex: 0 0 auto;
  }
}

@media (max-width: 720px){
  .app-topbar{
    height: 72px;
  }

  .chat-settings-popover{
    top: 104px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .chat-settings-grid{
    grid-template-columns: 1fr;
  }

  .chat-composer-control-row{
    flex-wrap: wrap;
  }

  .chat-composer-model-select{
    flex: 1 1 180px;
    max-width: 100%;
  }

  .chat-prompt-mark{
    display: none;
  }

  .app-topbar.is-chatbar .topbar-user-pill{
    display: none;
  }

  .login-card{
    border-radius: 24px;
  }

  .login-card-inner{
    padding: 28px 22px 24px;
  }

  .login-topbar{
    flex-direction: column;
    align-items: flex-start;
  }

  .page-head-badges{
    justify-content: flex-start;
  }

  .app-topbar-right{
    display: flex;
    margin-left: auto;
  }

  .topbar-profile-pill{
    display: none;
  }

  .job-header{
    flex-direction: column;
  }

  .dashboard-widget-grid,
  .dashboard-quick-stats,
  .dashboard-metric-grid,
  .dashboard-weather-days{
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .dashboard-widget--compact,
  .dashboard-widget--small,
  .dashboard-widget--medium,
  .dashboard-widget--large,
  .dashboard-widget--wide,
  .dashboard-widget--full{
    grid-column: 1 / -1;
  }

  .dashboard-pill-grid{
    grid-template-columns: 1fr;
  }

  .dashboard-job-row,
  .dashboard-news-item{
    flex-direction: column;
  }

  .dashboard-news-thumb{
    width: 100%;
    min-width: 0;
    flex-basis: auto;
    height: 132px;
    max-height: 150px;
  }

  .dashboard-news-thumb img{
    min-height: 0;
  }

  .metrics-grid,
  .stats-grid{
    grid-template-columns: 1fr;
  }

  .member-chat-composer-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .member-chat-bubble{
    max-width: 100%;
  }

  .member-chat-overlay-root{
    right: 16px;
    top: 88px;
  }

  .member-chat-popover{
    width: min(340px, calc(100vw - 32px));
  }

  .member-chat-overlay-box{
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }

  .thumbs .thumb img{ width: 76px; height: 76px; }
  .job-thumb img{ width: 52px; height: 52px; }
  .job-thumb2 img{ width: 72px; height: 72px; }
  .gallery-grid{ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .job-images{ grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 520px){
  div[style*="grid-template-columns: repeat(4"]{ grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns: 1fr 1fr 1fr"]{ grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns: 1fr 1fr"]{ grid-template-columns: 1fr !important; }
}

.table{
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.table th, .table td{ white-space: nowrap; }

.fastigheter-page{
  overflow:hidden;
}

.fastigheter-page .wrap,
.fastigheter-page .card,
.fastigheter-page .card-inner{
  height:100vh;
}

.fastigheter-page .card-inner{
  padding:calc(var(--topbar-h) + 18px) 18px 18px calc(var(--sidebar-w) + 18px);
}

.fastigheter-shell{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(320px, 420px);
  gap:14px;
}

.fastigheter-map-panel,
.fastigheter-side-panel,
.fastigheter-save-panel,
.fastigheter-list-panel{
  border:1px solid rgba(18,42,76,.1);
  background:rgba(255,255,255,.82);
  box-shadow:var(--shadow-2);
}

.fastigheter-map-panel{
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:8px;
}

.fastigheter-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px 12px;
  border-bottom:1px solid rgba(18,42,76,.08);
}

.fastigheter-toolbar h1{
  margin:4px 0 0;
  font-size:1.4rem;
}

.fastigheter-toolbar-actions,
.fastigheter-save-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.fastigheter-map-wrap{
  position:relative;
  flex:1;
  min-height:0;
}

.fastigheter-map{
  height:100%;
  min-height:0;
  background:#eef3f8;
}

.fastigheter-map-hint{
  position:absolute;
  left:18px;
  bottom:18px;
  z-index:520;
  max-width:min(460px, calc(100% - 36px));
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(18,42,76,.12);
  background:rgba(255,255,255,.9);
  color:#41536c;
  font-size:.9rem;
  box-shadow:0 10px 28px rgba(9,18,30,.14);
  backdrop-filter:blur(10px);
}

.fastigheter-side-panel{
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0, 1fr) minmax(0, 1fr);
  gap:12px;
  padding:12px;
  overflow:hidden;
  border-radius:8px;
}

.fastigheter-save-panel,
.fastigheter-list-panel{
  min-height:0;
  border-radius:8px;
  padding:14px;
}

.fastigheter-save-panel{
  display:grid;
  gap:12px;
}

.fastigheter-save-actions span{
  color:var(--muted);
  font-size:.88rem;
  line-height:1.35;
}

.fastigheter-result-count{
  display:flex;
  align-items:baseline;
  gap:8px;
  color:var(--muted);
}

.fastigheter-result-count strong{
  color:var(--text);
  font-size:1.5rem;
}

.fastigheter-list-panel{
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:hidden;
}

.fastigheter-address-list,
.fastigheter-group-list{
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-right:3px;
}

.fastigheter-address-item,
.fastigheter-group-item{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:11px 12px;
  border-radius:8px;
  border:1px solid rgba(18,42,76,.1);
  background:rgba(255,255,255,.78);
  color:var(--text);
  text-align:left;
  cursor:pointer;
}

.fastigheter-address-item:hover,
.fastigheter-group-item:hover,
.fastigheter-group-item.is-active{
  border-color:rgba(34,114,255,.28);
  background:#fff;
}

.fastigheter-address-item strong,
.fastigheter-group-item strong{
  font-size:.94rem;
}

.fastigheter-address-item span,
.fastigheter-group-item span,
.fastigheter-empty{
  color:var(--muted);
  font-size:.84rem;
  line-height:1.4;
}

.fastigheter-empty{
  padding:14px;
  border-radius:8px;
  border:1px dashed rgba(18,42,76,.14);
  background:rgba(255,255,255,.64);
}

@media (max-width: 1180px){
  .fastigheter-page{
    overflow:auto;
  }

  .fastigheter-page .card-inner{
    height:auto;
    min-height:100vh;
  }

  .fastigheter-shell{
    min-height:calc(100vh - var(--topbar-h) - 36px);
    grid-template-columns:1fr;
  }

  .fastigheter-map-panel{
    min-height:620px;
  }

  .fastigheter-side-panel{
    grid-template-rows:auto minmax(260px, auto) minmax(260px, auto);
  }
}

.atlas-page{
  overflow:hidden;
}

.atlas-page .wrap,
.atlas-page .card,
.atlas-page .card-inner{
  height:100vh;
}

.atlas-page .card-inner{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.atlas-stack{
  gap:18px;
  flex:1;
  min-height:0;
  overflow:hidden;
}

.atlas-workspace{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:18px;
  min-height:0;
  height:100%;
  overflow:hidden;
}

.atlas-workspace.is-detail-open{
  grid-template-columns:minmax(0, 1fr) 420px;
  align-items:stretch;
}

.atlas-main-panel,
.atlas-detail-panel{
  border:1px solid var(--border);
  border-radius:28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(246,250,255,.95)),
    radial-gradient(circle at top right, rgba(34,114,255,.06), transparent 30%);
  box-shadow:var(--shadow-2);
  backdrop-filter:blur(14px);
}

.atlas-main-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}

.atlas-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:16px;
  padding:18px 20px 0;
}

.atlas-toolbar-left{
  display:none !important;
}

.atlas-toolbar-right{
  display:flex !important;
  align-items:center;
  gap:10px;
  margin-left:auto;
}

.atlas-toolbar-field,
.atlas-toolbar-search{
  display:none !important;
}

.atlas-toolbar-field span{
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(18,36,65,.52);
}

.atlas-toolbar-field select,
.atlas-toolbar-search input{
  min-width:150px;
  height:42px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid rgba(18,42,76,.1);
  background:rgba(255,255,255,.88);
  color:var(--text);
}

.atlas-toolbar-search input{
  min-width:220px;
}

.atlas-toolbar-note{
  display:inline-flex !important;
  align-items:center;
  min-height:34px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:#4e6984;
  font-size:.78rem;
  font-weight:700;
}

.atlas-mode-toggle{
  display:inline-flex;
  gap:8px;
  padding:6px;
  border-radius:16px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(18,42,76,.08);
}

.atlas-mode-button{
  height:38px;
  padding:0 14px;
  border-radius:12px;
  border:none;
  background:transparent;
  color:var(--muted);
  font-weight:700;
  cursor:pointer;
}

.atlas-mode-button.is-active{
  background:linear-gradient(135deg, rgba(34,114,255,.14), rgba(92,200,255,.18));
  color:var(--text);
}

.atlas-stage{
  display:grid;
  min-height:0;
  height:100%;
  padding:18px 20px 20px;
  gap:16px;
  flex:1;
  overflow:hidden;
}

.atlas-map-pane,
.atlas-list-pane{
  min-height:0;
}

.atlas-stage.atlas-mode-map{
  grid-template-columns:1fr;
}

.atlas-stage.atlas-mode-map .atlas-list-pane{
  display:none;
}

.atlas-stage.atlas-mode-list{
  grid-template-columns:1fr;
}

.atlas-stage.atlas-mode-list .atlas-map-pane{
  display:none;
}

.atlas-stage.atlas-mode-split{
  grid-template-columns:1fr;
}

.atlas-stage.atlas-mode-split .atlas-list-pane{
  display:none;
}

.atlas-map-pane{
  position:relative;
  min-height:0;
  overflow:hidden;
}

.atlas-map{
  height:100%;
  min-height:0;
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(18,42,76,.1);
}

.atlas-filter-overlay{
  position:absolute;
  top:20px;
  left:72px;
  right:auto;
  z-index:1100;
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:10px;
  width:min(980px, calc(100% - 92px));
  padding:10px 12px;
  border-radius:16px;
  background:rgba(248,251,255,.72);
  border:1px solid rgba(255,255,255,.66);
  box-shadow:0 14px 32px rgba(9,18,30,.12);
  backdrop-filter:blur(12px);
}

.atlas-search-field{
  display:flex;
  flex:1 1 340px;
  flex-direction:column;
  gap:5px;
  min-width:260px;
}

.atlas-search-field span{
  font-size:.66rem;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(18,36,65,.46);
}

.atlas-search-field input{
  height:36px;
  border:1px solid rgba(18,42,76,.08);
  border-radius:11px;
  padding:0 12px;
  background:rgba(255,255,255,.9);
  color:var(--text);
  font:inherit;
  box-shadow:0 4px 14px rgba(9,18,30,.05);
}

.atlas-search-field input:focus{
  outline:2px solid rgba(34,114,255,.2);
  border-color:rgba(34,114,255,.35);
}

.atlas-overlay-field{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:118px;
}

.atlas-overlay-field span{
  font-size:.66rem;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(18,36,65,.46);
}

.atlas-overlay-field select{
  height:36px;
  padding:0 34px 0 11px;
  border-radius:11px;
  border:1px solid rgba(18,42,76,.08);
  background:rgba(255,255,255,.84);
  color:var(--text);
  font-size:.96rem;
  box-shadow:0 4px 14px rgba(9,18,30,.05);
}

.atlas-filter-submit,
.atlas-filter-clear{
  height:36px;
  border:none;
  border-radius:11px;
  padding:0 14px;
  font-weight:800;
  cursor:pointer;
}

.atlas-filter-submit{
  background:#0b7f5f;
  color:#fff;
  box-shadow:0 8px 20px rgba(11,127,95,.16);
}

.atlas-filter-clear{
  background:#17395b;
  color:#fff;
  box-shadow:0 8px 20px rgba(17,47,78,.16);
}

.atlas-filter-submit:hover{
  background:#0a6d52;
}

.atlas-filter-clear:hover{
  background:#24547f;
}

.atlas-overlay-panel{
  position:absolute;
  top:106px;
  left:18px;
  width:min(360px, calc(100% - 36px));
  max-height:calc(100% - 36px);
  display:none;
  flex-direction:column;
  gap:12px;
  padding:14px;
  border-radius:22px;
  background:rgba(248,251,255,.82);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 20px 50px rgba(9,18,30,.18);
  backdrop-filter:blur(16px);
}

.atlas-stage.atlas-mode-split .atlas-overlay-panel{
  display:flex;
}

.atlas-context-menu{
  position:absolute;
  z-index:1200;
  min-width:220px;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:8px;
  border-radius:16px;
  background:rgba(248,251,255,.96);
  border:1px solid rgba(18,42,76,.08);
  box-shadow:0 18px 40px rgba(9,18,30,.18);
  backdrop-filter:blur(16px);
  transform:translate(10px, 10px);
}

.atlas-context-menu[hidden]{
  display:none !important;
}

.atlas-context-action{
  display:flex;
  align-items:center;
  width:100%;
  min-height:42px;
  padding:0 12px;
  border:none;
  border-radius:12px;
  background:transparent;
  color:var(--text);
  font-weight:700;
  cursor:pointer;
  text-align:left;
}

.atlas-context-action:hover{
  background:rgba(34,114,255,.08);
}

.atlas-overlay-head,
.atlas-list-head,
.atlas-detail-head,
.atlas-subpanel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.atlas-overlay-list,
.atlas-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
  overflow:auto;
  padding-right:4px;
}

.atlas-list-pane{
  padding:6px 4px 6px 0;
}

.atlas-list-item{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
  padding:16px 18px;
  text-align:left;
  border-radius:18px;
  border:1px solid rgba(18,42,76,.08);
  background:rgba(255,255,255,.82);
  color:var(--text);
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease, background .16s ease;
}

.atlas-list-item:hover{
  transform:translateY(-1px);
  border-color:rgba(34,114,255,.18);
  background:rgba(255,255,255,.96);
}

.atlas-list-item.is-active{
  border-color:rgba(34,114,255,.34);
  box-shadow:0 14px 34px rgba(34,114,255,.12);
}

.atlas-list-item.is-compact{
  padding:14px;
}

.atlas-list-item-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.atlas-list-item-head strong{
  font-size:1rem;
}

.atlas-list-item-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:.82rem;
}

.atlas-list-item p{
  margin:0;
  color:var(--muted);
  line-height:1.4;
}

.atlas-list-empty,
.atlas-gallery-empty,
.atlas-detail-empty{
  padding:18px;
  border-radius:18px;
  border:1px dashed rgba(18,42,76,.14);
  background:rgba(255,255,255,.64);
  color:var(--muted);
}

.atlas-detail-panel{
  position:relative;
  top:auto;
  width:auto;
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:20px;
  min-height:0;
  height:100%;
  overflow:auto;
  box-shadow:var(--shadow-2);
}

.atlas-detail-panel[hidden]{
  display:none !important;
}

.atlas-detail-empty[hidden],
.atlas-detail-view[hidden],
.atlas-detail-form[hidden],
.atlas-gallery-panel[hidden],
.atlas-upload-row[hidden]{
  display:none !important;
}

.atlas-detail-head-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.atlas-close-button{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:12px;
  background:rgba(18,42,76,.06);
  color:var(--text);
  font-size:1.3rem;
  line-height:1;
  cursor:pointer;
  transition:background .16s ease, transform .16s ease;
}

.atlas-close-button:hover{
  background:rgba(34,114,255,.12);
  transform:translateY(-1px);
}

.atlas-detail-head h2{
  margin:4px 0 0;
}

.atlas-detail-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  height:34px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(34,114,255,.1);
  color:var(--text);
  font-weight:700;
}

.atlas-detail-form,
.atlas-detail-view,
.atlas-gallery-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.atlas-view-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.atlas-view-card{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(18,42,76,.08);
  background:rgba(255,255,255,.72);
}

.atlas-view-label{
  display:block;
  margin-bottom:8px;
  font-size:.8rem;
  font-weight:700;
  color:rgba(18,36,65,.56);
  text-transform:uppercase;
  letter-spacing:.06em;
}

.atlas-view-card strong{
  display:block;
  font-size:1rem;
  color:var(--text);
}

.atlas-view-card p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.atlas-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.atlas-field span{
  font-size:.84rem;
  font-weight:700;
  color:rgba(18,36,65,.64);
}

.atlas-field input,
.atlas-field select,
.atlas-field textarea{
  width:100%;
  border-radius:15px;
  border:1px solid rgba(18,42,76,.1);
  background:rgba(255,255,255,.86);
  color:var(--text);
  padding:12px 14px;
}

.atlas-field textarea{
  resize:vertical;
  min-height:120px;
}

.atlas-field-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.atlas-subpanel{
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(18,42,76,.08);
  background:rgba(255,255,255,.68);
}

.atlas-subpanel-note{
  margin:8px 0 0;
  color:var(--muted);
  font-size:.88rem;
}

.atlas-inline-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.atlas-detail-actions{
  margin-top:2px;
}

.atlas-upload-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.atlas-upload-row input[type="file"]{
  max-width:100%;
}

.atlas-gallery-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.atlas-gallery-item{
  overflow:hidden;
  border-radius:18px;
  border:1px solid rgba(18,42,76,.08);
  background:rgba(255,255,255,.82);
}

.atlas-gallery-item a{
  display:block;
  aspect-ratio:1/1;
  overflow:hidden;
}

.atlas-gallery-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.atlas-gallery-item-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
}

.atlas-gallery-item-meta span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.84rem;
}

.atlas-gallery-item-meta button{
  border:none;
  background:transparent;
  color:#c85858;
  font-weight:700;
  cursor:pointer;
}

.atlas-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 11px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:700;
}

.atlas-status-pill.is-todo{
  background:rgba(255,193,84,.18);
  color:#8d6305;
}

.atlas-status-pill.is-done{
  background:rgba(92, 228, 166, .2);
  color:#1c7f59;
}

.atlas-status-pill.is-planned{
  background:rgba(92, 165, 255, .18);
  color:#1c62c7;
}

.atlas-marker-shell{
  background:none;
  border:none;
}

.atlas-marker-core{
  display:block;
  width:18px;
  height:18px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.96);
  box-shadow:0 0 0 4px rgba(255,255,255,.18), 0 10px 20px rgba(0,0,0,.22);
}

.atlas-marker-status-done .atlas-marker-core{
  box-shadow:0 0 0 4px rgba(123,240,188,.22), 0 10px 20px rgba(0,0,0,.18);
}

.atlas-marker-status-planned .atlas-marker-core{
  box-shadow:0 0 0 4px rgba(95,193,255,.2), 0 10px 20px rgba(0,0,0,.18);
}

.atlas-forndata-toggle.is-active{
  background:#0f2f4c;
  color:#d9efff;
  border-color:#2f7fc4;
}

.atlas-map-layer-toggle.is-active{
  background:#1b2d1d;
  color:#e6ffd9;
  border-color:#6bb66a;
}

.atlas-forndata-panel{
  top:calc(72px + 270px);
}

.atlas-forndata-list{
  max-height:200px;
}

.atlas-forndata-search-trigger{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  margin:12px 0;
}

.atlas-forndata-search-trigger button{
  min-height:38px;
  border:none;
  border-radius:8px;
  padding:0 14px;
  background:#163858;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.atlas-forndata-search-trigger button:hover{
  background:#24547f;
}

.atlas-forndata-search-trigger span{
  color:#688197;
  font-size:.82rem;
  line-height:1.35;
}

.atlas-forndata-search-backdrop{
  position:absolute;
  inset:0;
  z-index:1350;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(10,18,30,.28);
  backdrop-filter:blur(4px);
}

.atlas-forndata-search-backdrop[hidden]{
  display:none !important;
}

.atlas-forndata-search-dialog{
  width:min(460px, 100%);
  display:grid;
  gap:14px;
  border-radius:8px;
  border:1px solid rgba(18,42,76,.12);
  background:rgba(248,251,255,.96);
  box-shadow:0 24px 70px rgba(9,18,30,.28);
  padding:18px;
  color:#163858;
}

.atlas-forndata-search-dialog-head{
  flex-wrap:wrap;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}

.atlas-forndata-search-dialog-head span,
.atlas-forndata-dialog-field span{
  display:block;
  margin-bottom:6px;
  color:#688197;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.atlas-forndata-search-dialog-head h3{
  margin:0;
  color:#163858;
  font-size:1.2rem;
}

.atlas-forndata-search-dialog-head button{
  width:34px;
  height:34px;
  border:none;
  border-radius:8px;
  background:rgba(18,42,76,.08);
  color:#163858;
  cursor:pointer;
  font-size:1.3rem;
  line-height:1;
}

.atlas-forndata-dialog-field input{
  width:100%;
  min-width:0;
  height:42px;
  border:1px solid rgba(18,42,76,.12);
  border-radius:8px;
  padding:0 12px;
  background:#fff;
  color:#163858;
  font:inherit;
}

.atlas-forndata-search-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.atlas-forndata-search-actions button{
  min-height:38px;
  border:none;
  border-radius:8px;
  padding:0 16px;
  font-weight:800;
  cursor:pointer;
}

.atlas-forndata-search-clear{
  background:rgba(18,42,76,.08);
  color:#163858;
}

.atlas-forndata-search-submit{
  background:#163858;
  color:#fff;
}

.atlas-forndata-search-submit:hover{
  background:#24547f;
}

.atlas-forndata-item{
  width:100%;
  border:none;
  background:#f6f9fc;
  border-radius:16px;
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:4px;
  text-align:left;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(153,177,208,.28);
}

.atlas-forndata-item + .atlas-forndata-item{
  margin-top:10px;
}

.atlas-forndata-item:hover{
  box-shadow:inset 0 0 0 1px rgba(66,123,193,.42), 0 10px 24px rgba(32,63,101,.08);
}

.atlas-forndata-item.is-saved{
  background:#effbf5;
  box-shadow:inset 0 0 0 1px rgba(22,142,91,.26);
}

.atlas-forndata-item strong{
  color:#163858;
  font-size:.95rem;
}

.atlas-forndata-item span{
  color:#4e6984;
  font-size:.82rem;
}

.atlas-forndata-item em{
  width:max-content;
  border-radius:999px;
  padding:3px 8px;
  background:rgba(22,142,91,.12);
  color:#0d7046;
  font-size:.72rem;
  font-style:normal;
  font-weight:800;
}

.atlas-forndata-filter{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0 0 12px;
}

.atlas-forndata-filter span{
  font-size:.66rem;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(18,36,65,.46);
}

.atlas-forndata-filter select{
  height:36px;
  border:1px solid rgba(18,42,76,.08);
  border-radius:11px;
  padding:0 34px 0 11px;
  background:rgba(255,255,255,.9);
  color:var(--text);
}

.atlas-forndata-empty{
  color:#688197;
  font-size:.88rem;
  line-height:1.5;
}

.atlas-forndata-popup{
  display:grid;
  gap:8px;
  max-width:310px;
  color:#1c2d3d;
}

.atlas-forndata-popup h3{
  margin:0;
  font-size:1.05rem;
}

.atlas-forndata-popup p{
  margin:0;
  line-height:1.45;
}

.atlas-forndata-popup dl{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:5px 10px;
  margin:0;
}

.atlas-forndata-popup dt{
  color:#60778d;
  font-weight:700;
}

.atlas-forndata-popup dd{
  margin:0;
}

.atlas-forndata-popup a{
  color:#0f5f9e;
  font-weight:800;
}

.atlas-forndata-popup-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.atlas-forndata-popup-actions button{
  border:none;
  border-radius:999px;
  padding:8px 12px;
  background:#0b7f5f;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

@media (max-width: 1260px){
  .atlas-page{
    overflow:auto;
  }

  .atlas-page .card-inner{
    height:auto;
    min-height:100vh;
    overflow:visible;
  }

  .atlas-stack{
    overflow:visible;
  }

  .atlas-workspace,
  .atlas-workspace.is-detail-open{
    grid-template-columns:1fr;
    height:auto;
    overflow:visible;
  }

  .atlas-main-panel{
    overflow:visible;
  }

  .atlas-detail-panel{
    position:static;
    max-height:none;
    height:auto;
  }

  .atlas-map{
    min-height:620px;
  }
}

@media (max-width: 820px){
  .atlas-toolbar{
    padding:16px 16px 0;
  }

  .atlas-stage{
    padding:16px;
  }

  .atlas-field-grid,
  .atlas-gallery-grid,
  .atlas-view-grid{
    grid-template-columns:1fr;
  }

  .atlas-filter-overlay{
    left:16px;
    right:16px;
    top:88px;
    flex-wrap:wrap;
    align-items:stretch;
    gap:8px;
    padding:10px;
    width:auto;
  }

  .atlas-search-field{
    min-width:0;
    flex:1 1 100%;
  }

  .atlas-overlay-field{
    min-width:0;
    flex:1 1 132px;
  }

  .atlas-map{
    min-height:460px;
  }
}

/* Global theme switcher. Light is the original theme; dim is a calmer, slightly darker variant. */
.topbar-theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:46px;
  padding:0 12px;
  border-radius:8px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.78);
  color:var(--text);
  font:inherit;
  font-size:13px;
  font-weight:800;
  box-shadow:var(--shadow-2);
  cursor:pointer;
}

.topbar-theme-toggle:hover{
  border-color:rgba(34,114,255,.22);
}

.topbar-theme-toggle-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow:0 0 0 4px var(--accent-soft);
}

.profile-appearance-card{
  max-width:980px;
  margin:0 0 22px;
  padding:20px;
  border:1px solid var(--border);
  border-radius:8px;
  background:
    radial-gradient(480px 220px at 0% 0%, rgba(34,114,255,.07), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(247,250,255,.76));
  box-shadow:var(--shadow);
}

.profile-appearance-card h2{
  margin:6px 0 8px;
}

.profile-appearance-card p{
  max-width:720px;
  color:var(--muted);
  line-height:1.65;
}

.profile-appearance-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:16px;
}

.profile-choice-group{
  min-width:0;
  margin:0;
  padding:0;
  border:0;
  display:grid;
  gap:10px;
}

.profile-choice-group legend{
  margin:0 0 4px;
  color:var(--muted-2);
  font-size:11px;
  font-weight:900;
  letter-spacing:0;
  text-transform:uppercase;
}

.profile-choice-card{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:10px;
  align-items:flex-start;
  padding:12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:rgba(255,255,255,.72);
  cursor:pointer;
}

.profile-choice-card:has(input:checked){
  border-color:rgba(34,114,255,.34);
  background:linear-gradient(135deg, rgba(34,114,255,.12), rgba(10,182,216,.07));
}

.profile-choice-card input{
  width:18px;
  height:18px;
  margin:2px 0 0;
}

.profile-choice-card strong,
.profile-choice-card small{
  display:block;
}

.profile-choice-card small{
  margin-top:4px;
  color:var(--muted);
  line-height:1.45;
}

html[data-northlat-theme="dim"]{
  color-scheme:dark;
}

html[data-northlat-theme="dim"] body{
  --bg:#070711;
  --bg-2:#0d0d18;
  --grid:transparent;
  --surface:rgba(17,17,31,.86);
  --surface-2:rgba(22,21,39,.94);
  --surface-3:#141425;
  --surface-dark:#090913;
  --surface-dark-2:#101020;
  --border:rgba(169,139,255,.16);
  --border-strong:rgba(169,139,255,.30);
  --text:#f4f1ff;
  --muted:rgba(244,241,255,.68);
  --muted-2:rgba(244,241,255,.46);
  --accent:#a88cff;
  --accent-2:#7d66ff;
  --accent-soft:rgba(168,140,255,.16);
  --ok:#5ee0a2;
  --warn:#e8c46c;
  --danger:#ff6b7b;
  --shadow:0 24px 80px rgba(0,0,0,.36);
  --shadow-2:0 14px 36px rgba(0,0,0,.28);
  --ring:0 0 0 4px rgba(168,140,255,.18);
  background:
    radial-gradient(780px 520px at -8% -10%, rgba(128,91,255,.28), transparent 62%),
    radial-gradient(760px 520px at 108% 96%, rgba(112,91,255,.22), transparent 58%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

html[data-northlat-theme="dim"] body::before{
  background:none;
}

html[data-northlat-theme="dim"] .app-sidebar{
  background:
    linear-gradient(180deg, rgba(10,10,21,.98), rgba(6,6,14,.98));
  box-shadow:inset -1px 0 0 rgba(169,139,255,.12);
}

html[data-northlat-theme="dim"] .app-topbar{
  background:rgba(8,8,18,.84);
}

html[data-northlat-theme="dim"] .sidebar-link,
html[data-northlat-theme="dim"] .sidebar-group-toggle,
html[data-northlat-theme="dim"] .sidebar-user-card,
html[data-northlat-theme="dim"] .topbar-user-pill,
html[data-northlat-theme="dim"] .topbar-chat-launch,
html[data-northlat-theme="dim"] .topbar-theme-toggle,
html[data-northlat-theme="dim"] .settings-subnav-link,
html[data-northlat-theme="dim"] .status-chip,
html[data-northlat-theme="dim"] input,
html[data-northlat-theme="dim"] select,
html[data-northlat-theme="dim"] textarea,
html[data-northlat-theme="dim"] .btn-small,
html[data-northlat-theme="dim"] .up-btn,
html[data-northlat-theme="dim"] .dashboard-widget-size-step,
html[data-northlat-theme="dim"] .dashboard-widget-size-preset,
html[data-northlat-theme="dim"] .dashboard-widget-size-text{
  background:rgba(18,18,33,.72);
  border-color:var(--border);
  color:var(--text);
}

html[data-northlat-theme="dim"] input::placeholder,
html[data-northlat-theme="dim"] textarea::placeholder{
  color:rgba(244,241,255,.36);
}

html[data-northlat-theme="dim"] input:focus,
html[data-northlat-theme="dim"] textarea:focus,
html[data-northlat-theme="dim"] select:focus{
  border-color:rgba(168,140,255,.42);
  box-shadow:var(--ring);
}

html[data-northlat-theme="dim"] .sidebar-link:hover,
html[data-northlat-theme="dim"] .sidebar-group-toggle:hover,
html[data-northlat-theme="dim"] .btn-small:hover,
html[data-northlat-theme="dim"] .up-btn:hover,
html[data-northlat-theme="dim"] .topbar-theme-toggle:hover,
html[data-northlat-theme="dim"] .dashboard-widget-size-step:hover,
html[data-northlat-theme="dim"] .dashboard-widget-size-preset:hover{
  background:rgba(35,32,58,.86);
  border-color:var(--border-strong);
}

html[data-northlat-theme="dim"] .sidebar-link.is-active,
html[data-northlat-theme="dim"] .sidebar-group-toggle.is-active,
html[data-northlat-theme="dim"] .settings-subnav-link.is-active{
  background:linear-gradient(135deg, rgba(168,140,255,.20), rgba(125,102,255,.10));
  border-color:rgba(168,140,255,.34);
  box-shadow:inset 3px 0 0 rgba(168,140,255,.70), var(--shadow-2);
}

html[data-northlat-theme="dim"] .sidebar-brand-mark,
html[data-northlat-theme="dim"] .sidebar-user-avatar,
html[data-northlat-theme="dim"] .topbar-user-avatar,
html[data-northlat-theme="dim"] .btn{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#100c1f;
}

html[data-northlat-theme="dim"] .hero-panel,
html[data-northlat-theme="dim"] .dashboard-panel,
html[data-northlat-theme="dim"] .dashboard-library-card,
html[data-northlat-theme="dim"] .dashboard-settings-card,
html[data-northlat-theme="dim"] .dashboard-widget-shell,
html[data-northlat-theme="dim"] .dashboard-editor-footer,
html[data-northlat-theme="dim"] .member-chat-v2-card,
html[data-northlat-theme="dim"] .profile-appearance-card,
html[data-northlat-theme="dim"] .member-chat-page-sidebar,
html[data-northlat-theme="dim"] .member-chat-page-conversation,
html[data-northlat-theme="dim"] .member-chat-messages,
html[data-northlat-theme="dim"] .chat-settings-popover,
html[data-northlat-theme="dim"] .up-shell,
html[data-northlat-theme="dim"] .builder-v2-shell,
html[data-northlat-theme="dim"] .atlas-workspace,
html[data-northlat-theme="dim"] .atlas-main-panel,
html[data-northlat-theme="dim"] .atlas-detail-panel,
html[data-northlat-theme="dim"] .fastigheter-map-panel,
html[data-northlat-theme="dim"] .fastigheter-side-panel,
html[data-northlat-theme="dim"] .fastigheter-save-panel,
html[data-northlat-theme="dim"] .fastigheter-list-panel,
html[data-northlat-theme="dim"] .minecraft-admin-page .dashboard-panel{
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(168,140,255,.13), transparent 60%),
    linear-gradient(180deg, rgba(17,17,32,.90), rgba(10,10,22,.88));
  border-color:var(--border);
  box-shadow:var(--shadow);
}

html[data-northlat-theme="dim"] .hero-card,
html[data-northlat-theme="dim"] .stat-card,
html[data-northlat-theme="dim"] .metric-card,
html[data-northlat-theme="dim"] .panel-pill,
html[data-northlat-theme="dim"] .dashboard-welcome-card,
html[data-northlat-theme="dim"] .dashboard-mini-stat,
html[data-northlat-theme="dim"] .dashboard-pill-card,
html[data-northlat-theme="dim"] .dashboard-highlight-card,
html[data-northlat-theme="dim"] .dashboard-metric-card,
html[data-northlat-theme="dim"] .dashboard-stat-row,
html[data-northlat-theme="dim"] .dashboard-job-row,
html[data-northlat-theme="dim"] .dashboard-news-item,
html[data-northlat-theme="dim"] .dashboard-weather-card,
html[data-northlat-theme="dim"] .dashboard-weather-day,
html[data-northlat-theme="dim"] .dashboard-empty-state,
html[data-northlat-theme="dim"] .dashboard-library-item,
html[data-northlat-theme="dim"] .profile-choice-card,
html[data-northlat-theme="dim"] .member-chat-list-item,
html[data-northlat-theme="dim"] .member-chat-v2-row,
html[data-northlat-theme="dim"] .member-chat-v2-device,
html[data-northlat-theme="dim"] .member-chat-v2-member,
html[data-northlat-theme="dim"] .minecraft-player-card,
html[data-northlat-theme="dim"] .atlas-gallery-item,
html[data-northlat-theme="dim"] .atlas-detail-card,
html[data-northlat-theme="dim"] .fastigheter-address-item,
html[data-northlat-theme="dim"] .fastigheter-group-item,
html[data-northlat-theme="dim"] .fastigheter-empty,
html[data-northlat-theme="dim"] .atlas-forndata-item{
  background:rgba(20,20,34,.78);
  border-color:var(--border);
  box-shadow:0 10px 30px rgba(0,0,0,.22);
}

html[data-northlat-theme="dim"] .member-chat-list-item.is-active,
html[data-northlat-theme="dim"] .member-chat-v2-member.is-selected,
html[data-northlat-theme="dim"] .profile-choice-card:has(input:checked),
html[data-northlat-theme="dim"] .dashboard-widget-size-preset.is-active{
  background:linear-gradient(135deg, rgba(168,140,255,.18), rgba(20,20,34,.92));
  border-color:rgba(168,140,255,.34);
}

html[data-northlat-theme="dim"] .dashboard-news-thumb,
html[data-northlat-theme="dim"] .atlas-map,
html[data-northlat-theme="dim"] .fastigheter-map,
html[data-northlat-theme="dim"] .gallery-grid img,
html[data-northlat-theme="dim"] .job-images img{
  background:rgba(24,24,42,.92);
}

html[data-northlat-theme="dim"] .chat-terminal-shell,
html[data-northlat-theme="dim"] .member-chat-v2-code,
html[data-northlat-theme="dim"] .terminal-command-output,
html[data-northlat-theme="dim"] .terminal-panel pre{
  background:#05050c;
  color:#f4f1ff;
}

html[data-northlat-theme="dim"] .atlas-forndata-popup,
html[data-northlat-theme="dim"] .atlas-forndata-popup h3,
html[data-northlat-theme="dim"] .atlas-forndata-item strong,
html[data-northlat-theme="dim"] .minecraft-player-head strong{
  color:var(--text);
}

html[data-northlat-theme="dim"] .atlas-forndata-item span,
html[data-northlat-theme="dim"] .atlas-forndata-popup dt{
  color:var(--muted);
}

html[data-northlat-theme="dim"] .atlas-filter-overlay,
html[data-northlat-theme="dim"] .atlas-overlay-panel,
html[data-northlat-theme="dim"] .atlas-context-menu,
html[data-northlat-theme="dim"] .atlas-forndata-search-dialog,
html[data-northlat-theme="dim"] .atlas-view-card,
html[data-northlat-theme="dim"] .atlas-subpanel,
html[data-northlat-theme="dim"] .atlas-list-item,
html[data-northlat-theme="dim"] .atlas-list-empty,
html[data-northlat-theme="dim"] .atlas-gallery-empty,
html[data-northlat-theme="dim"] .atlas-detail-empty{
  background:rgba(18,18,33,.88);
  border-color:var(--border);
  color:var(--text);
  box-shadow:0 14px 34px rgba(0,0,0,.24);
}

html[data-northlat-theme="dim"] .atlas-list-item:hover,
html[data-northlat-theme="dim"] .atlas-list-item.is-active{
  background:rgba(24,24,42,.94);
  border-color:rgba(168,140,255,.36);
}

html[data-northlat-theme="dim"] .fastigheter-address-item:hover,
html[data-northlat-theme="dim"] .fastigheter-group-item:hover,
html[data-northlat-theme="dim"] .fastigheter-group-item.is-active{
  background:rgba(24,24,42,.94);
  border-color:rgba(168,140,255,.36);
}

html[data-northlat-theme="dim"] .fastigheter-map-hint{
  background:rgba(18,18,33,.88);
  border-color:var(--border);
  color:var(--muted);
}

html[data-northlat-theme="dim"] .atlas-forndata-search-backdrop{
  background:rgba(3,3,10,.46);
}

html[data-northlat-theme="dim"] .atlas-search-field span,
html[data-northlat-theme="dim"] .atlas-overlay-field span,
html[data-northlat-theme="dim"] .atlas-view-label,
html[data-northlat-theme="dim"] .atlas-field span,
html[data-northlat-theme="dim"] .atlas-forndata-search-trigger span,
html[data-northlat-theme="dim"] .atlas-forndata-search-dialog-head span,
html[data-northlat-theme="dim"] .atlas-forndata-dialog-field span,
html[data-northlat-theme="dim"] .atlas-forndata-filter span{
  color:var(--muted-2);
}

html[data-northlat-theme="dim"] .atlas-detail-head h2,
html[data-northlat-theme="dim"] .atlas-forndata-search-dialog-head h3,
html[data-northlat-theme="dim"] .atlas-view-card strong,
html[data-northlat-theme="dim"] .atlas-list-item-head strong,
html[data-northlat-theme="dim"] .atlas-gallery-item-meta span{
  color:var(--text);
}

html[data-northlat-theme="dim"] .atlas-view-card p,
html[data-northlat-theme="dim"] .atlas-list-item-meta,
html[data-northlat-theme="dim"] .atlas-list-item p,
html[data-northlat-theme="dim"] .atlas-subpanel-note,
html[data-northlat-theme="dim"] .atlas-forndata-empty{
  color:var(--muted);
}

html[data-northlat-theme="dim"] .fastigheter-save-actions span,
html[data-northlat-theme="dim"] .fastigheter-result-count,
html[data-northlat-theme="dim"] .fastigheter-address-item span,
html[data-northlat-theme="dim"] .fastigheter-group-item span,
html[data-northlat-theme="dim"] .fastigheter-empty{
  color:var(--muted);
}

html[data-northlat-theme="dim"] .fastigheter-result-count strong,
html[data-northlat-theme="dim"] .fastigheter-address-item strong,
html[data-northlat-theme="dim"] .fastigheter-group-item strong{
  color:var(--text);
}

html[data-northlat-theme="dim"] .atlas-search-field input,
html[data-northlat-theme="dim"] .atlas-overlay-field select,
html[data-northlat-theme="dim"] .atlas-field input,
html[data-northlat-theme="dim"] .atlas-field select,
html[data-northlat-theme="dim"] .atlas-field textarea,
html[data-northlat-theme="dim"] .atlas-forndata-search input,
html[data-northlat-theme="dim"] .atlas-forndata-dialog-field input,
html[data-northlat-theme="dim"] .atlas-forndata-filter select{
  background:rgba(9,9,20,.92);
  border-color:var(--border);
  color:var(--text);
  box-shadow:none;
}

html[data-northlat-theme="dim"] .atlas-search-field input::placeholder,
html[data-northlat-theme="dim"] .atlas-field input::placeholder,
html[data-northlat-theme="dim"] .atlas-field textarea::placeholder,
html[data-northlat-theme="dim"] .atlas-forndata-search input::placeholder{
  color:rgba(244,241,255,.42);
}

html[data-northlat-theme="dim"] .atlas-forndata-dialog-field input::placeholder{
  color:rgba(244,241,255,.42);
}

html[data-northlat-theme="dim"] .atlas-search-field input:focus,
html[data-northlat-theme="dim"] .atlas-field input:focus,
html[data-northlat-theme="dim"] .atlas-field select:focus,
html[data-northlat-theme="dim"] .atlas-field textarea:focus{
  outline:2px solid rgba(168,140,255,.28);
  border-color:rgba(168,140,255,.46);
}

html[data-northlat-theme="dim"] .atlas-detail-badge{
  background:rgba(168,140,255,.16);
  border:1px solid var(--border);
  color:var(--text);
}

html[data-northlat-theme="dim"] .atlas-close-button,
html[data-northlat-theme="dim"] .atlas-forndata-search-dialog-head button,
html[data-northlat-theme="dim"] .atlas-context-action:hover{
  background:rgba(244,241,255,.08);
  color:var(--text);
}

html[data-northlat-theme="dim"] .atlas-filter-submit,
html[data-northlat-theme="dim"] .atlas-forndata-search-trigger button,
html[data-northlat-theme="dim"] .atlas-forndata-search-submit,
html[data-northlat-theme="dim"] .atlas-forndata-search button{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#100c1f;
  box-shadow:0 10px 24px rgba(168,140,255,.18);
}

html[data-northlat-theme="dim"] .atlas-filter-clear,
html[data-northlat-theme="dim"] .atlas-forndata-search-clear{
  background:rgba(244,241,255,.10);
  border:1px solid var(--border);
  color:var(--text);
  box-shadow:none;
}

html[data-northlat-theme="dim"] .atlas-forndata-item.is-saved{
  background:rgba(94,224,162,.12);
  box-shadow:inset 0 0 0 1px rgba(94,224,162,.26);
}

html[data-northlat-theme="dim"] .atlas-forndata-item em{
  background:rgba(94,224,162,.15);
  color:#8af0bd;
}

html[data-northlat-theme="dim"] .atlas-status-pill.is-todo{
  background:rgba(232,196,108,.17);
  color:#f4d77f;
}

html[data-northlat-theme="dim"] .atlas-status-pill.is-done{
  background:rgba(94,224,162,.16);
  color:#8af0bd;
}

html[data-northlat-theme="dim"] .atlas-status-pill.is-planned{
  background:rgba(168,140,255,.18);
  color:#c9baff;
}

html[data-northlat-theme="dim"] .atlas-map .leaflet-popup-content-wrapper{
  background:rgba(12,12,24,.96);
  border:1px solid var(--border);
  color:var(--text);
  box-shadow:0 18px 44px rgba(0,0,0,.42);
}

html[data-northlat-theme="dim"] .atlas-map .leaflet-popup-tip{
  background:rgba(12,12,24,.96);
  border:1px solid var(--border);
}

html[data-northlat-theme="dim"] .atlas-map .leaflet-popup-content,
html[data-northlat-theme="dim"] .atlas-map .atlas-forndata-popup p,
html[data-northlat-theme="dim"] .atlas-map .atlas-forndata-popup dd{
  color:var(--text);
}

html[data-northlat-theme="dim"] .atlas-map .atlas-forndata-popup dt{
  color:var(--muted-2);
}

html[data-northlat-theme="dim"] .atlas-map .atlas-forndata-popup a,
html[data-northlat-theme="dim"] .atlas-map a.leaflet-popup-close-button{
  color:#c9baff;
}

html[data-northlat-theme="dim"] .atlas-map .atlas-forndata-popup-actions button{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#100c1f;
}

html[data-northlat-density="highres"] body{
  --sidebar-w:260px;
  --topbar-h:68px;
  --radius:8px;
  --radius-2:8px;
  --radius-3:8px;
  font-size:14px;
}

html[data-northlat-density="highres"] .card-inner{
  padding:calc(var(--topbar-h) + 16px) 16px 16px calc(var(--sidebar-w) + 16px);
}

html[data-northlat-density="highres"] .app-sidebar{
  padding:16px 12px 12px;
  gap:14px;
}

html[data-northlat-density="highres"] .sidebar-brand-mark{
  width:38px;
  height:38px;
  border-radius:8px;
}

html[data-northlat-density="highres"] .sidebar-brand-copy strong{
  font-size:16px;
}

html[data-northlat-density="highres"] .sidebar-link,
html[data-northlat-density="highres"] .sidebar-group-toggle{
  min-height:40px;
  padding:0 12px;
  border-radius:8px;
  font-size:13px;
}

html[data-northlat-density="highres"] .sidebar-sublink{
  min-height:38px;
}

html[data-northlat-density="highres"] .sidebar-user-card{
  padding:10px;
  border-radius:8px;
}

html[data-northlat-density="highres"] .sidebar-user-avatar,
html[data-northlat-density="highres"] .topbar-user-avatar{
  width:34px;
  height:34px;
  border-radius:8px;
}

html[data-northlat-density="highres"] .app-topbar{
  padding:0 16px;
}

html[data-northlat-density="highres"] .topbar-title strong{
  font-size:16px;
}

html[data-northlat-density="highres"] .topbar-user-pill,
html[data-northlat-density="highres"] .topbar-profile-pill,
html[data-northlat-density="highres"] .topbar-chat-launch,
html[data-northlat-density="highres"] .topbar-theme-toggle{
  min-height:40px;
  border-radius:8px;
}

html[data-northlat-density="highres"] .topbar-chat-launch{
  width:40px;
  height:40px;
}

html[data-northlat-density="highres"] .dashboard-stack,
html[data-northlat-density="highres"] .dashboard-builder-page,
html[data-northlat-density="highres"] .dashboard-settings-page,
html[data-northlat-density="highres"] .section-block,
html[data-northlat-density="highres"] .member-chat-page-sidebar,
html[data-northlat-density="highres"] .member-chat-page-conversation{
  gap:14px;
}

html[data-northlat-density="highres"] h1{
  font-size:28px;
}

html[data-northlat-density="highres"] h2,
html[data-northlat-density="highres"] .dashboard-widget-head h2{
  font-size:19px;
}

html[data-northlat-density="highres"] .page-head p,
html[data-northlat-density="highres"] .dashboard-builder-copy p,
html[data-northlat-density="highres"] .profile-appearance-card p{
  font-size:14px;
  line-height:1.55;
}

html[data-northlat-density="highres"] .hero-panel,
html[data-northlat-density="highres"] .dashboard-panel,
html[data-northlat-density="highres"] .dashboard-library-card,
html[data-northlat-density="highres"] .dashboard-settings-card,
html[data-northlat-density="highres"] .dashboard-widget-shell,
html[data-northlat-density="highres"] .dashboard-editor-footer,
html[data-northlat-density="highres"] .profile-appearance-card,
html[data-northlat-density="highres"] .member-chat-v2-card{
  border-radius:8px;
  padding:14px;
}

html[data-northlat-density="highres"] .dashboard-widget-grid{
  grid-auto-rows:8px;
  gap:12px;
}

html[data-northlat-density="highres"] .dashboard-widget-head{
  margin-bottom:12px;
}

html[data-northlat-density="highres"] .dashboard-widget-body,
html[data-northlat-density="highres"] .dashboard-welcome-widget,
html[data-northlat-density="highres"] .dashboard-quick-stats,
html[data-northlat-density="highres"] .dashboard-pill-grid,
html[data-northlat-density="highres"] .dashboard-stat-stack,
html[data-northlat-density="highres"] .dashboard-highlight-stack,
html[data-northlat-density="highres"] .dashboard-metric-grid,
html[data-northlat-density="highres"] .dashboard-jobs-list,
html[data-northlat-density="highres"] .dashboard-news-list,
html[data-northlat-density="highres"] .dashboard-weather-list,
html[data-northlat-density="highres"] .profile-appearance-grid{
  gap:10px;
}

html[data-northlat-density="highres"] .hero-card,
html[data-northlat-density="highres"] .stat-card,
html[data-northlat-density="highres"] .metric-card,
html[data-northlat-density="highres"] .panel-pill,
html[data-northlat-density="highres"] .dashboard-welcome-card,
html[data-northlat-density="highres"] .dashboard-mini-stat,
html[data-northlat-density="highres"] .dashboard-pill-card,
html[data-northlat-density="highres"] .dashboard-highlight-card,
html[data-northlat-density="highres"] .dashboard-metric-card,
html[data-northlat-density="highres"] .dashboard-stat-row,
html[data-northlat-density="highres"] .dashboard-job-row,
html[data-northlat-density="highres"] .dashboard-news-item,
html[data-northlat-density="highres"] .dashboard-weather-card,
html[data-northlat-density="highres"] .dashboard-weather-day,
html[data-northlat-density="highres"] .dashboard-empty-state,
html[data-northlat-density="highres"] .profile-choice-card,
html[data-northlat-density="highres"] .member-chat-list-item,
html[data-northlat-density="highres"] .member-chat-v2-row,
html[data-northlat-density="highres"] .member-chat-v2-device,
html[data-northlat-density="highres"] .member-chat-v2-member{
  border-radius:8px;
  padding:12px;
}

html[data-northlat-density="highres"] .dashboard-welcome-card{
  min-height:178px;
}

html[data-northlat-density="highres"] .dashboard-mini-stat,
html[data-northlat-density="highres"] .dashboard-pill-card,
html[data-northlat-density="highres"] .dashboard-highlight-card,
html[data-northlat-density="highres"] .dashboard-stat-row{
  min-height:76px;
}

html[data-northlat-density="highres"] .dashboard-metric-card{
  min-height:116px;
}

html[data-northlat-density="highres"] .dashboard-welcome-card h3,
html[data-northlat-density="highres"] .dashboard-mini-stat strong{
  font-size:26px;
}

html[data-northlat-density="highres"] .dashboard-metric-card strong{
  font-size:21px;
}

html[data-northlat-density="highres"] .dashboard-pill-card strong,
html[data-northlat-density="highres"] .dashboard-highlight-card strong,
html[data-northlat-density="highres"] .dashboard-stat-row strong,
html[data-northlat-density="highres"] .dashboard-weather-card-head strong{
  font-size:15px;
}

html[data-northlat-density="highres"] .dashboard-job-main strong,
html[data-northlat-density="highres"] .dashboard-news-copy strong{
  font-size:14px;
  line-height:1.35;
}

html[data-northlat-density="highres"] .dashboard-job-main span,
html[data-northlat-density="highres"] .dashboard-job-time,
html[data-northlat-density="highres"] .dashboard-metric-card small,
html[data-northlat-density="highres"] .dashboard-widget-note,
html[data-northlat-density="highres"] .small{
  font-size:12px;
}

html[data-northlat-density="highres"] .dashboard-weather-days{
  grid-template-columns:repeat(auto-fit, minmax(104px, 1fr));
}

html[data-northlat-density="highres"] input,
html[data-northlat-density="highres"] select,
html[data-northlat-density="highres"] textarea{
  padding:9px 11px;
  border-radius:8px;
}

html[data-northlat-density="highres"] textarea{
  min-height:86px;
}

html[data-northlat-density="highres"] .btn{
  padding:9px 13px;
  border-radius:8px;
}

html[data-northlat-density="highres"] .btn-small,
html[data-northlat-density="highres"] .up-btn,
html[data-northlat-density="highres"] .pill,
html[data-northlat-density="highres"] .settings-subnav-link{
  min-height:34px;
  padding:8px 11px;
  border-radius:8px;
  font-size:12px;
}

html[data-northlat-density="highres"] .member-chat-list-avatar{
  width:34px;
  height:34px;
}

html[data-northlat-density="highres"] .member-chat-messages{
  border-radius:8px;
  padding:12px;
}

html[data-northlat-density="highres"] .chat-settings-popover,
html[data-northlat-density="highres"] .member-chat-popover,
html[data-northlat-density="highres"] .member-chat-overlay-box{
  border-radius:8px;
}

@media (min-width:1500px){
  html[data-northlat-density="highres"] .dashboard-widget--small{
    grid-column:span 3;
  }
}

html[data-northlat-density="highres"] body.chat-shell-page.chat-fullscreen,
html[data-northlat-density="highres"] body.projects-shell-page.builder-focus{
  --sidebar-w:0px;
  --topbar-h:0px;
}

html[data-northlat-density="highres"] body.chat-shell-page.chat-fullscreen .card-inner,
html[data-northlat-density="highres"] body.projects-shell-page.builder-focus .card-inner{
  padding:0;
}

@media (max-width:980px){
  html[data-northlat-density="highres"] .card-inner{
    padding:calc(var(--topbar-h) + 14px) 12px 12px;
  }
}

@media (max-width:720px){
  .topbar-theme-toggle{
    min-height:40px;
    padding:0 10px;
  }
}
