:root {
  --bg: #eef3f7;
  --surface: #ffffff;
  --text: #13233a;
  --muted: #3d4d63;
  --stroke: #dbe5ef;
  --primary: #0f4c81;
  --primary-soft: #d7e8f7;
  --success: #0b7a44;
  --danger: #b22020;
  --shadow: 0 18px 50px rgba(15, 31, 48, 0.12);
  --navy: #0A1F2E;
  --navy-soft: rgba(10, 31, 46, 0.96);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "SF Pro Text", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f3f7fb 0%, #e8eef5 100%);
  display: flex;
  flex-direction: column;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(28, 106, 176, 0.13), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(7, 127, 188, 0.12), transparent 35%),
    radial-gradient(circle at 50% 85%, rgba(19, 35, 58, 0.12), transparent 45%);
  pointer-events: none;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Dark navy header - brand consistency with parent site */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-header--dark {
  background: var(--navy-soft);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand--dark {
  color: #fff;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn--header {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn--header:hover {
  background: rgba(255, 255, 255, 0.15);
}

.shell {
  flex: 1;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Auth panel - narrow, centered, focused */
.panel {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel--auth {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.panel-heading {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.panel-subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel-instruction {
  margin: 0 0 20px;
  color: var(--text);
}

.google-signin-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.panel--auth .meta--auth {
  margin: 0 0 8px;
}

.panel--auth .meta--help {
  margin: 0;
}

.link-help {
  color: var(--primary);
  text-decoration: none;
}

.link-help:hover {
  text-decoration: underline;
}

/* Ops panel uses full container width */
.panel--ops {
  max-width: min(1120px, 92vw);
  width: 100%;
}

.panel h2 {
  margin: 0 0 8px;
}

.meta {
  margin: 4px 0 0;
  color: var(--muted);
}

.meta.error {
  color: var(--danger);
}

.meta.success {
  color: var(--success);
}

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

.toolbar-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

select,
input,
button {
  font: inherit;
}

select,
input {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  min-height: 42px;
}

.ops-list {
  display: grid;
  gap: 14px;
}

.ops-item {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  background: #fdfefe;
}

.ops-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-badge {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f3f7fb;
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #e3ebf3;
}

.btn {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}

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

.btn.secondary {
  background: #fff;
  border-color: var(--stroke);
  color: var(--text);
}

.btn.ghost {
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.75);
}

.ops-toolbar {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

/* Footer - brand alignment */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 20px;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  margin: 0;
  font-size: 0.875rem;
}

.footer-content a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

@media (max-width: 840px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-toolbar {
    grid-template-columns: 1fr;
  }

  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .panel--auth {
    max-width: 100%;
    margin: 0 16px;
  }
}
