/* ==========================================================================
   TPlus 客户系统运维导航 - 现代化高颜值样式系统 (Style System 3.0)
   保留经典合理分区结构：顶部横幅 + 左侧服务状态总览 + 右侧控制台/快捷入口 + 下方客户矩阵
   ========================================================================== */

:root {
  /* 浅色主题变量 (Light Theme) */
  --bg-body: #eef3f9;
  --bg-body-gradient: linear-gradient(180deg, #e3ecf7 0%, #edf3f9 320px, #f4f7fb 100%);
  --panel-bg: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --panel-subtle: #f6f9fc;
  --panel-muted: #edf2f7;

  --border-color: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #8493a8;

  --brand: #1f64db;
  --brand-dark: #164bb0;
  --brand-soft: rgba(31, 100, 219, 0.08);
  --brand-border: rgba(31, 100, 219, 0.2);
  --brand-glow: rgba(31, 100, 219, 0.25);

  --success: #0d9668;
  --success-soft: rgba(13, 150, 104, 0.1);
  --success-border: rgba(13, 150, 104, 0.25);
  --success-glow: rgba(13, 150, 104, 0.4);

  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.1);
  --danger-border: rgba(225, 29, 72, 0.25);
  --danger-glow: rgba(225, 29, 72, 0.4);

  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.12);

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-panel: 0 10px 25px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 14px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, Menlo, monospace;
}

/* 深色主题变量 (Dark Theme) */
body[data-theme="dark"] {
  --bg-body: #0a0f1d;
  --bg-body-gradient: linear-gradient(180deg, #070a14 0%, #0c1222 360px, #0f172a 100%);
  --panel-bg: rgba(17, 24, 39, 0.88);
  --panel-solid: #111827;
  --panel-subtle: #192237;
  --panel-muted: #222f4b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #3b82f6;

  --text-main: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --brand: #3b82f6;
  --brand-dark: #2563eb;
  --brand-soft: rgba(59, 130, 246, 0.14);
  --brand-border: rgba(59, 130, 246, 0.3);
  --brand-glow: rgba(59, 130, 246, 0.35);

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --success-border: rgba(52, 211, 153, 0.3);
  --success-glow: rgba(52, 211, 153, 0.5);

  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.14);
  --danger-border: rgba(251, 113, 133, 0.3);
  --danger-glow: rgba(251, 113, 133, 0.5);

  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.16);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-panel: 0 12px 28px -4px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-hover: 0 16px 36px -4px rgba(0, 0, 0, 0.65), 0 0 16px rgba(59, 130, 246, 0.2);
}

/* ==========================================================================
   Base Reset
   ========================================================================== */

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-body-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* 细腻科技微网格装饰背景 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(31, 100, 219, 0.08), transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(13, 150, 104, 0.06), transparent 25%),
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  pointer-events: none;
  z-index: 0;
}

body[data-theme="dark"]::before {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.12), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(52, 211, 153, 0.08), transparent 30%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==========================================================================
   Layout Shell
   ========================================================================== */

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1520px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

/* 通用面板容器 (毛玻璃 + 细腻边框 + 投影) */
.hero-panel,
.table-panel,
.toolbar-panel,
.quick-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ==========================================================================
   Zone 1: Top Hero Header (顶部横幅)
   ========================================================================== */

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #102446 0%, #17386d 50%, #1e4d94 100%);
  color: #ffffff;
  margin-bottom: 14px;
  box-shadow: 0 12px 30px -4px rgba(16, 36, 70, 0.35);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.hero-text {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 6px;
  line-height: 1.45;
}

.hero-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hero-chip {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  text-align: left;
  min-width: 105px;
}

.hero-chip span {
  display: block;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.hero-chip strong {
  display: block;
  margin-top: 2px;
  font-size: 1.25rem;
  font-weight: 750;
  font-family: var(--font-mono);
  color: #ffffff;
}

/* ==========================================================================
   Zone 2: Home Grid (左右分栏区域：左侧监控总览 + 右侧控制台/快捷栏)
   ========================================================================== */

.home-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

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

.section-kicker {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.section-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.result-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* --- 左侧侧边栏：服务状态总览 --- */
.summary-panel {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

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

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: var(--panel-subtle);
  border: 1px solid var(--border-color);
  font-size: 0.84rem;
  transition: all 0.15s ease;
}

.summary-row:hover {
  background: var(--panel-solid);
  border-color: var(--border-strong);
}

.summary-row span {
  color: var(--text-secondary);
  font-weight: 600;
}

.summary-row strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text-main);
}

/* 环形图卡片 */
.summary-ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: var(--radius-lg);
  background: var(--panel-subtle);
  border: 1px solid var(--border-color);
  text-align: center;
  gap: 10px;
}

