/* ==========================================================================
   Azure Cloud Manager - 生产级现代控制台极简高质感样式系统
   ========================================================================== */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #f0f9ff;
  --primary-border: #bae6fd;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

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

html {
  background-color: #f8fafc !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8fafc !important;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  overflow-anchor: none;
}

/* 顶部导航 */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin-left: auto;
}

.nav-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: middle;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-link.active {
  color: var(--primary) !important;
  background-color: var(--primary-light) !important;
  font-weight: 600;
}

/* 布局容器 */
.container {
  max-width: 1380px;
  margin: 1.25rem auto;
  padding: 0 1.25rem;
  flex: 1;
  width: 100%;
}

/* 卡片 */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 网格系统 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* 创建 VM 页沿用 Azure Portal 的“标签列 + 控件列”单页布局。 */
.vm-create-page {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.vm-create-card {
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.vm-create-title {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.vm-create-section {
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.vm-create-section:last-of-type {
  margin-bottom: 0;
}

.vm-create-section-title {
  margin-bottom: 0.35rem;
  padding-bottom: 0.65rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
}

.azure-form-row {
  display: grid;
  grid-template-columns: minmax(190px, 27%) minmax(0, 1fr);
  column-gap: 2rem;
  align-items: start;
  padding: 0.7rem 0;
}

.azure-form-label {
  min-width: 0;
  padding-top: 0.52rem;
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.azure-form-label .field-hint,
.field-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.azure-form-control {
  min-width: 0;
}

.azure-form-control > .custom-dropdown-container,
.azure-form-control > .form-control,
.azure-form-control > .ui-native-dropdown {
  width: 100%;
  min-width: 0;
}

.azure-form-help {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.azure-form-status {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--primary);
  font-size: 0.75rem;
}

.spec-loading-spinner {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.35em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.12em;
  animation: specLoadingSpin 0.75s linear infinite;
}

@keyframes specLoadingSpin {
  to { transform: rotate(360deg); }
}

.azure-form-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.vm-auth-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  min-height: 2rem;
  padding-top: 0.25rem;
  font-size: 0.8125rem;
}

.vm-auth-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.vm-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.vm-create-actions .btn {
  min-width: 8rem;
}

.vm-create-page .custom-dropdown-btn > span,
.vm-create-page .ui-native-dropdown-button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.35rem;
  line-height: 1.25;
  display: block;
}

/* 表格规范 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8125rem;
  table-layout: auto;
}

.table th {
  background-color: #f8fafc;
  padding: 0.5rem 0.55rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  white-space: nowrap;
}

.table td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  white-space: nowrap;
}

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

.table tr:hover td {
  background-color: #f8fafc;
}

.table .table-actions {
  text-align: right;
  white-space: nowrap;
}

.table .table-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .table-description {
  white-space: normal;
  overflow-wrap: anywhere;
}

.table .table-state {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
}

.table .table-status {
  text-align: center;
}

.table .table-center {
  text-align: center;
}

.table .table-id,
.table .table-compact {
  white-space: nowrap;
  font-size: 0.75rem;
}

/* 按钮微缩紧凑规范 (保持 13px 字号与详情页完全协调一致) */
.btn-group-nowrap {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  border-radius: 5px;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
}

/* 按钮规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.btn-primary { background-color: var(--primary); border-color: var(--primary); color: #ffffff; }
.btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); color: #ffffff; }

.btn-outline { background-color: #ffffff; border-color: var(--border-color); color: var(--text-main); }
.btn-outline:hover { background-color: #f1f5f9; border-color: #cbd5e1; color: var(--text-main); }

.btn-outline.active, .btn.active {
  background-color: #e0f2fe !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.btn-warning { background: var(--warning); color: white; border-color: var(--warning); }
.btn-sm { padding: 0.25rem 0.55rem; font-size: 0.8rem; }

/* 按钮禁用规范 */
.btn:disabled, .btn[disabled], .disabled-locked {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background-color: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #e2e8f0 !important;
}

/* 详情链接保持常态可用 */
a.btn.btn-outline.btn-xs {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

/* 徽章规范 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1;
  white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid var(--border-color); }
.badge-primary { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }

/* 状态徽章内的旋转/提示图标统一尺寸，并继承徽章的语义颜色。 */
.status-icon {
  width: 12px !important;
  height: 12px !important;
  flex: 0 0 12px;
  fill: currentColor;
  color: inherit;
  vertical-align: -0.12em;
}

.status-icon-info {
  color: var(--primary);
}

/* 代码字体规范 */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  padding: 0.15rem 0.35rem;
  background-color: #f1f5f9;
  border-radius: 4px;
  color: #0369a1;
}

/* IP 地址使用等宽数字，避免不同数字宽度导致视觉跳动。 */
.ip-address {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0.015em;
}

.vm-list-table .ip-address {
  font-size: 0.8rem;
}

/* 表单控件 */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.15s ease;
}

.toolbar-select {
  width: auto;
  min-width: 12rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* 共享下拉组件；创建页通过 data-dropdown-flow="down" 强制向下展开 */
.custom-dropdown-container {
  position: relative;
  width: 100%;
}

.custom-dropdown-btn {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}

.custom-dropdown-btn:hover {
  border-color: #94a3b8;
}

.custom-dropdown-btn > svg:last-child {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px;
  fill: var(--text-muted);
  transition: transform 0.15s ease;
}

.custom-dropdown-container.open .custom-dropdown-btn > svg:last-child {
  transform: rotate(180deg);
}

.custom-dropdown-container.open .custom-dropdown-btn {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.custom-dropdown-menu,
.ui-native-dropdown-menu {
  position: fixed;
  top: auto;
  bottom: auto;
  left: 0;
  right: auto;
  width: max-content;
  min-width: 160px;
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
  padding: 0.25rem 0;
}

.custom-dropdown-container.open .custom-dropdown-menu,
.ui-native-dropdown.open .ui-native-dropdown-menu {
  display: block;
}

.ui-native-dropdown {
  position: relative;
  width: 100%;
}

.ui-native-dropdown.toolbar-select-container {
  width: auto;
  min-width: 12rem;
  max-width: min(100%, 32rem);
}

.toolbar-select-container .ui-native-dropdown-button {
  width: auto;
  min-width: 12rem;
  max-width: 100%;
}

.ui-native-select-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.ui-native-dropdown-menu {
  display: none;
  padding: 0.25rem 0;
}

.ui-native-dropdown-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  padding-right: 2rem;
}

.ui-native-dropdown-button::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-left: 0.75rem;
  background: var(--text-muted);
  clip-path: polygon(29% 42%, 50% 63%, 71% 42%);
  transition: transform 0.15s ease;
}

.ui-native-dropdown.open .ui-native-dropdown-button::after {
  transform: rotate(180deg);
}

.ui-native-dropdown-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ui-native-dropdown-group {
  padding: 0.4rem 0.75rem 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: #f8fafc;
}

.ui-native-dropdown-menu [role="option"] {
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-native-dropdown-menu [role="option"]:hover,
.ui-native-dropdown-menu [role="option"].highlighted {
  background-color: var(--primary-light);
  color: var(--primary);
}

.ui-native-dropdown-menu [role="option"].selected {
  background-color: #e0f2fe;
  color: var(--primary);
  font-weight: 600;
}

.ui-native-dropdown-menu [role="option"].disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: #f8fafc;
}

.ui-native-dropdown-empty {
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
}

.custom-dropdown-group-title {
  padding: 0.4rem 0.75rem 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: #f8fafc;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.custom-dropdown-group-title:first-child {
  border-top: none;
}

.custom-dropdown-item {
  padding: 0.4rem 0.75rem;
  font-size: 0.84rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.1s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-dropdown-item:hover {
  background-color: #f0f9ff;
  color: var(--primary);
}

.custom-dropdown-item.selected {
  background-color: #e0f2fe;
  color: var(--primary);
  font-weight: 600;
}

.custom-dropdown-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: #f8fafc;
  pointer-events: auto;
}

.vm-toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  white-space: nowrap;
}

/* 升降配规格下拉沿用创建页分组样式，并限制长规格文本不撑破弹窗 */
#resize-size-custom-dropdown {
  min-width: 0;
  max-width: 100%;
}

