
:root{
  --sempro-navy:  #0B1F3B;
  --sempro-blue:  #6FA0E8;
  --sempro-ice:   #EAF2FF;
  --sempro-brown: #7A3B2E;
  --stroke: rgba(11,31,59,.12);
}

/* Font + baseline (tailwind-like) */
html, body { height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--sempro-navy);
}

/* Background */
.bg-hero{
  background:
    radial-gradient(900px 600px at 20% 18%, rgba(111,160,232,.22) 0%, rgba(111,160,232,0) 55%),
    radial-gradient(900px 600px at 82% 78%, rgba(122,59,46,.10) 0%, rgba(122,59,46,0) 55%),
    linear-gradient(180deg, #f7f9fd 0%, #eef3fb 55%, #e8eef9 100%);
}

.pattern{ position:relative; }
.pattern:before{
  content:"";
  position:absolute; inset:0;
  background-image: radial-gradient(rgba(11,31,59,.06) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity:.32;
  pointer-events:none;
  -webkit-mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 65%);
          mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 65%);
}

/* Shell */
.auth-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.container{
  width:100%;
  max-width:560px;
  position:relative;
  z-index:1;
}

/* Shadow like sample */
.card-shadow{
  box-shadow:
    0 32px 90px rgba(11,31,59,.18),
    0 14px 30px rgba(11,31,59,.12);
}

/* Logo tray */
.logo-tray{
  background: rgba(255,255,255,.95);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px 22px;
  width: fit-content;
  margin: 0 auto 18px auto;
}

/* Tenant logo */
.tenant-logo{
  display:block;
  height: 110px;
  max-height: 130px;
  width:auto;
}

@media (max-width:480px){
  .tenant-logo{ height: 94px; }
  .logo-tray{ padding: 14px 18px; border-radius: 16px; }
}

/* Card */
.auth-card{
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(226,232,240,1);
  border-radius: 18px;
  overflow:hidden;
}

.card-header{
  padding: 34px 34px 8px 34px;
  text-align:center;
}

.card-title{
  font-size: 30px;
  font-weight: 800;
  margin:0;
  letter-spacing: -0.01em;
}

/* Welcome title a bit smaller for long municipality names */
.welcome-title{
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.25;
}

.accent-line{
  height:3px;
  width:96px;
  margin: 12px auto 0 auto;
  background: linear-gradient(90deg, rgba(111,160,232,.95), rgba(122,59,46,.65));
  border-radius:999px;
}

