/* Zenith Dynamics — shared stylesheet */
:root{
  --bg:#0f172a;
  --card:#1e293b;
  --card-border:#293548;
  --accent:#38bdf8;
  --accent-strong:#0284c7;
  --text-main:#e2e8f0;
  --text-muted:#94a3b8;
  --danger:#f87171;
  --success:#4ade80;
}
*{ box-sizing:border-box; }
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(56,189,248,0.08), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(2,132,199,0.10), transparent 40%),
    var(--bg);
  font-family:"Inter","Segoe UI",Helvetica,Arial,sans-serif;
  color:var(--text-main);
  display:flex;
  justify-content:center;
  padding:48px 16px;
}
.wrap{ width:100%; max-width:640px; }
.wrap.wide{ max-width:820px; }

.brand{ display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.brand img{ height:42px; width:auto; border-radius:8px; }
.brand h1{ font-size:18px; margin:0; letter-spacing:0.5px; }
.brand span{ display:block; font-size:12px; color:var(--text-muted); }
.brand-row{ display:flex; justify-content:space-between; align-items:center; }
.brand-row a.logout{ color:var(--text-muted); font-size:12.5px; text-decoration:none; border:1px solid var(--card-border); padding:7px 12px; border-radius:8px; }
.brand-row a.logout:hover{ color:var(--danger); border-color:var(--danger); }

.card{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:16px;
  padding:32px;
  box-shadow:0 20px 60px rgba(0,0,0,0.35);
}
.card h2{ margin:0 0 6px; font-size:22px; }
.card p.sub{ margin:0 0 26px; color:var(--text-muted); font-size:14px; line-height:1.5; }

label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--text-muted);
  margin-bottom:6px;
  margin-top:18px;
}
input[type=text], input[type=email], input[type=password]{
  width:100%;
  padding:12px 14px;
  background:#0f172a;
  border:1px solid var(--card-border);
  border-radius:10px;
  color:var(--text-main);
  font-size:14px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(56,189,248,0.15);
}

.terms-box{
  margin-top:20px;
  background:#0f172a;
  border:1px solid var(--card-border);
  border-radius:10px;
  padding:16px;
  max-height:220px;
  overflow-y:auto;
  font-size:12.5px;
  line-height:1.6;
  color:var(--text-muted);
}
.terms-box h4{ color:var(--text-main); font-size:13px; margin:14px 0 6px; }
.terms-box h4:first-child{ margin-top:0; }

.agree{ display:flex; align-items:flex-start; gap:10px; margin-top:18px; font-size:13px; color:var(--text-muted); }
.agree input{ margin-top:3px; accent-color:var(--accent); width:16px; height:16px; }

.error{
  background:rgba(248,113,113,0.1);
  border:1px solid rgba(248,113,113,0.4);
  color:var(--danger);
  font-size:13px;
  padding:10px 14px;
  border-radius:8px;
  margin-top:18px;
}
.success{
  background:rgba(74,222,128,0.1);
  border:1px solid rgba(74,222,128,0.4);
  color:var(--success);
  font-size:13px;
  padding:10px 14px;
  border-radius:8px;
  margin-top:18px;
}

button, .btn{
  display:inline-block;
  text-align:center;
  width:100%;
  margin-top:26px;
  padding:14px;
  border:none;
  border-radius:10px;
  background:linear-gradient(135deg, var(--accent), var(--accent-strong));
  color:#04121f;
  font-weight:700;
  font-size:14.5px;
  cursor:pointer;
  letter-spacing:0.3px;
  text-decoration:none;
  transition:transform .1s ease, box-shadow .15s ease;
}
button:hover, .btn:hover{ box-shadow:0 8px 24px rgba(56,189,248,0.35); transform:translateY(-1px); }
.btn.secondary{ background:transparent; border:1px solid var(--card-border); color:var(--text-main); }

.foot-note{ text-align:center; color:var(--text-muted); font-size:12px; margin-top:22px; }
.links-row{ text-align:center; margin-top:16px; font-size:12.5px; color:var(--text-muted); }
.links-row a{ color:var(--accent); text-decoration:none; }

