/* ── PPSN Depositor Registry — Global Styles ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1e3a5f;
  --navy-dark: #14293f;
  --orange: #d35400;
  --orange-light: #e67e22;
  --green: #27ae60;
  --bg: #f0f4f8;
  --white: #ffffff;
  --gray: #666;
  --border: #dde3ec;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: #222;
  line-height: 1.5;
  font-size: 16px;
}

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: white;
  padding: .8rem 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { max-width: 960px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.header-logo { display: flex; align-items: center; gap: 1rem; }
.logo-seal { font-size: 2rem; }
.header-logo h1 { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.header-logo p { font-size: .78rem; opacity: .8; }
.header-case { font-size: .75rem; opacity: .75; text-align: right; }

/* ── Container ── */
.container { max-width: 800px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ── Notice Banner ── */
.notice-banner {
  background: #fff8e1;
  border: 2px solid #f59e0b;
  border-radius: 8px;
  padding: .8rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ── Progress Bar ── */
.progress-bar { display: flex; align-items: center; margin-bottom: 1.5rem; }
.step { display: flex; flex-direction: column; align-items: center; gap: .3rem; flex: 0 0 auto; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: #dde3ec; color: #666; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: all .3s; }
.step.active .step-num { background: var(--navy); color: white; }
.step.done .step-num { background: var(--green); color: white; }
.step-label { font-size: .72rem; text-align: center; color: #666; }
.step.active .step-label { color: var(--navy); font-weight: 600; }
.step-line { flex: 1; height: 2px; background: #dde3ec; margin: 0 .5rem; margin-bottom: 1rem; }

/* ── Form Card ── */
.form-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  margin-bottom: 1rem;
}
.card-header { margin-bottom: 1.5rem; }
.card-header h2 { color: var(--navy); font-size: 1.25rem; }
.card-header .tamil { font-size: .9rem; color: var(--gray); font-weight: 400; margin-left: .5rem; }
.card-desc { color: var(--gray); font-size: .85rem; margin-top: .3rem; }

/* ── Form Grid ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: .85rem; font-weight: 600; color: #333; }
.tamil-lbl { font-size: .75rem; color: var(--gray); font-weight: 400; margin-left: .3rem; }
.req { color: #e53e3e; margin-left: .2rem; }
.opt { font-size: .75rem; color: var(--gray); font-weight: 400; margin-left: .2rem; }
.hint { font-size: .75rem; color: var(--gray); }

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="date"], input[type="password"],
select, textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  background: white;
  transition: border-color .2s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}
input::placeholder, textarea::placeholder { color: #aaa; }
textarea { resize: vertical; }

/* ── Radio Group ── */
.radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 400; cursor: pointer; }
.radio-label input[type="radio"] { width: 18px; height: 18px; accent-color: var(--navy); }

/* ── Deposit Card ── */
.deposit-card { border: 2px solid var(--border); border-radius: 10px; padding: 1.2rem; margin-bottom: 1rem; }
.deposit-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.deposit-card-header h3 { color: var(--navy); font-size: 1rem; }
.remove-btn { background: none; border: none; color: #e53e3e; font-size: .85rem; cursor: pointer; padding: .2rem .5rem; }
.add-deposit-row { margin: .5rem 0 1.5rem; }

/* ── Upload Section ── */
.upload-section { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.upload-item { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: #f8f9fa; border-radius: 10px; padding: 1rem; border: 2px solid var(--border); }
.upload-item.required-doc { border-color: var(--navy); }
.upload-icon { font-size: 1.8rem; flex: 0 0 auto; }
.upload-info { flex: 1; min-width: 140px; }
.upload-info strong { font-size: .9rem; display: block; }
.upload-info p { font-size: .8rem; color: var(--gray); }
.upload-btn { background: var(--navy); color: white; padding: .5rem 1rem; border-radius: 6px; cursor: pointer; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.upload-btn.secondary { background: #6c757d; }
.upload-btn input[type="file"] { display: none; }
.file-name { font-size: .8rem; color: var(--green); font-weight: 600; flex-basis: 100%; margin-top: .2rem; }

/* ── Declaration ── */
.declaration-box { background: #f0f4ff; border: 2px solid #c3d0f0; border-radius: 10px; padding: 1.2rem; margin-bottom: 1.5rem; }
.declaration-label { display: flex; gap: .8rem; align-items: flex-start; font-size: .88rem; line-height: 1.6; cursor: pointer; }
.declaration-label input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 auto; margin-top: .1rem; accent-color: var(--navy); }
.tamil-small { font-size: .8rem; color: var(--gray); display: block; margin-top: .3rem; }

/* ── Buttons ── */
.btn-row { display: flex; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.btn-row.center { justify-content: center; }

.btn-primary {
  background: var(--navy);
  color: white;
  border: none;
  padding: .75rem 1.8rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { background: var(--navy-dark); }
.btn-primary.full-width { width: 100%; text-align: center; }
.btn-primary.small { padding: .4rem .9rem; font-size: .82rem; }

.btn-secondary {
  background: white;
  color: var(--navy);
  border: 2px solid var(--navy);
  padding: .7rem 1.5rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all .2s;
}
.btn-secondary:hover { background: var(--navy); color: white; }
.btn-secondary.small { padding: .35rem .8rem; font-size: .8rem; }

.btn-submit {
  background: var(--orange);
  color: white;
  border: none;
  padding: .85rem 2.2rem;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-submit:hover { background: #b94600; }

.btn-back {
  background: #e9ecef;
  color: #333;
  border: none;
  padding: .7rem 1.4rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-back.small { padding: .35rem .8rem; font-size: .8rem; }

/* ── Success Page ── */
.success-card {
  background: white;
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
}
.success-icon { font-size: 4rem; color: var(--green); margin-bottom: 1rem; background: #d4edda; width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.2rem; }
.success-card h2 { color: var(--navy); margin-bottom: .5rem; }
.claim-id-box { background: linear-gradient(135deg, var(--navy) 0%, #2a4f7c 100%); color: white; padding: 1.5rem; border-radius: 10px; margin: 1.5rem 0; }
.claim-label { font-size: .85rem; opacity: .8; margin-bottom: .4rem; }
.claim-id { font-size: 2rem; font-weight: 800; letter-spacing: .05em; color: #f8c94d; }
.claim-hint { font-size: .82rem; opacity: .85; margin-top: .6rem; }
.summary-box { text-align: left; background: #f8f9fa; border-radius: 10px; padding: 1.2rem; margin: 1rem 0; }
.summary-box h3 { color: var(--navy); margin-bottom: .8rem; font-size: .95rem; }
.summary-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.summary-table td { padding: .45rem .3rem; border-bottom: 1px solid #eee; }
.summary-table td:first-child { color: var(--gray); font-size: .8rem; width: 50%; }
.highlight { color: var(--orange); font-size: 1.1rem; }
.next-steps { text-align: left; background: #e8f4fd; border-radius: 10px; padding: 1.2rem; margin: 1rem 0; }
.next-steps h3 { color: var(--navy); margin-bottom: .8rem; font-size: .95rem; }
.next-steps ol { padding-left: 1.2rem; font-size: .85rem; }
.next-steps li { margin-bottom: .5rem; }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge.pending { background: #fff3cd; color: #856404; }
.badge.verified { background: #d4edda; color: #155724; }
.badge.disputed { background: #f8d7da; color: #721c24; }

/* ── Admin ── */
.admin-body { background: #f0f2f5; }
.admin-nav { background: var(--navy); color: white; padding: .7rem 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.nav-brand { font-weight: 700; font-size: 1.1rem; }
.nav-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* Login */
.login-card { max-width: 380px; margin: 5rem auto; background: white; padding: 2.5rem; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.15); text-align: center; }
.login-logo { font-size: 3rem; margin-bottom: 1rem; }
.login-card h2 { color: var(--navy); margin-bottom: .3rem; }
.login-sub { color: var(--gray); font-size: .9rem; margin-bottom: 1.5rem; }
.login-note { font-size: .78rem; color: var(--gray); margin-top: 1rem; }
.alert-error { background: #f8d7da; color: #721c24; padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .88rem; }

/* ── Footer ── */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.7); text-align: center; padding: 1.2rem; font-size: .8rem; line-height: 1.7; margin-top: 2rem; }

/* ── Duplicate Alert ── */
.dup-alert {
  background: #fff0f0;
  border: 2px solid #dc2626;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: .88rem;
  line-height: 1.7;
  color: #333;
}
.dup-alert strong { color: #dc2626; display: block; margin-bottom: .3rem; }

/* ── Utility ── */
.hidden { display: none !important; }
.tamil { font-size: .85rem; color: var(--gray); font-weight: 400; }
