/* Wonit Batch — light ops console theme */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #eef2f6;
  --bg-accent: #e8eef5;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --border: #d5dee8;
  --border-strong: #b8c5d4;
  --text: #1a2332;
  --muted: #5c6b7e;
  --accent: #0b6bcb;
  --accent-hover: #0958a8;
  --accent-soft: #e8f2fc;
  --success: #1a7f4b;
  --warning: #b45309;
  --danger: #c62828;
  --shadow: 0 1px 2px rgba(26, 35, 50, .06), 0 4px 16px rgba(26, 35, 50, .04);
  --radius: .5rem;
  --font: 'IBM Plex Sans', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', monospace;
  --primary: var(--accent);
  /* legacy aliases used by older page styles */
  --dark: var(--bg);
  --dark-bg: var(--bg);
  --panel-bg: var(--panel);
  --panel-border: var(--border);
  --input-bg: var(--panel);
  --input-border: var(--border);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 15px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 480px at 10% -10%, #dce8f5 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e4edf6 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a:not(.btn), a:not(.btn):hover { color: var(--accent); }
code, .mono { font-family: var(--mono); font-size: .88em; }

/* —— Panels / cards —— */
.card,
.panel {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1rem;
}
.page-header h1,
.page-header h4 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--text);
}
.page-header .page-desc {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .875rem;
}
.section-title {
  margin: 0 0 .65rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

/* —— Tables —— */
.table { color: var(--text); --bs-table-bg: transparent; }
.table thead th,
.table-dark thead th {
  background: var(--panel-soft) !important;
  color: var(--muted) !important;
  border-color: var(--border) !important;
  font-size: .75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: .02em;
  white-space: nowrap;
}
.table tbody td,
.table-dark tbody td {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  vertical-align: middle;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: var(--panel-soft);
  background: var(--panel-soft) !important;
  color: var(--text) !important;
}
.table-hover > tbody > tr:hover > * {
  background: var(--accent-soft) !important;
  color: var(--text) !important;
}
.table-dark {
  --bs-table-color: var(--text);
  --bs-table-bg: var(--panel);
  --bs-table-border-color: var(--border);
  --bs-table-striped-bg: var(--panel-soft);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-bg: var(--accent-soft);
  --bs-table-hover-color: var(--text);
  color: var(--text);
}
.data-table thead th { padding: .55rem .7rem; }
.data-table tbody td { padding: .5rem .7rem; font-size: .875rem; }

/* —— Forms —— */
.form-control,
.form-select,
select.form-select {
  background-color: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  border-radius: .4rem;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(11, 107, 203, .15) !important;
}
.form-label { color: var(--muted); font-size: .8rem; font-weight: 500; margin-bottom: .3rem; }
.form-select,
select.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235c6b7e'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 14px 10px;
}
.list-group-item {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--border);
}
.alert-dark {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--border);
}

