:root{
  /* Cores baseadas no logotipo */
  --green: #40A030;
  --teal:  #20A0B0;
  --red:   #E00010;
  --yellow:#F0B000;

  --bg1:#0b1220;
  --bg2:#0e1b2f;

  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;

  --shadow: 0 18px 50px rgba(2,6,23,.25);
  --radius:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: #e5e7eb;

  min-height: 100vh;
  overflow: hidden;

  background:
    radial-gradient(1100px 650px at 15% 10%, rgba(64,160,48,.16), transparent 55%),
    radial-gradient(900px 540px at 85% 25%, rgba(32,160,176,.18), transparent 60%),
    radial-gradient(700px 420px at 80% 80%, rgba(224,0,16,.10), transparent 65%),
    linear-gradient(180deg, var(--bg1), var(--bg2));

  display:flex;
  align-items:center;
  justify-content:center;
  padding: 26px 16px;
}

/* Layout geral */
.page{
  width: min(980px, 100%);
  height: calc(100vh - 52px);
  display:flex;
  flex-direction:column;
  gap: 18px;
}

/* Versão mais larga (dashboard) */
.page--wide{
  width: min(1180px, 100%);
}

/* Cabeçalho superior */
.topbar{
  border: 1px solid rgba(148,163,184,.18);
  border-radius: var(--radius);
  padding: 18px 18px;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  position: relative;
  overflow:hidden;
}

.topbar::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(520px 240px at 25% 20%, rgba(64,160,48,.22), transparent 60%),
    radial-gradient(520px 240px at 80% 35%, rgba(32,160,176,.22), transparent 65%),
    radial-gradient(520px 240px at 55% 75%, rgba(240,176,0,.14), transparent 65%);
  filter: blur(12px);
  opacity:.9;
  pointer-events:none;
}

.topbar-inner{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center; /* default (login) */
  gap: 16px;
}

.topbar-inner-left{
  justify-content:flex-start;
}

.topbar-logo{
  width: 144px;
  height: auto;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  padding: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,.20);
  flex: 0 0 auto;
}

.topbar-text{
  text-align: center;
}

.topbar-text-left{
  text-align:left;
}

.topbar-text h1{
  margin:0;
  font-size: 30px;
  letter-spacing: .4px;
  line-height: 1.1;
  color: rgba(226,232,240,.96);
}

.topbar-text p{
  margin: 10px 0 0;
  color: rgba(226,232,240,.82);
  font-size: 13px;
  line-height: 1.5;
  max-width: 720px;
}

