﻿:root {
  --bg: #0b1020;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.15);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: #6ee7ff;
  text-decoration: none;
}

.header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.container {
  padding: 24px;
}

.btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.btn-primary {
  background: #6ee7ff;
  color: #000;
  border: none;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.forms-table {
  width: 100%;
  border-collapse: collapse;
}

.forms-table th,
.forms-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.forms-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
}

.forms-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: var(--muted);
}

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

/* page centering */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* center main content vertically + horizontally */
main.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
}

/* footer stays centered */
.login-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  opacity: 0.7;
}

main.container h1 {
  margin-bottom: 10px;
}

main.container p {
  margin: 6px 0;
}

main.container a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 18px;
  border-radius: 6px;
  background: #2f6fed;
  color: white;
  text-decoration: none;
  font-weight: 500;
}

main.container a:hover {
  background: #1f55c5;
}

/* index page ribbon and menu */
.index-page {
  position: relative;
}

.index-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 28, 0.85);
}

.index-ribbon-title {
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.index-menu {
  position: relative;
}

.index-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  line-height: 1;
  font-size: 1.1rem;
  user-select: none;
}

.index-menu summary::-webkit-details-marker {
  display: none;
}

.index-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: #101933;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 10;
}

.index-menu-panel a {
  display: block;
  margin: 0;
  padding: 10px 12px;
  background: transparent;
  border-radius: 0;
  color: var(--text);
  font-weight: 500;
  text-align: left;
}

.index-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.index-hero {
  gap: 8px;
  padding-top: 36px;
}

.index-hero p {
  max-width: 720px;
}

.index-copyright {
  opacity: 0.7;
  margin-top: 10px;
  font-size: 0.95rem;
}

/* shared app ribbon + hamburger menu */
.app-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 28, 0.85);
}

.app-ribbon-title {
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.app-menu {
  position: relative;
}

.app-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  line-height: 1;
  font-size: 1.1rem;
  user-select: none;
}

.app-menu summary::-webkit-details-marker {
  display: none;
}

.app-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #101933;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 10;
}

.app-menu-panel a {
  display: block;
  margin: 0;
  padding: 10px 12px;
  background: transparent;
  border-radius: 0;
  color: var(--text);
  font-weight: 500;
  text-align: left;
}

.app-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.is-hidden {
  display: none !important;
}

.loading-indicator {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #6ee7ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