/* —— Buttons —— */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 550;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-outline-light,
.btn-outline-secondary {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--panel);
}
.btn-outline-light:hover,
.btn-outline-secondary:hover {
  color: var(--text);
  background: var(--panel-soft);
  border-color: var(--border-strong);
}
.btn-outline-info { color: var(--accent); border-color: #9ec5ea; }
.btn-outline-info:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent); }
.btn-outline-warning { color: var(--warning); border-color: #f0c78a; }
.btn-outline-danger { color: var(--danger); border-color: #ef9a9a; }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-warning { color: #fff; background: #c2410c; border-color: #c2410c; }
.btn-actions { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.btn-actions .btn { font-size: .75rem; padding: .22rem .5rem; line-height: 1.3; white-space: nowrap; }
td .btn-icon {
  width: auto; min-width: 2rem; height: 1.85rem; padding: 0 .45rem;
  line-height: 1; font-size: .75rem;
  display: inline-flex; align-items: center; justify-content: center;
}

/* —— Progress / status (see ops-progress below) —— */

/* —— Modals —— */
.modal-content,
.modal-content.card-dark {
  background: var(--panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: .65rem;
  box-shadow: 0 16px 48px rgba(26, 35, 50, .18);
}
.modal-header, .modal-footer {
  border-color: var(--border) !important;
  background: var(--panel-soft);
}
.modal-title { font-weight: 600; color: var(--text); }
.btn-close { filter: none; opacity: .55; }
.btn-close-white { filter: none; }

/* —— Top bar —— */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 4px 18px rgba(26, 35, 50, .05);
}
.app-topbar-inner {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr);
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  gap: .5rem;
  padding: .55rem .9rem;
}
.app-topbar-title {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 11rem;
  min-width: 0;
  max-width: 11rem;
}
a.app-topbar-title { color: inherit; text-decoration: none; }
a.app-topbar-title:hover { color: var(--accent); text-decoration: none; opacity: 1; }

.app-topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: .28rem;
  margin: 0;
  justify-content: center;
  flex: 0 0 auto;
}
.app-topbar-account { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; min-width: 0; }
.login-user {
  display: flex; align-items: center; gap: .38rem;
  color: var(--muted); font-size: .8rem; white-space: nowrap;
  max-width: 11rem; overflow: hidden; text-overflow: ellipsis;
}
.login-user-dot {
  width: .48rem; height: .48rem; flex: 0 0 auto; border-radius: 50%;
  background: var(--success); box-shadow: none;
}
.logout-button {
  color: var(--danger); background: transparent;
  border: 1px solid #ef9a9a; border-radius: .4rem;
  padding: .3rem .55rem; font-size: .78rem; line-height: 1.2; white-space: nowrap;
}
.logout-button:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

.ai-help-button {
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid #9ec5ea; border-radius: .4rem;
  padding: .3rem .62rem; font-size: .78rem; white-space: nowrap; font-weight: 550;
}
.ai-help-button:hover { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: none; }

.nav-group { position: relative; }
.nav-group-toggle {
  display: flex; align-items: center; gap: .35rem;
  color: var(--text); background: transparent;
  border: 1px solid transparent; border-radius: .4rem;
  padding: .32rem .68rem; font-size: .82rem; line-height: 1.2; white-space: nowrap;
  transition: .15s ease; font-weight: 500;
}
.nav-group-toggle span { color: var(--muted); transition: transform .18s ease; }
.nav-group:hover .nav-group-toggle,
.nav-group:focus-within .nav-group-toggle,
.nav-group.active .nav-group-toggle,
.nav-group.open .nav-group-toggle {
  color: var(--accent); border-color: #9ec5ea; background: var(--accent-soft); box-shadow: none;
}
.nav-group:hover .nav-group-toggle span,
.nav-group:focus-within .nav-group-toggle span,
.nav-group.open .nav-group-toggle span { transform: rotate(180deg); color: var(--accent); }
.nav-submenu {
  display: none; position: absolute; top: calc(100% - 1px); left: 0;
  min-width: 150px; padding: .4rem;
  border: 1px solid var(--border); border-radius: 0 0 .5rem .5rem;
  background: var(--panel); box-shadow: var(--shadow); z-index: 1100;
}
.nav-submenu-end { left: auto; right: 0; }
.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu,
.nav-group.open .nav-submenu { display: grid; gap: .15rem; }
.nav-submenu a,
.nav-submenu a:link,
.nav-submenu a:visited {
  color: var(--text) !important; text-decoration: none !important;
  white-space: nowrap; border-radius: .35rem; padding: .45rem .62rem; font-size: .82rem;
}
.nav-submenu a:hover,
.nav-submenu a.active { color: #fff !important; background: var(--accent); }

.app-topbar-nav a.btn,
.app-topbar-nav a.btn:link,
.app-topbar-nav a.btn:visited {
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  background: transparent !important;
  text-decoration: none !important;
  white-space: nowrap;
  padding: .22rem .5rem;
  font-size: .8rem;
  line-height: 1.2;
}
.app-topbar-nav a.btn:hover,
.app-topbar-nav a.btn.active {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border-color: #9ec5ea !important;
}

/* —— AI help (light) —— */
.ai-help-dialog { width: calc(100vw - 32px); max-width: 1600px; margin: 2vh auto; }
.ai-help-modal {
  display: flex; flex-direction: column; height: 96vh; max-height: 1000px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: .65rem; overflow: hidden;
  box-shadow: 0 20px 60px rgba(26, 35, 50, .18);
}
.ai-help-header {
  flex: 0 0 auto; min-height: 72px; padding: 1rem 1.25rem;
  border-color: var(--border) !important;
  background: var(--panel-soft);
}
.ai-help-modal .modal-body {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
  overflow: hidden; padding: 1.1rem 1.25rem 1.2rem;
}
.ai-help-modal .btn-close { filter: none; opacity: .55; }
.ai-logo {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  color: #fff; font-weight: 800;
  background: var(--accent); box-shadow: none;
}
.ai-help-modal .modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.ai-subtitle { color: var(--muted); margin-top: .15rem; }
.ai-help-modal #aiServerSelect {
  flex: 0 0 auto; height: 42px; border-color: var(--border);
  background-color: var(--panel); font-weight: 600; color: var(--text);
}
.ai-metric-grid { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.ai-metric {
  position: relative; overflow: hidden; padding: .85rem 1rem;
  border: 1px solid var(--border); border-radius: .5rem;
  background: var(--panel-soft); display: flex; flex-direction: column; gap: .2rem; min-height: 90px;
}
.ai-metric::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.ai-metric span, .ai-metric small { color: var(--muted); font-size: .75rem; }
.ai-metric strong { font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); }
.ai-metric.warn { border-color: #f0c78a; }
.ai-metric.warn::before { background: var(--warning); }
.ai-metric.danger { border-color: #ef9a9a; background: #fff5f5; }
.ai-metric.danger::before { background: var(--danger); }
.ai-metric.normal strong { color: var(--accent); }
.ai-quick-actions {
  flex: 0 0 auto; display: flex; align-items: center; gap: .5rem;
  overflow-x: auto; overflow-y: visible; padding: .15rem 0; min-height: 2.5rem;
}
.ai-quick-actions button {
  flex: 0 0 auto; padding: .45rem .75rem; color: var(--accent);
  background: var(--accent-soft); border: 1px solid #9ec5ea; border-radius: .4rem;
  font-size: .8rem; font-weight: 600; white-space: nowrap; transition: .15s ease;
}
.ai-quick-actions button:hover { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: none; }
.ai-conversation {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1rem;
  border: 1px solid var(--border); border-radius: .5rem;
  background: var(--panel-soft) !important;
  display: flex; flex-direction: column; gap: .7rem;
  scrollbar-color: var(--border-strong) transparent;
}
.ai-message {
  width: auto; max-width: 94%; padding: .7rem .9rem; border-radius: .5rem;
  font-size: .88rem; line-height: 1.6; white-space: normal; box-shadow: none;
}
.ai-message.assistant {
  align-self: flex-start; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-top-left-radius: .2rem;
}
.ai-message.assistant.detail { background: var(--panel); border-color: var(--border); color: var(--text); }
.ai-message.user {
  align-self: flex-end; background: var(--accent); color: #fff; border-top-right-radius: .2rem;
}
.ai-message.danger { border-color: var(--danger); background: #fff5f5; color: var(--danger); }
.ai-waiting { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .7rem; min-width: 260px; }
.ai-waiting small { grid-column: 2; color: var(--muted); font-size: .75rem; }
.ai-thinking-dots { display: flex; align-items: center; gap: 4px; }
.ai-thinking-dots i {
  display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: aiThinking 1.15s ease-in-out infinite;
}
.ai-thinking-dots i:nth-child(2) { animation-delay: .15s; }
.ai-thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aiThinking {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.ai-chat-form { display: flex; align-items: stretch; gap: .7rem; flex: 0 0 auto; }
.ai-chat-form .form-control {
  height: 48px; background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: .5rem; padding: 0 1rem;
}
.ai-chat-form .form-control:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 107, 203, .12);
}
.ai-send-button {
  flex: 0 0 104px; min-width: 104px; height: 48px;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  white-space: nowrap; border: 0; border-radius: .5rem; color: #fff;
  background: var(--accent); font-size: .88rem; font-weight: 700; box-shadow: none;
}
.ai-send-button:hover { filter: brightness(1.05); transform: none; }
.ai-send-button:disabled { cursor: wait; opacity: .62; }
.ai-send-button b { font-size: 1.1rem; }

/* —— Login —— */
.login-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--bg);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr minmax(320px, 440px);
}
.login-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 20% 10%, #d7e6f5 0%, transparent 55%),
    linear-gradient(155deg, #e8eef5 0%, #dfe8f2 55%, #d2deeb 100%);
}
.login-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center left;
  opacity: .92;
}
.login-visual-overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem 2.75rem 3rem;
  background: linear-gradient(180deg, rgba(238,242,246,.12) 0%, rgba(26,35,50,.58) 100%);
  color: #fff;
}
.login-visual-brand {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: .65rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.login-visual-lead {
  max-width: 28rem;
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(255,255,255,.92);
}
.login-visual-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.login-visual-points li {
  padding: .35rem .7rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: .4rem;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
  font-size: .82rem;
  font-weight: 500;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.5rem;
  background:
    radial-gradient(600px 320px at 100% 0%, #e4edf6 0%, transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: .65rem;
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
}
.login-card .brand {
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 1.35rem;
  margin-bottom: .2rem;
}
.login-card .brand-sub {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 1.25rem;
}
.login-card .form-control { height: 2.55rem; }
.login-card .btn-primary { height: 2.65rem; font-weight: 600; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 220px; max-height: 38vh; }
  .login-visual-overlay { justify-content: flex-end; padding: 1.25rem 1.25rem 1.4rem; }
  .login-visual-brand { font-size: 1.65rem; }
  .login-visual-lead { font-size: .92rem; margin-bottom: .7rem; }
  .login-visual-points { display: none; }
  .login-panel { padding: 1.25rem 1rem 2rem; align-items: flex-start; }
}

.ellip {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.link-info { color: var(--accent) !important; }

@media (max-width: 900px) {
  .app-topbar-inner { grid-template-columns: auto 1fr auto; }
  .app-topbar-title { max-width: 7rem; }
  .app-topbar-nav { overflow-x: auto; justify-content: flex-start; max-width: 100%; padding-bottom: .2rem; }
  .login-user { display: none; }
  .ai-help-button { font-size: 0; width: 2rem; height: 2rem; padding: 0; }
  .ai-help-button::first-letter { font-size: .9rem; }
  .ai-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-help-dialog { width: calc(100vw - 12px); margin: 1vh auto; }
  .ai-help-modal { height: 98vh; }
  .ai-message { max-width: 96%; }
}

/* —— Ops progress / toast / notice —— */
.ops-progress {
  background: #eef6fc !important;
  color: var(--text) !important;
  border: 1px solid #b7d4ef !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .85rem 1rem !important;
}
.ops-progress .ops-progress-title {
  font-weight: 650;
  font-size: 1rem;
  color: var(--text);
}
.ops-progress .ops-progress-detail,
#pageRunProgress #pageRunProgressDetail {
  font-family: var(--mono);
  word-break: break-all;
  font-size: .82rem;
  color: var(--muted);
}
.ops-progress .progress {
  height: 6px;
  background: #d9e8f5;
  border-radius: 99px;
  overflow: hidden;
}
.ops-progress .progress-bar {
  background: var(--accent) !important;
}
#pageRunProgress.ops-progress,
#runProgressBanner.ops-progress {
  background: #eef6fc !important;
  border-color: #b7d4ef !important;
  color: var(--text) !important;
}
.alert-progress,
#pageRunProgress.alert {
  background: #eef6fc !important;
  color: var(--text) !important;
  border: 1px solid #b7d4ef !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
