/* reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg:           #0d0f12;
  --surface:      #13161b;
  --surface-2:    #1a1e25;
  --border:       #262c38;
  --border-mid:   #323a4a;
  --primary:      #c84b1f;
  --accent:       #4a7fa5;
  --text:         #c8c4bc;
  --text-bright:  #dedad2;
  --muted:        #52596a;
  --muted-mid:    #6e7888;
  --success:      #4a8c5c;
  --error:        #b83030;
  --radius:       3px;
  --font:         'IBM Plex Mono', 'Courier New', monospace;
  --font-display: 'Share Tech Mono', monospace;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* background video */
.bg-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
  filter: saturate(0.5) brightness(0.9);
}

/* darkening gradient — heavier at edges, lighter in middle so the rig reads */
.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(13, 15, 18, 0.65) 0%,
    rgba(13, 15, 18, 0.15) 30%,
    rgba(13, 15, 18, 0.15) 70%,
    rgba(13, 15, 18, 0.75) 100%
  );
}

/* blur only at the edges where the overlay darkens — clear in the middle */
.bg-blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(to bottom,
    black 0%,
    transparent 22%,
    transparent 78%,
    black 100%
  );
  -webkit-mask-image: linear-gradient(to bottom,
    black 0%,
    transparent 22%,
    transparent 78%,
    black 100%
  );
}

/* everything above the video */
.screen {
  position: relative;
  z-index: 1;
}

/* screens */
.screen { display: flex; flex-direction: column; min-height: 100vh; }

/* sign-in screen */
#signin-screen {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.center-card {
  background: rgba(19, 22, 27, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 44px 44px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

/* logo icon */
.logo {
  width: 48px;
  height: 48px;
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.center-card h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--text-bright);
}

.system-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.subtitle {
  color: var(--muted-mid);
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 24px;
}

/* feature list */
.features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-mid);
}

.indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* divider */
.card-divider {
  height: 1px;
  background: var(--border);
  margin: 0 -44px 28px;
}

/* error banner */
.error-banner {
  background: rgba(184, 48, 48, 0.08);
  color: #c06060;
  border: 1px solid rgba(184, 48, 48, 0.35);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 11px;
  margin-bottom: 16px;
  text-align: left;
  letter-spacing: 0.04em;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.btn-google {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-mid);
  width: 100%;
  justify-content: center;
  font-size: 12px;
  padding: 13px 20px;
}
.btn-google:hover {
  background: #1f2530;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.btn-primary:hover { background: #d95828; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-legal {
  background: #1a1e25;
  color: var(--muted-mid);
  border: 1px solid var(--border);
  font-size: 10px;
  padding: 7px 14px;
  flex: 1;
  justify-content: center;
}
.btn-legal:hover {
  background: #1f2530;
  color: var(--text);
}

.data-notice {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.legal-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-ghost {
  background: transparent;
  color: var(--muted-mid);
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 6px 14px;
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-mid);
}

/* top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 50px;
  background: rgba(19, 22, 27, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-bright);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo-icon {
  width: 26px;
  height: 26px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 10px 4px 5px;
}

.user-avatar {
  width: 22px;
  height: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-mid);
  flex-shrink: 0;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.user-email {
  font-size: 11px;
  color: var(--muted-mid);
  letter-spacing: 0.03em;
}

/* main content */
.main {
  flex: 1;
  padding: 40px 32px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* state blocks */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 320px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.error-text {
  color: #b86060;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.muted { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }

/* loading bar */
.loading-bar-wrap {
  width: 180px;
  height: 2px;
  background: var(--surface-2);
  border-radius: 1px;
  overflow: hidden;
}

@keyframes sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.loading-bar {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: sweep 1.4s ease-in-out infinite;
}

/* list header */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.list-header h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-bright);
}

/* table */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead th {
  background: var(--surface-2);
  padding: 9px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-mid);
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

td { padding: 11px 16px; }

.col-num {
  width: 48px;
  color: var(--muted);
  font-size: 11px;
}

.col-date {
  width: 140px;
  color: var(--muted-mid);
  white-space: nowrap;
  font-size: 11px;
}

td.title-cell {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

/* responsive */
@media (max-width: 600px) {
  .topbar, .main { padding-left: 16px; padding-right: 16px; }
  .center-card { padding: 36px 24px 32px; }
  .card-divider { margin: 0 -24px 24px; }
}