#resize-size-custom-dropdown .custom-dropdown-btn {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

#resize-size-custom-dropdown .custom-dropdown-btn > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#resize-size-custom-dropdown .custom-dropdown-menu {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
}

#resize-size-custom-dropdown .custom-dropdown-item {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#resize-vm-modal .modal-content {
  max-height: none;
  overflow: visible;
}

/* 提示通知 (精巧自适应居中宽度，告别全屏超长长条) */
.alert {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  min-width: 360px;
  max-width: 680px;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  margin-bottom: 0;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.alert-info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* 模态弹窗规范 (主流云控制台标准：纯净暗色聚焦，绝不使用毛玻璃模糊背景) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: none;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

body.modal-open { overflow: hidden; }

.firewall-rule-modal-content {
  max-width: 720px;
  padding: 1.25rem 1.5rem;
}

.firewall-rule-modal-content .modal-header {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
}

.firewall-rule-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0.85rem;
  row-gap: 0.85rem;
}

.firewall-rule-form-grid .form-group {
  min-width: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.firewall-rule-form-grid .form-label {
  min-height: 2.5rem;
  margin-bottom: 0.35rem;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
}

.firewall-rule-form-grid .form-control {
  box-sizing: border-box;
}

.firewall-rule-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .firewall-rule-form-grid {
    grid-template-columns: 1fr;
    row-gap: 0.85rem;
  }

  .firewall-rule-form-grid .form-label {
    min-height: 0;
  }
}

