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

:root {
  --bg:            #07090f;
  --bg2:           #0c1220;
  --surface:       rgba(255,255,255,0.035);
  --surface-solid: #0f1929;
  --surface2:      rgba(255,255,255,0.065);
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(255,255,255,0.16);

  --text:          #eef2ff;
  --text-soft:     #8b9dc3;
  --text-muted:    #47556e;

  --up:    #10d97c;
  --down:  #ff3a5c;
  --warn:  #ffc046;
  --accent:      #5b8df8;
  --accent-glow: rgba(91,141,248,0.28);

  --radius:    14px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --header-h:  64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(91,141,248,0.09), transparent),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(124,92,252,0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Header ─────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(7,9,15,0.88);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

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

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo {
  height: 28px;
  filter: invert(1) brightness(2);
}

.app-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
  background: linear-gradient(130deg, #eef2ff 20%, #8b9dc3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.summary-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.summary-badge.up {
  background: rgba(16,217,124,0.1);
  color: var(--up);
  border: 1px solid rgba(16,217,124,0.2);
}

.summary-badge.up::before { background: var(--up); }

.summary-badge.down {
  background: rgba(255,58,92,0.1);
  color: var(--down);
  border: 1px solid rgba(255,58,92,0.2);
}

.summary-badge.down::before { background: var(--down); }

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

.last-refresh {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Hamburger ───────────────────────────────────── */

.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-soft);
  border-radius: 2px;
  transition: all 0.2s;
  transform-origin: center;
}

.btn-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.btn-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.btn-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(7,9,15,0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideDown 0.18s ease;
}

.mobile-menu.hidden { display: none; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mobile-menu-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #6d9df9;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface2);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-danger {
  background: var(--down);
  color: #fff;
  border: none;
}

.btn-danger:hover { opacity: 0.88; }

.btn-full { width: 100%; justify-content: center; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border-hover);
}

.btn-icon-danger:hover {
  color: var(--down) !important;
  border-color: var(--down) !important;
  background: rgba(255,58,92,0.08) !important;
}

.hidden { display: none !important; }

/* ── Main ────────────────────────────────────────── */

.main {
  position: relative;
  z-index: 1;
  padding: 28px 24px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Filters bar ─────────────────────────────────── */

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  align-items: center;
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.filter-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px 9px 38px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
}

.filter-search input:focus {
  border-color: var(--accent);
  background: rgba(91,141,248,0.05);
  box-shadow: 0 0 0 3px rgba(91,141,248,0.1);
}

.filter-search input::placeholder { color: var(--text-muted); }

.filter-tags { position: relative; }

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-dropdown-btn:hover {
  background: var(--surface2);
  border-color: var(--border-hover);
  color: var(--text);
}

.filter-dropdown-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(91,141,248,0.08);
}

.dropdown-arrow { font-size: 0.6rem; opacity: 0.6; }

.filter-count {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.64rem;
  padding: 1px 6px;
  font-weight: 700;
}

.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 0;
  z-index: 150;
  box-shadow: 0 20px 48px rgba(0,0,0,0.65);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.1s;
}

.dropdown-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.dropdown-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.dropdown-empty {
  display: block;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Environment toggle */
.filter-env {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.env-toggle-btn {
  padding: 5px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.env-toggle-btn:hover { color: var(--text-soft); }

.env-toggle-btn.active {
  background: var(--surface2);
  color: var(--text);
}

.env-toggle-btn.active.env-prod { color: #ff7a8a; }
.env-toggle-btn.active.env-dev  { color: #6fa8fb; }

/* ── Grid ────────────────────────────────────────── */

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

/* ── Card ────────────────────────────────────────── */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 20px 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}

/* left accent bar */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--text-muted);
  transition: background 0.3s;
}

.card.status-up::before    { background: var(--up); }
.card.status-down::before  { background: var(--down); }
.card.status-unknown::before { background: var(--warn); }

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  border-color: var(--border-hover);
}

.card.status-up:hover   { box-shadow: 0 16px 40px rgba(16,217,124,0.07), 0 4px 16px rgba(0,0,0,0.4); }
.card.status-down:hover { box-shadow: 0 16px 40px rgba(255,58,92,0.07), 0 4px 16px rgba(0,0,0,0.4); }

.card.skeleton {
  height: 200px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.45; }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-badge.up {
  background: rgba(16,217,124,0.1);
  color: var(--up);
  border: 1px solid rgba(16,217,124,0.2);
}

.status-badge.down {
  background: rgba(255,58,92,0.1);
  color: var(--down);
  border: 1px solid rgba(255,58,92,0.2);
}

.status-badge.unknown {
  background: rgba(255,192,70,0.1);
  color: var(--warn);
  border: 1px solid rgba(255,192,70,0.2);
}

/* Dot */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.up {
  background: var(--up);
  animation: ping 2s ease-in-out infinite;
}

.dot.down    { background: var(--down); }
.dot.unknown { background: var(--warn); }

@keyframes ping {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,217,124,0.6); }
  50%       { box-shadow: 0 0 0 5px rgba(16,217,124,0); }
}

