:root {
  --green: #0f6b3f;
  --green-dark: #0a4d2d;
  --green-light: #e8f4ee;
  --gold: #b98a2f;
  --ink: #1d2b24;
  --muted: #5b6b62;
  --bg: #ffffff;
  --line: #dde7e1;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Kufi Arabic", Arial, sans-serif;
  line-height: 1.65;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; color: var(--green-dark); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 760px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.25rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand:hover { text-decoration: none; }
.logo { width: 42px; height: 42px; }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--green-dark); }
.main-nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.main-nav a { color: var(--ink); font-weight: 500; }
.main-nav a:hover { color: var(--green); text-decoration: none; }
.nav-verify { color: var(--green) !important; font-weight: 700 !important; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: .2rem .8rem; font-size: .9rem; }

/* hero */
.hero { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: #fff; padding: 4.5rem 0; text-align: center; }
.hero h1 { color: #fff; font-size: 2.4rem; margin: 0 0 .8rem; }
.hero-sub { max-width: 640px; margin: 0 auto 1.8rem; font-size: 1.1rem; opacity: .95; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* buttons */
.btn { display: inline-block; border-radius: var(--radius); padding: .65rem 1.4rem; font-weight: 600; border: 2px solid transparent; cursor: pointer; font-size: 1rem; }
.btn:hover { text-decoration: none; opacity: .92; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-outline { border-color: currentColor; color: var(--green); background: transparent; }
.hero .btn-outline { color: #fff; }
.btn-small { padding: .35rem .9rem; font-size: .85rem; }
.btn-danger { background: #b3372f; color: #fff; }

/* sections */
.section { padding: 3.2rem 0; }
.section-alt { background: var(--green-light); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: #fff; }
.card h3 { margin-top: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; max-width: 640px; }
.steps li { position: relative; padding: .55rem 3rem; font-weight: 500; }
[dir="ltr"] .steps li { padding-left: 3rem; padding-right: 0; }
[dir="rtl"] .steps li { padding-right: 3rem; padding-left: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 0; top: .45rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* forms */
.verify-form { display: flex; gap: .6rem; margin: 1.4rem 0; flex-wrap: wrap; }
.verify-form input { flex: 1; min-width: 220px; }
input, textarea, select {
  font: inherit; padding: .6rem .8rem; border: 1px solid var(--line);
  border-radius: var(--radius); width: 100%; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--green); border-color: var(--green); }
.contact-form { display: grid; gap: .9rem; max-width: 560px; }
.contact-form label { font-weight: 600; display: grid; gap: .3rem; }
.contact-form small { font-weight: 400; color: var(--muted); }
.contact-details { color: var(--muted); margin-top: 2rem; }

/* product list (application form) */
.product-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .35rem; }
.product-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; background: var(--green-light); border: 1px solid #bfdccb; border-radius: var(--radius); padding: .4rem .8rem; }
.product-remove { background: none; border: none; color: #8c2b24; font-size: 1rem; cursor: pointer; padding: 0 .2rem; }

/* standards checkboxes (application form) */
.std-checks { display: grid; gap: .4rem; margin-top: .5rem; }
.std-check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400 !important; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; cursor: pointer; }
.std-check input { width: auto; margin-top: .3rem; }
.std-check:has(input:checked) { background: var(--green-light); border-color: var(--green); }

/* alerts + badges */
.alert { border-radius: var(--radius); padding: .8rem 1.1rem; margin: 1rem 0; }
.alert-error { background: #fdecea; color: #8c2b24; border: 1px solid #f2c4c0; }
.alert-ok { background: var(--green-light); color: var(--green-dark); border: 1px solid #bfdccb; }
.badge { border-radius: 999px; padding: .15rem .8rem; font-size: .82rem; font-weight: 700; text-transform: uppercase; }
.badge-valid { background: var(--green-light); color: var(--green-dark); }
.badge-expired { background: #f7ecd6; color: #7a5a14; }
.badge-suspended { background: #fdecea; color: #8c2b24; }
.badge-revoked { background: #3a3a3a; color: #fff; }

/* certificate result */
.status-banner { display: flex; gap: 1rem; align-items: center; border-radius: var(--radius); padding: 1rem 1.3rem; margin: 1.4rem 0; flex-wrap: wrap; }
.status-banner .status-label { font-size: 1.15rem; font-weight: 800; letter-spacing: .5px; }
.status-valid { background: var(--green-light); color: var(--green-dark); border: 2px solid var(--green); }
.status-expired { background: #f7ecd6; color: #7a5a14; border: 2px solid #c9a24a; }
.status-suspended { background: #fdecea; color: #8c2b24; border: 2px solid #c0564e; }
.status-revoked { background: #efefef; color: #222; border: 2px solid #555; }
.cert-card { display: grid; grid-template-columns: 1fr auto; gap: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; align-items: start; }
.cert-table { border-collapse: collapse; width: 100%; }
.cert-table th, .cert-table td { text-align: start; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.cert-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.cert-side { text-align: center; display: grid; gap: .8rem; justify-items: center; }
.qr { width: 170px; height: 170px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 6px; }

/* stage tracker */
.stage-track { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.2rem 0; }
.stage { display: flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem .25rem .3rem; font-size: .78rem; color: var(--muted); background: #fff; }
.stage .dot { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--line); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; }
.stage.done { border-color: var(--green); color: var(--green-dark); }
.stage.done .dot { background: var(--green); }
.stage.current { border-color: var(--gold); background: #fff8e6; color: #6b5210; font-weight: 700; }
.stage.current .dot { background: var(--gold); }

/* admin */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-table { border-collapse: collapse; width: 100%; margin-top: 1rem; background: #fff; }
.admin-table th, .admin-table td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: start; }
.admin-table th { background: var(--green-light); color: var(--green-dark); }
.admin-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; margin-top: 1rem; }
.qr-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; text-align: center; word-break: break-all; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--green-dark); color: #dfeee6; margin-top: 2rem; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; padding: 2rem 1.25rem 1rem; flex-wrap: wrap; }
.copyright { padding: 0 1.25rem 1.5rem; font-size: .85rem; opacity: .8; }

@media (max-width: 760px) {
  .hero h1 { font-size: 1.7rem; }
  .cert-card, .admin-grid { grid-template-columns: 1fr; }
  .cert-side { justify-items: start; }
}