.rate-ring {
  --rate: 0deg;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--brand) 0deg, var(--brand) var(--rate), rgba(225, 29, 72, 0.22) var(--rate), rgba(225, 29, 72, 0.22) 360deg);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: background 0.4s ease;
}

.rate-ring-core {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--panel-solid);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.rate-ring-core strong {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
  color: var(--text-main);
}

.rate-ring-core span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- 右侧控制台主区 (home-main) --- */
.home-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.toolbar-panel-home {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolbar-row-home {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 搜索与分组下拉 */
.search-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-box span {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.search-box-input {
  flex: 1;
  min-width: 260px;
}

.search-box-select {
  width: 170px;
}

.search-box input,
.group-select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text-main);
  outline: none;
  font-size: 0.86rem;
  transition: all 0.15s ease;
}

.search-box input:focus,
.group-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 按钮规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
  margin-top: auto;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--brand-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--brand-glow);
}

.btn-secondary {
  background: var(--panel-solid);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  color: var(--text-main);
  background: var(--panel-subtle);
  border-color: var(--border-color);
  transform: translateY(-1px);
}

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

.btn-small {
  height: 30px;
  padding: 0 11px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* 分组概览胶囊栏 */
.toolbar-foot {
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.group-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.group-chip:hover {
  color: var(--text-main);
  border-color: var(--brand);
  background: var(--panel-subtle);
}

.group-chip.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.group-chip strong {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--panel-muted);
  color: var(--text-secondary);
}

.group-chip.is-active strong {
  background: var(--brand);
  color: #ffffff;
}

.toolbar-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 首屏快捷入口 */
.quick-panel-home {
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-access-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--panel-subtle);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.quick-link:hover {
  background: var(--panel-solid);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.quick-index {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand);
}

.quick-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-badge {
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: var(--panel-solid);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Zone 3: Bottom Client List (客户列表大面板)
   ========================================================================== */

.table-panel-primary {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-filter-group {
  display: inline-flex;
  background: var(--panel-muted);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.list-filter-btn {
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
}

.list-filter-btn.is-active {
  background: var(--panel-solid);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* 客户卡片网格 */
.group-accordion {
  min-height: 120px;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.site-card {
  background: var(--panel-solid);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.site-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
  border-top-color: var(--brand);
}

.site-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.site-card-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.site-card-title-row strong {
  font-size: 0.96rem;
  font-weight: 750;
  color: var(--text-main);
}

.site-card-url {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 4px;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-copy-url {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-copy-url:hover {
  color: var(--brand);
}

/* 状态徽标与呼吸灯 */
.site-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-online {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status-online::before {
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success-glow);
  animation: pulse-dot 2s infinite;
}

.status-offline {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.status-offline::before {
  background: var(--danger);
  box-shadow: 0 0 0 0 var(--danger-glow);
  animation: pulse-danger 2s infinite;
}

.status-checking {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-checking::before {
  background: var(--warning);
}

.status-unknown {
  background: var(--panel-muted);
  color: var(--text-muted);
}

.status-unknown::before {
  background: var(--text-muted);
}

.latency-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  color: var(--success);
}

.latency-muted {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* 备注信息 */
.remark-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--panel-subtle);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--brand);
  line-height: 1.4;
  word-break: break-all;
}

.remark-empty {
  display: none;
}

/* 卡片底栏与动作按钮 */
.site-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.site-card-meta span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-btn:hover {
  background: var(--panel-subtle);
  color: var(--brand);
  border-color: var(--brand);
}

.table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
  transition: all 0.15s ease;
}

.table-link:hover {
  background: var(--brand-dark);
}

/* 空状态 */
.accordion-empty,
.quick-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* Toast 微浮层 */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text-main);
  color: var(--panel-solid);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: toast-in 0.2s ease;
  transition: opacity 0.2s ease;
}

.toast-error {
  background: var(--danger) !important;
  color: #ffffff !important;
}

.toast-success {
  background: #0f172a;
  color: #ffffff;
}

body[data-theme="dark"] .toast-success {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-notice {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.notice-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.notice-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.is-spinning {
  animation: spin 0.9s linear infinite;
  display: inline-block;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 var(--success-glow); }
  70% { box-shadow: 0 0 0 5px rgba(13, 150, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 150, 104, 0); }
}

@keyframes pulse-danger {
  0% { box-shadow: 0 0 0 0 var(--danger-glow); }
  70% { box-shadow: 0 0 0 5px rgba(225, 29, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1080px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    display: grid;
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 768px) {
  .app-shell {
    padding: 10px 10px 40px;
  }

  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-panel {
    grid-template-columns: 1fr;
  }

  .toolbar-row-home {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box-input,
  .search-box-select {
    width: 100%;
  }

  .site-grid {
    grid-template-columns: 1fr;
  }
}