.card-subtitle{
  margin: 12px 0 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

/* ✅ MISSING BEFORE: Card body padding (fixes welcome button spacing) */
.card-body{
  padding: 18px 34px 26px 34px;
}

/* Buttons */
.btn{
  display:block;
  width:100%;
  background: var(--sempro-navy);
  color:#fff;
  border:none;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 16px;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(11,31,59,.22);
  transition: background .15s ease, transform .05s ease;
  text-align:center;
  text-decoration:none;
  box-sizing:border-box;
}
.btn:hover{ background:#0E2A52; }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.55; cursor:not-allowed; box-shadow:none; }

.card-footer{
  padding: 0 34px 26px 34px;
  text-align:center;
  font-size: 12px;
  color:#94a3b8;
}

/* ===== FORM STYLES (login/register) ===== */
.form-body{
  padding: 18px 34px 24px 34px;
}

.field{ margin-bottom: 16px; }
.label{
  display:block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.input{
  width:100%;
  box-sizing:border-box;
  border: 1px solid rgba(11,31,59,.16);
  background: var(--sempro-ice);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input:focus{
  outline:none;
  border-color: rgba(111,160,232,.85);
  box-shadow: 0 0 0 4px rgba(111,160,232,.18);
  background:#fff;
}

.row-between{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 4px 0 18px 0;
  font-size: 13px;
  color:#64748b;
}

.check{
  display:flex;
  align-items:center;
  gap:8px;
  user-select:none;
}
.check input{ accent-color: var(--sempro-blue); }

.link{
  color: var(--sempro-brown);
  font-weight: 700;
  text-decoration:none;
}
.link:hover{ text-decoration:underline; }

.error{
  margin-top: 14px;
  text-align:center;
  font-size: 13px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 10px 12px;
}
.hidden{ display:none; }

.form-footer{
  margin-top: 14px;
  margin-bottom: 16px;   /* ← adds space before footer */
  text-align:center;
  font-size: 13px;
}
/* Applicant Details page only */
.applicant-page .field{
  margin-bottom: 14px;
}

/* Two dropdowns side-by-side (but mobile-friendly) */
.applicant-page .two-col{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

/* On wider phones/tablets, show 2 columns */
@media (min-width: 520px){
  .applicant-page .two-col{
    grid-template-columns: 1fr 1fr;
  }
}

/* Applicant Details – scan selector */
.applicant-page .scan-picker{
  margin: 6px 0 14px;
}

.applicant-page .scan-options{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.applicant-page .scan-options .opt{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
  user-select: none;
}

.applicant-page .scan-options input[type="radio"]{
  transform: scale(1.1);
}

.applicant-page #btnScan{
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
}

/* Mobile spacing tweaks */
@media (max-width: 520px){
  .applicant-page .scan-picker{
    margin: 16px 0;
  }

  .applicant-page #btnScan{
    margin-top: 12px;
    margin-bottom: 12px;
  }
}
/* =========================
   Applicant Details - Photos
   (Copied from test app)
   ========================= */

/* thumbs grid */
.applicant-page .thumbs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.applicant-page .thumb{
  width:110px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;
  background:#fafafa;
  cursor:pointer;
}

.applicant-page .thumb img{
  width:100%;
  height:86px;
  object-fit:cover;
  display:block;
}

.applicant-page .thumb .cap{
  padding:8px 10px;
  font-size:12px;
  color:#111;
}

.applicant-page .thumb .small{
  font-size:12px;
  color:#444;
}

/* =========================
   Photos: thumbnails + modal overlay
   (same behaviour as test app)
   ========================= */

/* thumbs grid */
.applicant-page .thumbs{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.applicant-page .thumb{
  width: 110px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
  cursor: pointer;
}

.applicant-page .thumb img{
  width: 100%;
  height: 86px;
  object-fit: cover;
  display: block;
}

.applicant-page .thumb .cap{
  padding: 8px 10px;
  font-size: 12px;
}

/* modal overlay */
#photoModal.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}

/* hidden state (you already have .hidden{display:none} but this is extra-safe) */
#photoModal.hidden{ display: none !important; }

#photoModal .panel{
  width: min(720px, 100%);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

#photoModal .panel header{
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

/* Scanner modal overlay (popup) */
#scanModal.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 9999;
}

/* Hide when closed */
#scanModal.hidden{ display:none !important; }

/* Panel sizing */
#scanModal .panel{
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

/* Header */
#scanModal .panel header{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid #eee;
}

/* Camera area: keep it usable (not massive) */
#scanModal video{
  width: 100%;
  max-height: 55vh;
  border-radius: 12px;
  background: #000;
  object-fit: cover;
  display:block;
}

/* Global popup modal overlay */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 9999;
}

.hidden{ display:none !important; }

.modal .panel{
  width: min(720px, 100%);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.modal .panel header{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid #eee;
}

.modal video{
  width: 100%;
  max-height: 55vh;
  border-radius: 12px;
  background: #000;
  object-fit: cover;
  display:block;
}
.app-footer {
    text-align: center;
    font-size: 12px;
    color: #8a8f9a;
    margin-top: 15px;
    padding-bottom: 20px;
}
/* ===== GLOBAL ACTION BAR ===== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}
.btn-primary {
    background: #0d2a4a;
    color: #fff;   /* <-- make sure this exists */
}

/* Standard primary button */
.btn-primary-solid {
    background: #0d2a4a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 28px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary-solid svg {
    fill: #fff;
}

.btn-primary-solid:disabled {
    opacity: 0.6;
}
.page-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-footer {
    text-align: center;
    font-size: 12px;
    color: #8a8f9a;
    margin-top: 15px;
}
.photo-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:10px;
}
.table-scroll{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

/* keeps columns from squashing too much */
.app-table{
  min-width: 720px; /* adjust if needed */
  text-align: left !important;
}

/* optional: make scroll bar less ugly on mobile */
.table-scroll::-webkit-scrollbar{
  height:8px;
}
/* =========================================================
   Applications – Desktop Table + Mobile Cards
   ========================================================= */

/* Desktop shows table */
.apps-desktop { display:block; }
.apps-mobile  { display:none; }

/* Mobile cards */
.app-card{
  background:#fff;
  border-radius:16px;
  padding:14px;
  margin-bottom:12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.app-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
  gap:10px;
}
.app-formno{
  font-weight:800;
  font-size:15px;
  word-break:break-word;
}
.status-pill{
  background:#e2e8f0;
  padding:4px 10px;
  border-radius:20px;
  font-size:11px;
  font-weight:700;
}

/* Open button (smaller) */
.app-open-inline{
  padding:8px 14px;
  border-radius:18px;
  font-size:13px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
}

/* ================= MOBILE ================= */
@media (max-width: 680px){
  .apps-desktop{ display:none; }
  .apps-mobile { display:block; }

  .app-card{ padding:12px; margin-bottom:10px; }
  .app-formno{ font-size:14px; }
  .status-pill{ font-size:11px; padding:3px 8px; }

  /* Smaller Open button on mobile */
  .app-open-inline{
    padding:7px 14px;
    font-size:13px;
    border-radius:16px;
    margin-top:4px;
  }

  /* If any "Captured by" remains somewhere, hide it on mobile */
  .app-meta{ display:none; }
}

