:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f7f9;
}

a {
  color: #0f5f7a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid #d8dee6;
  background: #ffffff;
}

.brand {
  color: #111827;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 18px;
}

nav a {
  color: #374151;
  font-size: 0.95rem;
}

.layout {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 24px;
}

.login-panel {
  max-width: 520px;
  padding: 28px 0;
}

.vpnaas-embed {
  min-height: 100vh;
  background: #f6f7f9;
}

.embed-auth {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 32px;
  text-align: center;
}

.embed-auth h1 {
  margin-bottom: 10px;
}

.embed-auth p {
  margin: 0;
  color: #4b5563;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
  margin: 8px 0 4px;
}

.login-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 8px;
}

.login-form input {
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
}

.login-form .button {
  margin-top: 16px;
  justify-content: center;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  color: #111827;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

.lede {
  margin: 12px 0 22px;
  color: #4b5563;
  font-size: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #0f5f7a;
  border-radius: 6px;
  background: #0f5f7a;
  color: #ffffff;
  font-weight: 600;
}

.button:hover {
  background: #0b4d63;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

code {
  font-size: 0.9em;
}

.action-column {
  width: 96px;
  text-align: right;
}

.empty-state {
  color: #6b7280;
}

.detail-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  margin: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.detail-list dt {
  color: #4b5563;
  font-weight: 700;
}

.detail-list dd:nth-last-child(-n + 2),
.detail-list dt:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.button-danger {
  border-color: #b91c1c;
  background: #b91c1c;
}

.button-danger:hover {
  background: #991b1b;
}

nav .logout-form {
  display: inline;
  margin: 0;
}

.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: #0f5f7a;
  font: inherit;
  cursor: pointer;
}

.linklike:hover {
  text-decoration: underline;
}

.linklike-danger {
  color: #b91c1c;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.actions form {
  display: inline;
  margin: 0;
}

.actions-row {
  justify-content: flex-start;
  margin-top: 18px;
}

.banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
}

.banner-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.banner-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.banner-error-text {
  color: #991b1b;
}

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-active {
  background: #f0fdf4;
  color: #166534;
}

.status-failed,
.status-delete_failed {
  background: #fef2f2;
  color: #991b1b;
}

.action-column {
  width: auto;
}

.button-large {
  min-height: 48px;
  padding: 0 20px;
  font-size: 1.05rem;
}

.button-secondary {
  background: #ffffff;
  color: #0f5f7a;
}

.button-secondary:hover {
  background: #eef6f9;
}

.step-marker {
  margin: 0 0 4px;
  color: #0f5f7a;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.back-link {
  font-size: 0.95rem;
}

.help-card {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
  max-width: 560px;
}

.help-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.help-card p {
  margin: 0;
  color: #4b5563;
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.card-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.card-sub {
  color: #6b7280;
  font-size: 0.9rem;
}

.card form {
  margin: 0;
}

.empty-card {
  padding: 40px 24px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}

.empty-card p {
  margin: 0 0 16px;
  color: #4b5563;
}

.status-line {
  font-size: 1.05rem;
}

.connect-guide {
  margin-top: 8px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.connect-guide h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.steps {
  margin: 0 0 18px;
  padding-left: 20px;
  line-height: 1.7;
  color: #374151;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.config-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.config-box {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  resize: vertical;
}

.hint {
  margin: 6px 0 0;
  color: #92400e;
  font-size: 0.85rem;
}

.detail-extra {
  margin: 22px 0;
}

.detail-extra summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f5f7a;
  margin-bottom: 10px;
}

.banner-info {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 18px;
  }

  .layout {
    padding: 22px 18px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
