﻿@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --bg-deep: #08111f;
  --bg-mid: #10243d;
  --bg-light: #18384f;
  --glass: rgba(18, 26, 44, 0.55);
  --glass-strong: rgba(18, 26, 44, 0.72);
  --glass-border: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: rgba(248, 251, 255, 0.66);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.38);
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(250, 204, 21, 0.14), transparent 24%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 52%, var(--bg-light) 100%);
  background-attachment: fixed;
  background-size: cover;
}
a { color: inherit; }

* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.28) rgba(10,18,32,0.08); }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(148,163,184,0.24)); border-radius: 999px; }

.shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }

.sidebar {
  padding: 28px;
  border-right: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a {
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text);
  font-weight: 500;
  transition: background 140ms ease;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.08); }
.sidebar nav a.active { background: var(--accent-soft); color: #cfe0ff; font-weight: 700; }
.sidebar-user { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-user span { font-weight: 600; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { padding: 32px; display: grid; gap: 24px; }

/* ===== Janelas estilo macOS/HSN ===== */
.hero, .card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  overflow: hidden;
}

.mac-dots {
  display: flex;
  gap: 8px;
  padding: 14px 20px 0;
}
.mac-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}
.mac-dots .red { background: #ff5f57; }
.mac-dots .yellow { background: #febc2e; }
.mac-dots .green { background: #28c840; }

.hero-row { padding: 10px 28px 28px; display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 10px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi { padding: 20px 22px 22px; }
.kpi span { display: block; color: var(--muted); margin: 12px 0 10px; font-size: 0.88rem; }
.kpi strong { font-size: 2rem; font-weight: 700; }
.kpi.warn strong { color: var(--amber); }

.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { padding: 0 24px 24px; }
.section-head { display: grid; gap: 6px; margin: 16px 0 18px; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--accent); font-weight: 700; }
.muted { color: var(--muted); line-height: 1.6; }
.stat-list, .note-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.stat-list li, .note-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
}
.note-list li { display: block; }
.note-list li p { margin: 4px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-two { grid-template-columns: 1fr; }
}

/* ===== Botoes estilo pill ===== */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 120ms ease, filter 120ms ease;
}
.button.primary {
  color: #253142;
  background: linear-gradient(180deg, #f9fbff 0%, #dde6f1 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.74), 0 10px 24px rgba(10,14,20,0.24);
}
.button.primary:hover { transform: translateY(-1px); filter: brightness(1.02); }
.button.ghost {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--glass-border);
}
.button.ghost:hover { background: rgba(255,255,255,0.14); }
.button.small { padding: 8px 16px; font-size: 0.8rem; border-radius: 999px; }

/* ===== Tabela ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--glass-border);
}
tbody td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: middle; }
tbody tr:hover { background: rgba(255,255,255,0.04); }
tbody small a { color: var(--accent); text-decoration: none; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}
.pill.priority-low { background: rgba(74, 222, 128, 0.16); color: #4ade80; }
.pill.priority-medium { background: var(--accent-soft); color: var(--accent); }
.pill.priority-high { background: var(--amber-soft); color: var(--amber); }
.pill.priority-critical { background: rgba(248, 113, 113, 0.18); color: #f87171; }

/* ===== Inputs estilo glass ===== */
.inline-input, .inline-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}
.inline-input::placeholder { color: rgba(248,251,255,0.45); }
.inline-select option { color: #0f172a; }

.demand-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 20px; }
.demand-form input, .demand-form select {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-family: inherit;
}
.demand-form input::placeholder { color: rgba(248,251,255,0.45); }
.demand-form select option { color: #0f172a; }
.demand-form input[name="title"] { flex: 1 1 220px; }

/* ===== Busca (Bibliotecas) ===== */
.search-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.search-bar input[type="search"] {
  flex: 1 1 auto;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}
.search-bar input[type="search"]::placeholder { color: rgba(248,251,255,0.45); }
.search-bar input[type="search"]:focus {
  outline: none;
  border-color: rgba(255,255,255,0.36);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
}
.search-bar #library-search-count { font-size: 0.8rem; white-space: nowrap; }
tr.is-hidden { display: none; }

/* ===== Login estilo macOS/HSN ===== */
body.login-bg { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-shell { width: min(100%, 420px); }
.login-card {
  width: 100%;
  padding: 0 26px 26px;
  border-radius: 30px;
  background: rgba(18, 26, 44, 0.72);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.10);
  text-align: center;
  overflow: hidden;
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 22px; }
.login-mark {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--accent), var(--amber));
  font-weight: 800; font-size: 1.4rem; color: #0b1220;
}
.login-brand span { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; }
.login-form { text-align: left; display: grid; gap: 12px; }
.login-field input {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.login-field input::placeholder { color: rgba(248,251,255,0.5); }
.login-field input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.36);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.16);
  background: rgba(255,255,255,0.12);
}
.login-submit { width: 100%; justify-content: center; height: 50px; margin-top: 4px; }
.login-alert {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.32);
  color: #fecaca;
}

/* Downess login refresh - 2026-09-10 */
.downess-login-body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(44, 143, 255, 0.22), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.16), transparent 24%),
    linear-gradient(145deg, #07111f 0%, #0b1b30 47%, #123652 100%);
}

.login-page-pro {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 72px);
  position: relative;
}

.login-page-pro::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.login-shell {
  width: min(1120px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
  gap: 24px;
  position: relative;
  isolation: isolate;
}

.login-story,
.login-card-pro {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(15, 42, 65, 0.7));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(24px);
}

.login-story {
  border-radius: 34px;
  padding: clamp(28px, 5vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.login-story::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  left: 8%;
  bottom: -140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59,130,246,.28), transparent 68%);
  z-index: -1;
}

.login-story h1 {
  margin: 70px 0 18px;
  max-width: 520px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: .9;
  letter-spacing: -0.07em;
  color: #f8fafc;
}

.login-lead {
  max-width: 620px;
  color: rgba(226, 232, 240, 0.78);
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.7;
}

.login-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0;
}

.login-badges span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.28);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.login-metrics div {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
}

.login-metrics dt {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.login-metrics dd {
  margin: 3px 0 0;
  color: rgba(226, 232, 240, .68);
  font-size: 12px;
}

.login-card-pro {
  align-self: center;
  border-radius: 30px;
  padding: clamp(26px, 4vw, 42px);
}

.login-card-pro h2 {
  margin: 8px 0 10px;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.login-form-pro {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-form-pro label {
  display: grid;
  gap: 8px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.login-form-pro input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  padding: 16px 18px;
  color: #f8fafc;
  outline: none;
  background: rgba(2, 6, 23, 0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.login-form-pro input:focus {
  border-color: rgba(96, 165, 250, 0.78);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.login-submit {
  width: 100%;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 18px;
  font-weight: 900;
}

.login-footnote {
  margin: 18px 0 0;
  color: rgba(148, 163, 184, .76);
  font-size: 12px;
  line-height: 1.6;
}

.form-error {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fecaca;
  background: rgba(127, 29, 29, .42);
  border: 1px solid rgba(248, 113, 113, .34);
}

.login-orbit {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: .8;
  z-index: -1;
}

.login-orbit-one {
  width: 180px;
  height: 180px;
  right: -54px;
  top: -46px;
  background: rgba(59,130,246,.24);
}

.login-orbit-two {
  width: 140px;
  height: 140px;
  left: -44px;
  bottom: 24px;
  background: rgba(245,158,11,.18);
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; min-height: auto; }
  .login-story h1 { margin-top: 44px; }
  .login-metrics { grid-template-columns: 1fr; }
}
