/* Suroda customer portal — Brand Guide v1.
   Slate ground, Paper text, Shu reserved for detection and alert only. */

:root {
  --slate: #10161F;
  --paper: #F4F3EE;
  --shu: #C63D2F;
  --steel: #8B94A3;
  --mist: #D8D6CD;

  --bg: var(--slate);
  --bg-raised: #161D28;
  --bg-band: #1B2330;
  --ink: var(--paper);
  --ink-muted: var(--steel);
  --hairline: #2A3442;

  --max: 1120px;
  --gutter: 40px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* A class that sets display would otherwise out-specify the user-agent
   [hidden] rule and leave a hidden view on screen. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: Manrope, Inter, -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* ---- header ---- */

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

.lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lockup img {
  width: 30px;
  height: 30px;
}

.wordmark {
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.wordmark sup {
  font-size: 0.55em;
  letter-spacing: 0;
  vertical-align: super;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

main {
  flex: 1;
  padding: 44px 0 64px;
}

.eyebrow {
  color: var(--steel);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---- signed-out ---- */

.signin-layout {
  display: grid;
  gap: clamp(32px, 7vw, 92px);
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 400px);
  padding: 40px 0;
}

h1 {
  margin: 20px 0 0;
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.lede {
  max-width: 46ch;
  margin: 22px 0 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.panel {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: clamp(24px, 5vw, 32px);
}

.panel h2 {
  margin: 14px 0 0;
  font-size: 1.4rem;
}

.panel p {
  margin: 14px 0 0;
  color: var(--ink-muted);
}

.google-action {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--bg-band);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.google-action:hover {
  border-color: var(--steel);
}

.google-mark {
  width: 18px;
  height: 18px;
  flex: none;
}

.panel-note {
  margin-top: 16px;
  color: var(--steel);
  font-size: 0.86rem;
}

/* ---- dashboard ---- */

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.dash-head h1 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

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

.card {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: 20px;
}

.card-label {
  color: var(--steel);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-value {
  margin-top: 18px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
}

.card-value.is-pending {
  color: var(--steel);
  font-size: 1rem;
  line-height: 1.4;
}

/* A timestamp is read, not scanned like a count, so it does not take the
   display size. */
.card-value.is-timestamp {
  font-size: 1.05rem;
  line-height: 1.45;
}

.card-note {
  margin-top: 14px;
  color: var(--steel);
  font-size: 0.82rem;
}

/* Shu appears only where something needs attention. */
.card.is-alert {
  border-color: rgba(198, 61, 47, 0.55);
}

.card.is-alert .card-value {
  color: var(--shu);
}

.split {
  display: grid;
  margin-top: 16px;
  gap: 10px;
}

.split-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.split-row span:first-child {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.split-row span:last-child {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.15rem;
}

.meter {
  height: 6px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-band);
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--steel);
}

.meter-fill.is-alert {
  background: var(--shu);
}

/* ---- upload ---- */

.section-head {
  margin: 44px 0 18px;
}

.section-head h2 {
  margin-top: 8px;
  font-size: 1.4rem;
}

.upload-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: 24px;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

input[type="file"] {
  flex: 1;
  min-width: 240px;
  border: 1px dashed var(--hairline);
  border-radius: 6px;
  background: var(--bg-band);
  color: var(--ink-muted);
  padding: 12px;
  font: inherit;
  font-size: 0.9rem;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  background: var(--bg-raised);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.86rem;
}

.primary-action {
  min-height: 46px;
  border: 1px solid var(--shu);
  border-radius: 6px;
  background: var(--shu);
  color: var(--paper);
  cursor: pointer;
  padding: 0 22px;
  font: inherit;
  font-weight: 600;
}

.primary-action:disabled {
  border-color: var(--hairline);
  background: var(--bg-band);
  color: var(--steel);
  cursor: not-allowed;
}

.secondary-action {
  min-height: 40px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
}

.secondary-action:disabled {
  color: var(--steel);
  cursor: wait;
}

.upload-note {
  color: var(--steel);
  font-size: 0.86rem;
}

/* ---- messages ---- */

.message {
  min-height: 22px;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.message.is-error {
  border: 1px solid rgba(198, 61, 47, 0.5);
  border-radius: 6px;
  background: rgba(198, 61, 47, 0.1);
  color: var(--shu);
  padding: 10px 12px;
}

.message.is-success {
  color: var(--ink);
}

.detail-list {
  display: grid;
  margin-top: 20px;
  gap: 10px;
}

.detail {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 8px;
}

.detail span:first-child {
  color: var(--steel);
  font-size: 0.86rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--hairline);
  padding: 22px 0 30px;
  color: var(--steel);
  font-size: 0.84rem;
}

@media (max-width: 860px) {
  :root {
    --gutter: 20px;
  }

  .signin-layout {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
