:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(22, 163, 74, 0.08), transparent 35%),
    var(--bg);
  color: var(--text);
}

.page {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.subtitle {
  margin: 16px 0 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: #111827;
}

.button.danger,
button.danger {
  background: var(--danger);
}

.top-card,
.panel,
.app-card,
.login-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.top-card {
  padding: 18px 22px;
  min-width: 190px;
  text-align: right;
}

.top-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.top-card strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

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

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
  font-size: 20px;
}

.status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-live { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.status-offline { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.status-testing { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.status-coming-soon { background: #eef4ff; color: #3538cd; border-color: #c7d7fe; }

.app-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.app-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.url {
  margin-top: auto;
  padding-top: 22px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.empty,
.notice {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.7);
  color: var(--muted);
}

.notice.success {
  border-style: solid;
  color: #067647;
  background: #ecfdf3;
}

.notice.error {
  border-style: solid;
  color: #b42318;
  background: #fef3f2;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row.full { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #344054;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  background: #fff;
  outline: none;
}

textarea { min-height: 80px; resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.admin-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.admin-card form {
  display: contents;
}

.admin-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.login-wrap {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.login-card {
  padding: 28px;
}

.login-card h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.login-card .subtitle {
  font-size: 15px;
  margin-bottom: 22px;
}

.footer {
  margin-top: 36px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 720px) {
  .page { padding: 32px 0; }
  .header { display: block; }
  .top-card { margin-top: 22px; text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-footer { justify-content: stretch; flex-direction: column; }
  .button, button { width: 100%; }
}