body.backup-running { cursor: progress; }

.ops-toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.ops-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .65rem;
  align-items: start;
  padding: .75rem .85rem;
  border-radius: .55rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(26, 35, 50, .14);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.ops-toast.show { opacity: 1; transform: translateY(0); }
.ops-toast-mark {
  width: .42rem;
  height: 100%;
  min-height: 2.1rem;
  border-radius: 99px;
  background: var(--accent);
  margin-top: .1rem;
}
.ops-toast-body strong {
  display: block;
  font-size: .78rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: .15rem;
}
.ops-toast-msg {
  font-size: .9rem;
  line-height: 1.4;
  color: var(--text);
}
.ops-toast-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 .15rem;
}
.ops-toast-close:hover { color: var(--text); }
.ops-toast-success { border-color: #b7dfc8; background: #f3faf6; }
.ops-toast-success .ops-toast-mark { background: var(--success); }
.ops-toast-error { border-color: #f0c0c0; background: #fff7f7; }
.ops-toast-error .ops-toast-mark { background: var(--danger); }
.ops-toast-warn { border-color: #f0d3a8; background: #fff9f0; }
.ops-toast-warn .ops-toast-mark { background: var(--warning); }
.ops-toast-info { border-color: #b7d4ef; background: #f3f8fc; }
.ops-toast-info .ops-toast-mark { background: var(--accent); }

.ops-notice .modal-header {
  background: var(--panel-soft);
}
.ops-notice .modal-title { font-size: 1rem; }
.ops-notice-short {
  margin: 0 0 .5rem;
  font-size: .95rem;
  color: var(--text);
}
.ops-notice-detail {
  margin: 0;
  padding: .65rem .75rem;
  max-height: 220px;
  overflow: auto;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: .4rem;
  color: var(--muted);
  font-size: .8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* —— 2026 admin shell: navy sidebar + clean dashboard canvas —— */
:root {
  --sidebar: #142238;
  --sidebar-active: #243b60;
  --shell-top: 64px;
  --shell-side: 276px;
  --bg: #f3f6fb;
  --border: #dfe5ee;
  --text: #10213a;
  --muted: #71809a;
  --accent: #2867d8;
  --accent-hover: #1f55b8;
  --radius: .8rem;
  --shadow: 0 2px 10px rgba(16, 33, 58, .045);
}
body:not(.login-page) {
  padding: var(--shell-top) 0 2rem var(--shell-side);
  background: var(--bg);
}
body:not(.login-page) > .container,
body:not(.login-page) > .container-fluid,
body:not(.login-page) > .container-xxl {
  max-width: none;
  padding-left: 2rem;
  padding-right: 2rem;
}
.app-topbar {
  position: static; border: 0; box-shadow: none; background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  filter: none; transform: none; perspective: none; contain: none;
}
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1040;
  width: var(--shell-side); padding: 1.75rem 1.15rem;
  color: #fff; background: linear-gradient(180deg, #17263e 0%, #111e32 100%);
  overflow-y: auto;
}
.app-brand {
  display: flex; align-items: center; gap: .85rem; margin: 0 .55rem 2.65rem;
  color: #fff !important; text-decoration: none; font-size: 1.08rem; font-weight: 750;
}
.app-brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: #2f6fe4; font-weight: 800; box-shadow: 0 6px 14px rgba(47,111,228,.25);
}
.app-nav-label { margin: 0 .85rem .8rem; color: #82a4d5; font-size: .68rem; font-weight: 700; letter-spacing: .16em; }
.app-topbar-nav { display: grid; gap: .3rem; width: 100%; }
.nav-group { width: 100%; }
.nav-group-toggle {
  width: 100%; min-height: 48px; padding: .72rem .9rem; gap: .78rem;
  border: 0; border-radius: .7rem; color: #c9d6e8; font-size: .91rem; font-weight: 600;
  transition: color .16s ease, background-color .16s ease;
}
.nav-group-toggle b { width: 1.25rem; color: #9db9df; font-size: 1rem; text-align: center; font-weight: 500; }
.nav-group-toggle span { margin-left: auto; color: #8fa5c2; font-size: .72rem; transition: transform .2s ease; }
.nav-group:not(.open):hover .nav-group-toggle span,
.nav-group:not(.open):focus-within .nav-group-toggle span { transform: none; }
.nav-group-toggle:hover,
.nav-group-toggle:focus-visible,
.nav-group.active .nav-group-toggle,
.nav-group.open .nav-group-toggle { color: #fff; border: 0; background: var(--sidebar-active); }
.nav-group.open .nav-group-toggle span { transform: rotate(180deg); }
.nav-submenu,
.nav-submenu-end {
  display: grid; position: static; min-width: 0; max-height: 0; overflow: hidden;
  margin: 0 0 0 2.75rem; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  opacity: 0; transition: max-height .24s ease, opacity .18s ease, margin .24s ease, padding .24s ease;
}
.nav-group.open .nav-submenu { display: grid; max-height: 260px; margin-top: .22rem; margin-bottom: .5rem; padding: .12rem 0; opacity: 1; }
.nav-submenu a, .nav-submenu a:link, .nav-submenu a:visited {
  position: relative; color: #aebed3 !important; padding: .48rem .72rem; font-size: .82rem;
}
.nav-submenu a::before { content: ''; position: absolute; left: -.72rem; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: #637b9c; transform: translateY(-50%); }
.nav-submenu a:hover { color: #fff !important; background: rgba(255,255,255,.06); }
.nav-submenu a.active { color: #fff !important; background: rgba(47,111,228,.24); font-weight: 650; }
.nav-submenu a.active::before { background: #69a0ff; box-shadow: 0 0 0 3px rgba(105,160,255,.15); }
.ai-help-button {
  width: calc(100% - 1rem); margin: 1.2rem .5rem 0; padding: .65rem;
  color: #dce8fb; border-color: rgba(157,185,223,.3); background: rgba(40,103,216,.16);
}
.ai-help-button:hover { background: #2867d8; }
.app-utilitybar {
  position: fixed; left: var(--shell-side); right: 0; top: 0; z-index: 1030;
  height: var(--shell-top); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
}
.app-utility-title { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.app-menu-toggle { display: none; border: 0; background: transparent; color: var(--text); font-size: 1.35rem; padding: .25rem; }
.app-sidebar-backdrop { display: none; }
.app-topbar-title { max-width: none; color: var(--text); font-size: .94rem; }
.app-topbar-account { gap: .8rem; }
.login-user-dot { display: none; }
.login-user { color: var(--muted); font-size: .82rem; }
.logout-button { color: var(--text); border-color: var(--border); background: #fff; padding: .42rem .8rem; }
.logout-button:hover { background: #f7f9fc; color: var(--text); border-color: #c9d2df; }
.card, .panel { border-color: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: #fff; border-bottom-color: var(--border); font-weight: 650; }
.table thead th, .table-dark thead th { background: #f7f9fc !important; }
.btn { border-radius: .48rem; }

@media (max-width: 900px) {
  :root { --shell-side: 0px; }
  body:not(.login-page) { padding-left: 0; padding-top: 60px; }
  .app-sidebar { transform: translateX(-100%); width: 276px; transition: transform .22s ease; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .app-menu-toggle { display: inline-flex; }
  .app-sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; border: 0; background: rgba(8,18,34,.48); }
  body.sidebar-open .app-sidebar-backdrop { display: block; }
  .app-utilitybar { left: 0; height: 60px; padding: 0 1rem; }
  body:not(.login-page) > .container,
  body:not(.login-page) > .container-fluid,
  body:not(.login-page) > .container-xxl { padding-left: 1rem; padding-right: 1rem; }
}
