/* ============================================================
   Looking Glass — Digital.com
   Identidade visual: verde vibrante + cinza escuro
   ============================================================ */

:root {
  --brand-green:        #14a83d;
  --brand-green-dark:   #0f8a31;
  --brand-green-light:  #2bc257;
  --brand-gray:         #2d3a3d;
  --brand-gray-light:   #54616a;
  --brand-bg:           #f4f6f7;
  --brand-card:         #ffffff;
  --brand-border:       #e3e7ea;
  --brand-text:         #1f2a2e;
  --brand-text-muted:   #6c7a82;
  --term-bg:            #0e1116;
  --term-fg:            #d8dee4;
  --term-accent:        #19c37d;
  --term-error:         #ff8b8b;
  --term-cmd:           #ffd166;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
}

/* ---------------- Header ---------------- */
.lg-header {
  background: linear-gradient(180deg, #ffffff 0%, #f0f3f5 100%);
  border-bottom: 3px solid var(--brand-green);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.lg-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 16px;
}
.lg-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.lg-brand-mark {
  display: inline-flex;
  align-items: center;
  height: 42px;
}
.lg-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.lg-brand-text .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-gray);
  letter-spacing: .02em;
}
.lg-brand-text .subtitle {
  font-size: 11px;
  color: var(--brand-text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.lg-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--brand-gray);
}
.lg-user .badge-admin {
  display: inline-block;
  background: var(--brand-green);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lg-user a, .lg-user button {
  color: var(--brand-gray);
  text-decoration: none;
  border: 1px solid var(--brand-border);
  background: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
}
.lg-user a:hover, .lg-user button:hover {
  border-color: var(--brand-green);
  color: var(--brand-green-dark);
}
.lg-user form { margin: 0; display: inline; }

/* ---------------- Layout ---------------- */
main.lg-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

/* Cards */
.lg-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20,40,50,.04);
}
.lg-card-body { padding: 18px 20px; }
.lg-card-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--brand-border);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--brand-gray);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------------- Form ---------------- */
.lg-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 880px) {
  .lg-form-row { grid-template-columns: 1fr; }
}
.lg-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-gray-light);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}
.lg-field input,
.lg-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--brand-text);
  transition: border-color .15s, box-shadow .15s;
}
.lg-field input:focus,
.lg-field select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(20,168,61,.18);
  outline: none;
}
.lg-hint {
  font-size: 11.5px;
  color: var(--brand-text-muted);
  margin-top: 4px;
}

.lg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .05s;
}
.lg-btn-primary {
  background: var(--brand-green);
  color: #fff;
}
.lg-btn-primary:hover { background: var(--brand-green-dark); }
.lg-btn-primary:active { transform: translateY(1px); }
.lg-btn-primary:disabled { background: #9bd3a8; cursor: not-allowed; }
.lg-btn-ghost {
  background: #fff;
  color: var(--brand-gray);
  border: 1px solid var(--brand-border);
}
.lg-btn-ghost:hover { border-color: var(--brand-green); color: var(--brand-green-dark); }
.lg-btn-danger { background: #d23838; color: #fff; }
.lg-btn-danger:hover { background: #b02b2b; }

/* ---------------- Output (terminal) ---------------- */
.lg-output-card {
  background: var(--term-bg);
  border-radius: 8px;
  border: 1px solid #1c2129;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.lg-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161b22;
  border-bottom: 1px solid #1f262e;
  padding: 8px 14px;
  font-family: ui-monospace, "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  color: #9da7ae;
}
.lg-output-head .traffic {
  display: inline-flex;
  gap: 6px;
}
.lg-output-head .traffic span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #3a4047;
}
.lg-output-head .traffic span.g { background: var(--brand-green); }
.lg-output-meta { color: #6c7680; font-size: 11.5px; }

.lg-output {
  margin: 0;
  padding: 14px 16px;
  background: var(--term-bg);
  color: var(--term-fg);
  font-family: ui-monospace, "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  min-height: 360px;
  max-height: 70vh;
}
.lg-output .cmd { color: var(--term-cmd); font-weight: 600; }
.lg-output.error { color: var(--term-error); }
.lg-output b { color: var(--term-cmd); font-weight: 600; }

/* ---------------- Tables / admin ---------------- */
.lg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.lg-table th, .lg-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--brand-border);
  text-align: left;
  vertical-align: middle;
}
.lg-table thead th {
  background: #f7f9fa;
  color: var(--brand-gray-light);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.lg-table tbody tr:hover { background: #fafbfc; }
.lg-table .pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pill-ok    { background: rgba(20,168,61,.12);  color: var(--brand-green-dark); }
.pill-off   { background: rgba(108,122,130,.16); color: var(--brand-gray-light); }
.pill-admin { background: rgba(20,168,61,.12);  color: var(--brand-green-dark); }
.pill-fail  { background: rgba(210,56,56,.12);  color: #b02b2b; }
.pill-info  { background: rgba(31,111,235,.12); color: #1f6feb; }

/* ---------------- Alerts ---------------- */
.lg-alert {
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13.5px;
  border: 1px solid transparent;
}
.lg-alert-success { background: rgba(20,168,61,.10);  color: var(--brand-green-dark); border-color: rgba(20,168,61,.25); }
.lg-alert-warning { background: rgba(255,193,7,.10);  color: #8a6d00;                 border-color: rgba(255,193,7,.30); }
.lg-alert-danger  { background: rgba(210,56,56,.10);  color: #a62828;                 border-color: rgba(210,56,56,.30); }
.lg-alert-info    { background: rgba(31,111,235,.10); color: #1f6feb;                 border-color: rgba(31,111,235,.30); }

/* ---------------- Login card ---------------- */
.lg-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.lg-login {
  width: 100%;
  max-width: 380px;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(20,40,50,.08);
  padding: 28px 28px 26px;
}
.lg-login h1 {
  margin: 0 0 4px;
  font-size: 19px;
  color: var(--brand-gray);
  text-align: center;
}
.lg-login .lead {
  text-align: center;
  color: var(--brand-text-muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.lg-login .lg-field { margin-bottom: 14px; }
.lg-login .lg-btn { width: 100%; }

/* ---------------- Footer ---------------- */
.lg-footer {
  border-top: 1px solid var(--brand-border);
  background: #fff;
  padding: 14px 24px;
  font-size: 12px;
  color: var(--brand-text-muted);
  text-align: center;
}
.lg-footer strong { color: var(--brand-gray); }
.lg-footer a { color: var(--brand-green-dark); text-decoration: none; }
.lg-footer a:hover { text-decoration: underline; }

/* ---------------- Misc ---------------- */
.lg-grid {
  display: grid;
  gap: 18px;
}
.lg-grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 880px) {
  .lg-grid.cols-2 { grid-template-columns: 1fr; }
}

.text-muted { color: var(--brand-text-muted); }
.small      { font-size: 12px; }
.mono       { font-family: ui-monospace, Consolas, monospace; }
