/* Smart Self Attendance — smartselfattandance.dwarkvyn.com
   Plain CSS, no build step. Brand palette matches the Android app's default "Teal" theme. */

:root {
  --primary: #0f766e;
  --primary-light: #5eead4;
  --accent: #ea580c;
  --ink: #0f172a;
  --night: #0b1220;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --outline: #e2e8f0;
  --radius: 20px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--surface-alt);
  line-height: 1.55;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
}

header.site .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.brand img { height: 28px; width: 28px; border-radius: 7px; }

nav.links { display: flex; gap: 24px; align-items: center; }
nav.links a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
nav.links a:hover { color: var(--primary); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 720px) {
  nav.links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--outline);
    display: none;
  }
  nav.links.open { display: flex; }
  nav.links a { width: 100%; padding: 14px 24px; border-top: 1px solid var(--outline); }
  .nav-toggle { display: block; }
}

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--primary), #115e59 60%, var(--night));
  color: #fff;
  padding: 72px 0 96px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .badges { justify-content: center; }
}

.hero h1 { font-size: 2.5rem; line-height: 1.15; margin: 0 0 16px; }
.hero p.lead { font-size: 1.1rem; color: rgba(255, 255, 255, 0.88); margin: 0 0 28px; max-width: 46ch; }

.badges { display: flex; gap: 12px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.hero-art {
  aspect-ratio: 4 / 3;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.hero-art img { width: 46%; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35)); }

/* ---------- sections ---------- */

section { padding: 72px 0; }
section.alt { background: var(--surface); }

h2.section-title {
  font-size: 1.9rem;
  margin: 0 0 8px;
  text-align: center;
}

p.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 54ch;
  margin: 0 auto 40px;
}

/* ---------- cards / glass ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #fff;
}

.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- pricing / plan table ---------- */

.plan-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.plan-table th, .plan-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--outline);
  font-size: 0.95rem;
}

.plan-table th { background: var(--surface-alt); font-weight: 600; }
.plan-table th.free { color: var(--text-muted); }
.plan-table th.premium { color: var(--primary); }
.plan-table tr:last-child td { border-bottom: none; }

/* ---------- CTA ---------- */

.cta {
  background: var(--ink);
  color: #fff;
  text-align: center;
  border-radius: 28px;
  padding: 56px 32px;
}

.cta h2 { margin: 0 0 12px; font-size: 1.8rem; }
.cta p { color: rgba(255, 255, 255, 0.78); margin: 0 0 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
}

.btn:hover { background: #0d6059; text-decoration: none; }
.btn.secondary { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.3); }
.btn.outline { background: transparent; border: 1px solid var(--outline); color: var(--text); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- footer ---------- */

footer.site {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 28px;
  margin-top: 40px;
}

footer.site .cols {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

footer.site .brand { color: #fff; }
footer.site a { color: rgba(255, 255, 255, 0.75); }
footer.site a:hover { color: #fff; }

footer.site .links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.9rem; }
footer.site .links a { display: block; margin-bottom: 8px; }

.fine { text-align: center; padding-top: 20px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); }
.fine a { color: rgba(255, 255, 255, 0.7); }

.developed-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}
.developed-by img { height: 18px; width: 18px; border-radius: 4px; }

/* ---------- simple content pages (privacy/terms) ---------- */

.doc {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
  max-width: 820px;
  margin: 0 auto;
}

.doc h1 { margin-top: 0; }
.doc h2 { margin-top: 32px; font-size: 1.2rem; }
.doc p, .doc li { color: var(--text-muted); }
.doc .updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }

@media (max-width: 600px) {
  .doc { padding: 28px 20px; }
}

/* ---------- admin panel ---------- */

.admin-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.admin-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .admin-card { padding: 24px 20px; }
}

.uid-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  margin: 10px 0 20px;
  overflow-wrap: anywhere;
}

.btn-small {
  background: var(--surface-alt);
  border: 1px solid var(--outline);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  margin-right: 6px;
}
.btn-small:hover { background: var(--outline); }
.btn-small.danger { color: #b91c1c; border-color: #fecaca; }
.btn-small.danger:hover { background: #fef2f2; }

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
}

.new-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 18px;
}
.new-code-box code { font-size: 1.3rem; font-weight: 700; letter-spacing: 1px; color: var(--primary); }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--outline);
  white-space: nowrap;
}
table.admin-table td:nth-child(5) { white-space: normal; max-width: 220px; }
table.admin-table code { background: var(--surface-alt); padding: 2px 6px; border-radius: 6px; }

.banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.92rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
