/* GreenKea Data Destruction Portal — styles.css */
:root {
  --forest: #1B4332; --leaf: #40916C; --amber: #F77F00;
  --cream: #FAF7F0; --charcoal: #212529; --sand: #f1ede2;
  --line: #e3ded0; --muted: #6d7263;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--cream); color: var(--charcoal); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; color: var(--forest); line-height: 1.2; }
h1 { font-size: 1.7rem; }
a { color: var(--forest); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 0; background: var(--forest); color: #fff; padding: .5rem 1rem; z-index: 99; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.topbar { position: sticky; top: 0; z-index: 40; background: var(--forest); color: var(--cream); display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.wm { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; line-height: 1.05; }
.wm small { display: block; font-size: .55rem; letter-spacing: .35em; color: #9dd3b4; font-weight: 600; }
.userbox { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.uname { font-size: .85rem; color: #cfe4d6; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.view[hidden] { display: none !important; }

.btn { display: inline-block; border: 0; border-radius: 8px; padding: .65rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn.primary { background: var(--amber); color: var(--charcoal); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border: 1.5px solid var(--forest); color: var(--forest); }
.btn.ghost:hover { background: rgba(27,67,50,.07); }
.topbar .btn.ghost { border-color: #9dd3b4; color: #d9e8de; }
.btn.small { padding: .35rem .8rem; font-size: .8rem; }
.btn.block { display: block; width: 100%; }

.msg { margin-top: .75rem; font-size: .9rem; min-height: 1.2em; color: #b00020; }
.msg.ok { color: var(--forest); }

/* ---- auth ---- */
.auth-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .auth-wrap { grid-template-columns: 1fr; } }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem; }
.auth-card h1 { margin-bottom: .5rem; }
.auth-card h1 em { color: var(--amber); font-style: normal; }
.auth-card .lead { color: var(--muted); margin-bottom: 1.25rem; }
.auth-tabs { display: flex; gap: .5rem; border-bottom: 2px solid var(--line); margin-bottom: 1.25rem; }
.tab { background: none; border: 0; font: inherit; font-weight: 600; padding: .5rem .9rem; cursor: pointer; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--forest); border-bottom-color: var(--leaf); }
.auth-form label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .9rem; }
.auth-form input, .formcard input, .formcard select, .formcard textarea { width: 100%; margin-top: .25rem; padding: .6rem .7rem; border: 1px solid #c9c3b4; border-radius: 8px; font: inherit; background: #fff; }
.auth-side .stepcard { display: flex; gap: .75rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--leaf); border-radius: 10px; padding: .9rem 1rem; margin-bottom: .75rem; font-size: .92rem; }
.stepcard .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--leaf); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.fineprint { margin-top: 1rem; font-size: .78rem; color: var(--muted); line-height: 1.7; }

/* ---- dashboard ---- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.sub { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.device-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1rem; }
.devcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.devcard .top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.devcard h3 { font-size: 1.02rem; margin-bottom: .15rem; }
.certno { font-size: .72rem; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.statuschip { font-size: .72rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; white-space: nowrap; }
.st-registered { background: #ece9df; color: #6d6a5c; }
.st-received { background: #e3ecf5; color: #274a6d; }
.st-stored { background: #efe4f5; color: #5c3a70; }
.st-wiping { background: #fdf1e3; color: #a35b00; }
.st-verified { background: #e2f0e8; color: #1f5c3d; }
.st-certified { background: var(--forest); color: #ffd9a0; }
.mini-steps { display: flex; gap: 4px; margin: .8rem 0 .4rem; }
.mini-steps i { flex: 1; height: 6px; border-radius: 3px; background: #e8e3d5; }
.mini-steps i.on { background: var(--leaf); }
.mini-steps i.on.cur { background: var(--amber); }
.devcard .meta { font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }
.devcard .row { display: flex; gap: .5rem; flex-wrap: wrap; }

.empty { text-align: center; padding: 3rem 1rem; background: #fff; border: 1.5px dashed var(--line); border-radius: 14px; }
.empty p { margin-bottom: .4rem; }

/* ---- forms ---- */
.narrow { max-width: 720px; }
.card.formcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; margin-top: 1rem; }
.formcard label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .9rem; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .frow { grid-template-columns: 1fr; } }
.back { margin-bottom: 1rem; }

/* ---- detail / journey ---- */
.detail-hero { background: var(--forest); color: var(--cream); border-radius: 14px; padding: 1.5rem 1.6rem; margin-bottom: 1.25rem; }
.detail-hero h2 { color: var(--cream); margin-bottom: .2rem; }
.detail-hero .certno { color: #9dd3b4; }
.detail-hero .row { margin-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.spec { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; }
.spec .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.spec .v { font-weight: 600; color: var(--forest); word-break: break-all; }
.journey { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.journey h3 { margin-bottom: 1rem; }
.jstep { display: grid; grid-template-columns: 28px 1fr; gap: .9rem; position: relative; padding-bottom: 1.4rem; }
.jstep:last-child { padding-bottom: 0; }
.jstep::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: #e3ddcd; }
.jstep:last-child::before { display: none; }
.jstep .dot { width: 28px; height: 28px; border-radius: 50%; background: #ece7d9; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; z-index: 1; }
.jstep.done .dot { background: var(--leaf); color: #fff; }
.jstep.done::before { background: var(--leaf); }
.jstep.cur .dot { background: var(--amber); color: #fff; box-shadow: 0 0 0 5px rgba(247,127,0,.18); }
.jstep .jbody strong { display: block; color: var(--forest); }
.jstep .jbody p { font-size: .85rem; color: var(--muted); }
.jstep .jbody time { font-size: .75rem; color: #98937f; display: block; margin-top: .15rem; }
.jstep.pending { opacity: .55; }
.certcta { margin-top: 1.25rem; background: #e7f0ea; border: 1px solid #bcd6c4; border-radius: 10px; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.certcta strong { color: var(--forest); }

/* ---- verify ---- */
.verify-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem; text-align: center; }
.verify-card .big { font-size: 2.4rem; margin-bottom: .5rem; }
.kvtable { max-width: 460px; margin: 1rem auto 0; text-align: left; width: 100%; border-collapse: collapse; }
.kvtable td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.kvtable td:first-child { color: var(--muted); width: 45%; }

/* ---- admin ---- */
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: .9rem; }
.admin-card .top { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: .5rem; }
.admin-card .owner { font-size: .8rem; color: var(--muted); }
.admin-controls { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.admin-controls select, .admin-controls input { padding: .5rem .6rem; border: 1px solid #c9c3b4; border-radius: 8px; font: inherit; font-size: .85rem; background: #fff; }

.site-foot { background: var(--forest); color: #9db8a8; text-align: center; padding: 1.1rem; font-size: .78rem; margin-top: auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