.modal-content {
  background-color: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border-color);
  animation: modalPopIn 0.15s ease-out;
}

@keyframes modalPopIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background-color: #f1f5f9;
  color: var(--danger);
}

/* 顶部导航与活动通知 */
.nav-bell-btn {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.nav-bell-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-bell-badge.badge-running {
  background-color: #0284c7;
  animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* Azure 风格右侧抽屉式通知中心 (主流云厂商标准：背景 100% 锐利清晰无模糊，多层立体投影) */
.azure-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  backdrop-filter: none;
  z-index: 150;
  display: none;
}

.azure-drawer-overlay.open {
  display: block;
}

.azure-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.12), -2px 0 8px rgba(15, 23, 42, 0.05);
  z-index: 160;
  display: flex;
  flex-direction: column;
  transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border-color);
}

.azure-drawer.open {
  right: 0;
}

.azure-drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
}

.azure-drawer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.azure-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: #f8fafc;
}

.azure-task-item {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.azure-task-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
}

.azure-task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.azure-task-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.azure-task-msg {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.azure-task-progress {
  height: 3px;
  width: 100%;
  background-color: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.45rem;
  position: relative;
}

.azure-task-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background-color: var(--primary);
  width: 100%;
  animation: azureProgressSmooth 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

@keyframes azureProgressSmooth {
  0% { transform: translateX(-100%) scaleX(0.5); }
  50% { transform: translateX(0%) scaleX(0.8); }
  100% { transform: translateX(100%) scaleX(0.5); }
}

/* 旋转 Spinner 动效 */
.spin {
  animation: spinLoading 0.85s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

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

/* 数据淡入动效 */
.fade-in {
  animation: fadeInEffect 0.2s ease-in-out;
}

@keyframes fadeInEffect {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* 图表网格 */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

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

.chart-canvas-box {
  position: relative;
  height: 200px;
  width: 100%;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: #ffffff;
}
/* 费用页排版：沿用全局无衬线字体，数字使用等宽宽度而非等宽字形 */
.costs-page {
  font-family: inherit;
}

.costs-page .costs-id,
.costs-page .costs-amount,
.costs-page .costs-currency {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.costs-page .costs-id {
  color: var(--text-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.costs-page .costs-amount {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.costs-page .costs-currency {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 400;
}

/* 费用摘要文字与页面其他统计项保持同一视觉层级，避免状态文字过度放大 */
.costs-page .costs-summary-value {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

.costs-page .costs-total-value {
  min-height: 1.35em;
}

.costs-page .costs-scope-value {
  overflow-wrap: anywhere;
}

/* VMS 列表只保留外层卡片边界，表格响应式容器不再形成额外视觉层 */
.vm-list-card {
  box-shadow: none;
}

.vm-list-card .vm-list-table {
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* 全局文字按钮加载动效：操作按钮不依赖静态图标 */
.btn-loading-spinner {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.35em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.12em;
  animation: buttonLoadingSpin 0.75s linear infinite;
}

@media (max-width: 760px) {
  .vm-create-card {
    padding: 1.25rem;
  }

  .azure-form-row {
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
    padding: 0.6rem 0;
  }

  .azure-form-label {
    padding-top: 0;
  }

  .azure-form-inline-grid {
    grid-template-columns: 1fr;
  }

  .vm-create-actions {
    justify-content: stretch;
  }

  .vm-create-actions .btn {
    flex: 1 1 0;
  }
}

@keyframes buttonLoadingSpin {
  to { transform: rotate(360deg); }
}
