/* Platforma ESG ARSC - app client. Paleta "Slate + Emerald" (ca pe esg.arsc.ro). */
:root {
  --primary: #0F172A;
  --primary-dark: #020617;
  --primary-light: #334155;
  --green: #059669;
  --green-light: #10B981;
  --green-bg: #ECFDF5;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --text-light: #5B6B82;
  --link: #047857;
  --red: #DC2626;
  --amber: #D97706;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 25px rgba(15,23,42,.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; font-size: 15px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { color: var(--primary); line-height: 1.25; margin: 0 0 .4em; }
.hidden { display: none !important; }

/* ---- Layout ---- */
.topbar {
  background: var(--primary); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.topbar .brand .badge { background: var(--green); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 12px; letter-spacing: .5px; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #cbd5e1; }
.container { max-width: 880px; margin: 0 auto; padding: 28px 20px 80px; }

/* ---- Auth (login / change pw) ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 36px 32px; width: 100%; max-width: 400px; }
.auth-card .logo { text-align: center; margin-bottom: 8px; font-weight: 800; color: var(--primary); font-size: 20px; }
.auth-card .logo .badge { background: var(--green); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.auth-card .sub { text-align: center; color: var(--text-light); margin-bottom: 24px; font-size: 14px; }

/* ---- Forms ---- */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--primary-light); }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text); margin-bottom: 16px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(5,150,105,.12); }
textarea { resize: vertical; min-height: 64px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: none; border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; background: var(--green); color: #fff; transition: background .15s;
}
.btn:hover { background: #047857; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--primary-light); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }

/* ---- Messages ---- */
.msg { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.msg-error { background: #FEF2F2; color: var(--red); border: 1px solid #FECACA; }
.msg-ok { background: var(--green-bg); color: #047857; border: 1px solid #A7F3D0; }
.msg-info { background: #F1F5F9; color: var(--primary-light); border: 1px solid var(--border); }

/* ---- Dashboard ---- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.card h2 { display: flex; align-items: center; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.muted { color: var(--text-light); }
.status-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.st-draft { background: #F1F5F9; color: var(--primary-light); }
.st-trimis { background: #DBEAFE; color: #1D4ED8; }
.st-in_evaluare { background: #FEF3C7; color: #B45309; }
.st-clarificari { background: #FFEDD5; color: #C2410C; }
.st-finalizat { background: var(--green-bg); color: #047857; }
.progress { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress > span { display: block; height: 100%; background: var(--green); transition: width .3s; }

/* ---- Chestionar ---- */
.pillar { margin-bottom: 28px; }
.pillar-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.pillar-head .dot { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.pillar-E .dot { background: var(--green); }
.pillar-S .dot { background: #0EA5E9; }
.pillar-G .dot { background: var(--primary-light); }
.q { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.q .tema { font-size: 12px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .4px; }
.q .intrebare { font-weight: 600; margin: 4px 0 12px; }
.choices { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.choice { flex: 1; min-width: 90px; text-align: center; padding: 9px; border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; background: #fff; user-select: none; transition: all .12s; }
.choice:hover { border-color: var(--green-light); }
.choice.sel-da { background: var(--green-bg); border-color: var(--green); color: #047857; }
.choice.sel-partial { background: #FFFBEB; border-color: var(--amber); color: var(--amber); }
.choice.sel-nu { background: #FEF2F2; border-color: var(--red); color: var(--red); }
.q .files { margin-top: 6px; font-size: 13px; }
.q .files .file-item { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; margin: 3px 6px 3px 0; }
.q .files .file-item a { font-size: 13px; }
.q .files .rm { color: var(--red); cursor: pointer; font-weight: 700; }
.upload-label { display: inline-block; font-size: 13px; color: var(--link); cursor: pointer; font-weight: 600; }
.upload-label input { display: none; }
.saveflag { font-size: 12px; color: var(--text-light); margin-left: 8px; }

/* ---- Sticky submit bar ---- */
.submitbar { position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--border); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sp .6s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .container { padding: 18px 14px 80px; } .auth-card { padding: 28px 22px; } }