/* ---------- Dashboard / certificate list ---------- */
.cert-list{ margin-top:10px; }
.cert-item{
  display:flex; justify-content:space-between; align-items:center;
  background:#0f172a; border:1px solid var(--card-border); border-radius:10px;
  padding:14px 16px; margin-bottom:10px;
}
.cert-item .meta{ font-size:12.5px; color:var(--text-muted); }
.cert-item .ref{ font-weight:700; color:var(--text-main); font-size:13.5px; }
.cert-item a{ color:var(--accent); font-size:12.5px; text-decoration:none; border:1px solid var(--card-border); padding:7px 12px; border-radius:8px; }

/* ---------- Certificate document ---------- */
.cert-actions{ display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.cert-actions .links a{ color:var(--accent); font-size:13px; text-decoration:none; margin-right:16px; }
.cert-actions button{ width:auto; margin-top:0; }

.certificate{
  background:#0b1220;
  border:1px solid var(--card-border);
  border-radius:16px;
  padding:44px;
  box-shadow:0 25px 70px rgba(0,0,0,0.45);
  position:relative;
  overflow:hidden;
}
.certificate::before{
  content:"";
  position:absolute; inset:10px;
  border:1px solid rgba(56,189,248,0.25);
  border-radius:10px;
  pointer-events:none;
}
.cert-header{ text-align:center; padding-bottom:22px; margin-bottom:26px; border-bottom:1px solid var(--card-border); }
.cert-header img{ height:52px; margin-bottom:12px; border-radius:8px; }
.cert-header h2{ margin:0; font-size:20px; letter-spacing:0.4px; color:var(--text-main); }
.cert-header p{ margin:6px 0 0; font-size:12.5px; letter-spacing:1.5px; text-transform:uppercase; color:var(--accent); }

.meta-box{ background:var(--card); border:1px solid var(--card-border); border-radius:10px; padding:18px 20px; margin-bottom:26px; }
.meta-row{ display:flex; justify-content:space-between; gap:14px; padding:7px 0; font-size:13px; border-bottom:1px dashed rgba(148,163,184,0.15); }
.meta-row:last-child{ border-bottom:none; }
.meta-row .label{ color:var(--text-muted); }
.meta-row .value{ font-weight:600; text-align:right; word-break:break-word; }

.legal h4{ font-size:13.5px; margin:16px 0 6px; color:var(--text-main); }
.legal h4:first-child{ margin-top:0; }
.legal p{ font-size:12.5px; line-height:1.7; color:var(--text-muted); margin:0; }

.consent-line{
  margin-top:22px; font-size:12.5px; color:var(--text-muted);
  background:rgba(56,189,248,0.06); border:1px solid rgba(56,189,248,0.2);
  border-radius:8px; padding:12px 14px;
}

.sig-block{ display:flex; justify-content:space-between; margin-top:38px; padding-top:20px; border-top:1px solid var(--card-border); }
.sig-col{ width:45%; text-align:center; }
.sig-line{ border-top:1px solid var(--text-muted); margin-bottom:6px; padding-top:6px; font-size:12px; color:var(--text-main); }
.sig-role{ font-size:11px; color:var(--text-muted); }

.cert-footer{ text-align:center; margin-top:30px; font-size:11px; color:var(--text-muted); }
.cert-footer .ref-tag{ display:inline-block; margin-top:6px; padding:4px 10px; border:1px solid var(--card-border); border-radius:20px; color:var(--accent); letter-spacing:0.5px; }

.save-note{ text-align:center; color:var(--text-muted); font-size:12px; margin-top:18px; }

@media print{
  body{ background:#fff !important; padding:0; }
  .cert-actions, .save-note, .brand{ display:none !important; }
  .wrap{ max-width:100%; }
  .certificate{ background:#fff; color:#0f172a; box-shadow:none; border:1px solid #ccc; }
  .certificate::before{ border-color:#0284c7; }
  .meta-box{ background:#f1f5f9; border-color:#cbd5e1; }
  .meta-row .value, .cert-header h2, .sig-line{ color:#0f172a; }
  .meta-row .label, .legal p, .cert-footer, .sig-role, .consent-line{ color:#334155; }
  .cert-header p{ color:#0284c7; }
}