/* URL */
.card-url {
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-url a { color: inherit; text-decoration: none; }
.card-url a:hover { text-decoration: underline; }

.card-url-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-right: 3px;
}

/* Uptime bar */
.uptime-bar-wrap {
  margin-top: 16px;
  margin-bottom: 4px;
}

.uptime-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.uptime-bar-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.uptime-bar-value {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
}

.uptime-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.uptime-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.7s ease;
}

/* Stats grid */
.card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.meta-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* Environment badges */
.env-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.env-badge.env-prod {
  background: rgba(255,122,138,0.1);
  color: #ff7a8a;
  border: 1px solid rgba(255,122,138,0.2);
}

.env-badge.env-dev {
  background: rgba(111,168,251,0.1);
  color: #6fa8fb;
  border: 1px solid rgba(111,168,251,0.2);
}

/* ── Modal ───────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeOverlay 0.15s ease;
}

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

.modal {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  padding: 28px;
  box-shadow: 0 32px 72px rgba(0,0,0,0.75);
  animation: slideUpModal 0.2s ease;
}

@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

/* Forms */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 7px;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  background: rgba(91,141,248,0.04);
  box-shadow: 0 0 0 3px rgba(91,141,248,0.1);
}

.form-group input::placeholder { color: var(--text-muted); }

.required { color: var(--down); }
.optional  { color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

.form-error {
  background: rgba(255,58,92,0.08);
  border: 1px solid rgba(255,58,92,0.22);
  color: var(--down);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Service modal tags */
.svc-tags-widget { position: relative; width: 100%; }

.svc-tags-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.svc-tags-btn:hover {
  border-color: var(--border-hover);
  background: var(--surface2);
}

.svc-tags-btn.active {
  border-color: var(--accent);
  background: rgba(91,141,248,0.04);
}

.svc-tags-btn .dropdown-arrow { margin-left: auto; }

.svc-tags-panel {
  max-height: 220px;
  overflow-y: auto;
  z-index: 210;
}

.svc-tags-add {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--surface-solid);
}

.svc-tags-add input {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  color: var(--text);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.svc-tags-add input:focus { border-color: var(--accent); }
.svc-tags-add input::placeholder { color: var(--text-muted); }

.btn-add-tag {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  padding: 6px 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.btn-add-tag:hover { opacity: 0.85; }

.tags-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  min-height: 24px;
}

/* ── Tags management ─────────────────────────────── */

.tags-mgmt-loading,
.tags-mgmt-empty {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 16px 0;
  text-align: center;
}

.tag-mgmt-row {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.tag-mgmt-row:last-child { border-bottom: none; }

.tag-mgmt-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-usage {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex: 1;
}

.tag-mgmt-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.color-swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.color-swatch-btn:hover { transform: scale(1.2); }

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 2px 4px;
  animation: fadeIn 0.12s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.color-option {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, border-color 0.12s;
}

.color-option:hover {
  transform: scale(1.25);
  border-color: var(--text);
}

.color-none {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tag-rename-input {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
}

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }

/* ── Confirm dialog ──────────────────────────────── */

.modal-confirm {
  max-width: 380px;
  text-align: center;
}

#modal-confirm { z-index: 300; }

.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,58,92,0.1);
  border: 1px solid rgba(255,58,92,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: var(--down);
}

.confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ── Empty state ─────────────────────────────────── */

.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-state strong {
  display: block;
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 1024px) {
  .header-center { display: none; }
}

@media (max-width: 768px) {
  .header { padding: 0 16px; }
  .header-right { display: none; }
  .btn-hamburger { display: flex; }
  .last-refresh { display: none; }

  .main { padding: 16px; }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .filters-bar {
    gap: 8px;
    margin-bottom: 20px;
  }

  .filter-search { min-width: 0; flex: 1 1 100%; order: -1; }

  .modal-overlay { align-items: flex-end; padding: 0; }

  .modal {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-width: 100%;
    animation: slideUpMobile 0.25s ease;
  }

  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .modal-confirm {
    max-width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

@media (max-width: 480px) {
  .filter-env { width: 100%; }
  .env-toggle-btn { flex: 1; text-align: center; }
  .filter-dropdown-btn { width: 100%; justify-content: space-between; }
  .filter-tags { width: 100%; }
  .card-meta { grid-template-columns: repeat(2, 1fr); }
}