/* Centro */
.center{
  flex: 1 1 auto;
  min-height: 0;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Card */
.card{
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 1px solid rgba(226,232,240,.9);
}

.login-card{
  width: min(520px, 100%);
}

.card-header h2{
  margin:0;
  font-size: 20px;
  letter-spacing: .2px;
}

.subtitle{
  margin:8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

form{
  margin-top: 14px;
  display:grid;
  gap: 12px;
}

.field{
  display:flex;
  flex-direction:column;
}

label{
  font-size: 13px;
  color: #334155;
  display:block;
  margin-bottom: 6px;
  font-weight: 700;
}

input[type="text"], input[type="password"]{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  outline: none;
  font-size: 14px;
  transition: box-shadow .15s ease, border-color .15s ease;
  background: #ffffff;
}

input[type="text"]:focus, input[type="password"]:focus{
  border-color: rgba(32,160,176,.65);
  box-shadow: 0 0 0 4px rgba(32,160,176,.18);
}

.btn{
  width: 100%;
  border: 0;
  cursor:pointer;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  color: white;
  background: linear-gradient(90deg, var(--teal), #2563eb);
  box-shadow: 0 10px 18px rgba(37,99,235,.25);
  transition: transform .08s ease, filter .12s ease;
}

.btn:hover{ filter: brightness(1.02); }
.btn:active{ transform: translateY(1px); }

.links{
  display:flex;
  gap: 12px;
  justify-content:space-between;
  flex-wrap: wrap;
  margin-top: 8px;
}

a{
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
a:hover{ text-decoration: underline; }

.footer{
  margin-top: 14px;
  color: rgba(100,116,139,.95);
  font-size: 12px;
  text-align:center;
}

/* Mensagens */
.msg{
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid var(--line);
}
.msg.ok{ background: #ecfeff; border-color: rgba(32,160,176,.35); color:#0f172a; }
.msg.warn{ background: #fff7ed; border-color: rgba(240,176,0,.45); color:#0f172a; }
.msg.err{ background: #fef2f2; border-color: rgba(224,0,16,.30); color:#0f172a; }
.msg.info{ background:#f8fafc; border-color: var(--line); color:#0f172a; }

/* Regulamento (cartão fixo com link) */
.regolamento-card{
  border-top: 4px solid rgba(240,176,0,.90);
}

/* Mantém simetria visual: altura controlada */
.regolamento-static{
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 16px;

  height: 220px;            /* altura fixa para simetria */
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap: 10px;

  position: relative;
  overflow: hidden;
}

.regolamento-static::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(320px 160px at 15% 25%, rgba(32,160,176,.12), transparent 60%),
    radial-gradient(320px 160px at 85% 35%, rgba(64,160,48,.12), transparent 65%),
    radial-gradient(320px 160px at 50% 85%, rgba(240,176,0,.10), transparent 65%);
  filter: blur(10px);
  opacity: .9;
  pointer-events:none;
}

.regolamento-static > *{
  position: relative;
}

.regolamento-static-title{
  font-weight: 900;
  color: #0f172a;
  font-size: 14px;
  letter-spacing: .2px;
}

.regolamento-static-text{
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.regolamento-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;

  padding: 12px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;

  color: #0f172a;
  border: 1px solid rgba(32,160,176,.45);
  background: rgba(32,160,176,.10);

  transition: filter .12s ease, transform .08s ease, border-color .12s ease;
}

.regolamento-cta:hover{
  filter: brightness(1.03);
  border-color: rgba(240,176,0,.55);
  text-decoration: none;
}

.regolamento-cta:active{
  transform: translateY(1px);
}

.regolamento-mini{
  font-size: 12px;
  color: rgba(100,116,139,.95);
}

/* -------------------- */
/* DASHBOARD (NOVO)     */
/* -------------------- */

.dash-main{
  flex: 1 1 auto;
  min-height: 0;
}

.dash-grid{
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 18px;
  align-items: stretch;
}

.dash-card{
  min-height: 0;
}

.dash-card-scroll{
  overflow: auto;
}

.dash-sep{
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.section-title{
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2px;
  color: #0f172a;
  margin: 0 0 10px 0;
}

.dash-note{
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.info-list{
  display: grid;
  gap: 10px;
}

.info-row{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 10px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.info-k{
  color: #334155;
  font-weight: 900;
  font-size: 12px;
}

.info-v{
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  word-break: break-word;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid var(--line);
}

.badge-ok{ background: #ecfeff; border-color: rgba(32,160,176,.35); color:#0f172a; }
.badge-warn{ background: #fff7ed; border-color: rgba(240,176,0,.45); color:#0f172a; }
.badge-err{ background: #fef2f2; border-color: rgba(224,0,16,.30); color:#0f172a; }

.dash-form{
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

/* Select no mesmo estilo dos inputs */
select{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  outline: none;
  font-size: 14px;
  background: #ffffff;
  transition: box-shadow .15s ease, border-color .15s ease;
}

select:focus{
  border-color: rgba(32,160,176,.65);
  box-shadow: 0 0 0 4px rgba(32,160,176,.18);
}

.empty-state{
  margin-top: 12px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(100,116,139,.45);
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  font-size: 13px;
}

/* Responsivo */
@media (max-width: 980px){
  body{ overflow: auto; }

  .page{
    height: auto;
  }

  .dash-grid{
    grid-template-columns: 1fr;
  }

  .topbar-inner-left{
    justify-content:center;
  }

  .topbar-text-left{
    text-align:center;
  }

  /* Em mobile, evita "aperto": deixa o cartão do regulamento crescer */
  .regolamento-static{
    height: auto;
    min-height: 200px;
  }
}
