:root {
  --navy-light: #2c3e63;
  --orange: #f7941d;
  --orange-dark: #e2790a;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 25px;
}

.page-desc {
  font-size: 15px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}

.search-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 8px;
  border: 1px solid var(--hairline, #e3e8f0);
  font-size: 14px;
  outline: none;
    background: var(--surface-1);
}

.search-wrap input:focus {
  border-color: var(--primary);
  background: var(--surface-1, #fff);
}

.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted, #6b7688);
}

.select-all-wrap {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-primary, #1c2b47);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom:0;
  margin-right:10px;
}


.counter {
  font-size: 13px;
  color: var(--text-muted, #6b7688);
  white-space: nowrap;
}

.counter strong {
  color: var(--text-primary, #1c2b47);
}

.country-grid {
  display: grid;
  gap: 18px;
}

.country-card {
  background: var(--surface-1, #ffffff);
  border: 1px solid var(--hairline, #e3e8f0);
  border-radius: 12px;
}

.country-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  /* background: linear-gradient(
    0deg,
    var(--surface-1, #fff),
    var(--surface-2, #fbfcfe)
  ); */
}

.country-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flag {
  font-size: 22px;
  line-height: 1;
}

.country-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #1c2b47);
}

.country-meta {
  font-size: 12px;
  color: var(--text-muted, #6b7688);
  margin-left: 2px;
  font-weight:400;
}

.country-head-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.country-select-all {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 0;
}


.country-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--info-bg, #eef3ff);
  color: var(--info, var(--navy-light));
}

.dc-body {
  border-top: 1px solid var(--hairline, #e3e8f0);
  padding: 14px 18px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap:20px;
}
.grid-20{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap:20px;
}

.country-card.collapsed .dc-body {
  display: none;
}

.dc-group,.dc-cloud-box {
  border: 1px solid var(--hairline, #e3e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-2, #fbfcfe);
}

.dc-group-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary, #1c2b47);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-group-title .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success, #1fa971);
  flex-shrink: 0;
}

label.subnet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-primary, #1c2b47);
  cursor: pointer;
  transition: background 0.12s;
  margin-bottom:0;
}

label.subnet-row:hover {
  background: var(--surface-2, #eef2f8);
}

label.subnet-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

label.subnet-row .ip {
  color: var(--text-muted, #6b7688);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
}

.subnet-row.hidden-by-search {
  display: none;
}

.save-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-1, #ffffff);
  border-top: 1px solid var(--hairline, #e3e8f0);
  padding: 14px 24px;
  display: flex;
  justify-content: center;
  box-shadow: 0 -4px 16px rgba(20, 30, 60, 0.06);
  z-index: 30;
}

.save-bar-inner {
  max-width: 1080px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.save-note {
  font-size: 13px;
  color: var(--text-muted, #6b7688);
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-muted, #6b7688);
  font-size: 14px;
  display: none;
}

.alert2 {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.alert2.success {
  background: var(--success-bg, #e6f6ee);
  color: var(--success, #1fa971);
}

.alert2.danger {
  background: var(--danger-bg, #fdeceb);
  color: var(--danger, #c0392b);
}

@media (max-width: 600px) {
  .sub-header {
    padding: 14px 16px;
  }

  main.sub-main {
    padding: 24px 14px 130px;
  }

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

  .search-wrap {
    max-width: none;
  }

  .save-bar-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}
