:root {
  color-scheme: dark;
  --bg: #060406;
  --panel: rgba(24, 18, 22, 0.74);
  --panel-strong: rgba(34, 22, 28, 0.92);
  --text: #fff7f8;
  --muted: #bcaeb3;
  --red: #ff334e;
  --red-dark: #8d1024;
  --crimson: #c31535;
  --green: #35d184;
  --orange: #ffad42;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(255, 30, 70, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 35, 74, 0.28), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(145, 12, 34, 0.34), transparent 28%),
    linear-gradient(145deg, #070406 0%, #12080c 48%, #050305 100%);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 26px rgba(255, 41, 74, 0.24);
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

input:focus {
  border-color: rgba(255, 51, 78, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 51, 78, 0.16);
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 460px);
}

.glass-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: 36px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #ff5870, #8d1024);
  box-shadow: 0 0 42px rgba(255, 51, 78, 0.55);
}

.eyebrow,
.card-label {
  margin: 0 0 8px;
  color: #ff8f9f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.muted {
  color: var(--muted);
}

.notice {
  margin: 18px 0;
  border-radius: 8px;
  padding: 12px 14px;
}

.notice.error {
  border: 1px solid rgba(255, 51, 78, 0.32);
  background: rgba(255, 51, 78, 0.12);
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 18px;
}

.ghost-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 40px;
}

.dashboard-grid .glass-card {
  padding: 20px;
}

.ip-value {
  overflow-wrap: anywhere;
  font-size: 30px;
  font-weight: 800;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.button-grid button:last-child {
  grid-column: 1 / -1;
}

.status-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  color: var(--muted);
}

.status-list strong {
  color: var(--green);
}

.wide-card {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 13px 10px;
  text-align: left;
  color: var(--muted);
  white-space: nowrap;
}

th {
  color: #f6dce1;
  font-size: 12px;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
}

.pill.success {
  color: #b8ffdc;
  background: rgba(53, 209, 132, 0.14);
}

.danger-button {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 51, 78, 0.12);
  color: #ff9aaa;
  box-shadow: none;
}

.inline-form {
  margin: 0;
}

.empty-state {
  color: var(--muted);
}

.log-list {
  display: grid;
  gap: 8px;
}

.log-row {
  display: grid;
  grid-template-columns: 180px 140px 130px 80px 1fr;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.log-ok {
  color: var(--green);
}

.log-fail {
  color: var(--red);
}

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

  .log-row {
    grid-template-columns: 1fr;
  }

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

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

  .login-card {
    padding: 26px;
  }

  h1 {
    font-size: 28px;
  }

  .ip-value {
    font-size: 24px;
  }
}
