/* ApplyOnce — shared styles for auth & inner pages (matches index.html branding) */
:root {
  --navy: #1F3864;
  --navy-dark: #16294B;
  --gold: #C89B3C;
  --gray: #6B7280;
  --light: #F5F6F9;
  --border: #E5E7EB;
  --red: #B42318;
  --red-bg: #FEF3F2;
  --green: #1B7F4C;
  --green-bg: #EFFAF3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1A1A1A;
  line-height: 1.55;
  background: var(--light);
}
a { color: var(--navy); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

header {
  position: sticky; top: 0; z-index: 10;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 34px; width: 34px; display: block; }
.brand span { font-weight: 800; font-size: 20px; color: var(--navy); }
nav.links { display: flex; align-items: center; gap: 22px; }
nav.links a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 15px; }
nav.links a:hover { color: var(--gold); }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  background: var(--gold); color: #1A1A1A !important; font-weight: 700;
  text-decoration: none; font-size: 15px; border: none; cursor: pointer;
}
.btn:hover { opacity: 0.92; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-outline {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  border: 2px solid var(--navy); color: var(--navy) !important; font-weight: 700;
  text-decoration: none; font-size: 15px; background: transparent; cursor: pointer;
}
.btn-full { width: 100%; text-align: center; padding: 13px 22px; }

.nav-auth { display: flex; align-items: center; gap: 10px; }
.btn-nav {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  border: 2px solid var(--gold); font-weight: 700;
  text-decoration: none; font-size: 15px; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn-nav-primary { background: var(--gold); color: #1A1A1A !important; }
.btn-nav-primary:hover, .btn-nav-primary:focus-visible { background: #FFFFFF; color: #1A1A1A !important; }
.btn-nav-ghost { background: #FFFFFF; color: #1A1A1A !important; }
.btn-nav-ghost:hover, .btn-nav-ghost:focus-visible { background: var(--gold); color: #1A1A1A !important; }

footer {
  background: #12203A; color: #A9B4CC; padding: 40px 0; font-size: 14px; margin-top: 60px;
}
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 24px; width: 24px; }
.footer-brand span { color: #FFFFFF; font-weight: 700; }
footer a { color: #C9D2E5; }

/* Auth layout */
.auth-shell { padding: 56px 0 80px; }
.auth-card {
  max-width: 480px; margin: 0 auto; background: #FFFFFF; border: 1px solid var(--border);
  border-radius: 16px; padding: 40px 36px; box-shadow: 0 8px 30px rgba(22,41,75,0.06);
}
.auth-card h1 { font-size: 26px; color: var(--navy); margin: 0 0 6px; }
.auth-card p.sub { color: var(--gray); font-size: 15px; margin: 0 0 28px; }

.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
.role-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.role-toggle label {
  display: block; text-align: center; padding: 14px 10px; border-radius: 10px;
  border: 2px solid var(--border); font-weight: 700; font-size: 14px; color: var(--gray);
  cursor: pointer; transition: 0.15s;
}
.role-toggle input:checked + label {
  border-color: var(--navy); background: var(--navy); color: #FFFFFF;
}

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; color: #1A1A1A; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--gray); font-size: 12.5px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="date"],
.field input[type="tel"] {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 15px; font-family: inherit; background: #FFFFFF;
}
.field input:focus { outline: none; border-color: var(--navy); }
.phone-group { display: flex; gap: 8px; }
.field .phone-group select {
  flex: none; width: 108px; padding: 12px 8px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 14px; font-family: inherit; background: #FFFFFF; color: #1A1A1A;
}
.phone-group select:focus { outline: none; border-color: var(--navy); }
.phone-group input[type="tel"] { flex: 1; }
.field-row { display: flex; align-items: center; gap: 10px; }
.field-row input[type="checkbox"] { width: 18px; height: 18px; flex: none; }
.field-row label { margin: 0; font-weight: 500; font-size: 14px; color: #333; }
.whatsapp-row { display: none; margin-top: 10px; }
.whatsapp-row.show { display: block; }

.terms-row { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0; }
.terms-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.terms-row label { font-size: 13.5px; color: var(--gray); }
.terms-row a { color: var(--navy); font-weight: 600; }

.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; display: none; }
.alert.show { display: block; }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid #F5C2BE; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid #B9E4C9; }

.foot-link { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--gray); }
.foot-link a { font-weight: 700; }

.pw-meter { height: 5px; border-radius: 3px; background: var(--border); margin-top: 8px; overflow: hidden; }
.pw-meter div { height: 100%; width: 0%; background: var(--red); transition: 0.2s; }
.pw-hint { font-size: 12px; color: var(--gray); margin-top: 6px; }

.page-shell { padding: 56px 0 80px; }
.page-shell h1 { color: var(--navy); font-size: 30px; }
.page-shell h2 { color: var(--navy); font-size: 20px; margin-top: 34px; }
.page-shell p, .page-shell li { color: #333; font-size: 15px; }

@media (max-width: 560px) {
  .auth-card { padding: 30px 22px; border-radius: 0; box-shadow: none; border: none; }
  .auth-shell { padding: 0; }
}

/* Applicant profile form (profile.php) */
.profile-card {
  max-width: 720px; margin: 0 auto; background: #FFFFFF; border: 1px solid var(--border);
  border-radius: 16px; padding: 40px 36px; box-shadow: 0 8px 30px rgba(22,41,75,0.06);
}
.form-section { margin-bottom: 38px; }
.form-section:last-child { margin-bottom: 0; }
.form-section h2 {
  color: var(--navy); font-size: 17px; margin: 0 0 4px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.form-section .section-hint { color: var(--gray); font-size: 13.5px; margin: 4px 0 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-grid .field-span2 { grid-column: 1 / -1; }
.field select,
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 15px; font-family: inherit; background: #FFFFFF; color: #1A1A1A;
}
.field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); }
.field textarea { resize: vertical; min-height: 78px; }
.conditional-block {
  display: none; margin-top: 4px; padding: 18px; background: var(--light);
  border-radius: 10px; border: 1px solid var(--border);
}
.conditional-block.show { display: block; }
.yn-toggle { display: flex; gap: 10px; }
.yn-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.yn-toggle label {
  padding: 9px 22px; border-radius: 8px; border: 1.5px solid var(--border);
  font-weight: 600; font-size: 14px; color: var(--gray); cursor: pointer; transition: 0.15s;
}
.yn-toggle input:checked + label { border-color: var(--navy); background: var(--navy); color: #FFFFFF; }
.ref-block {
  padding: 18px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; background: var(--light);
}
.ref-block .ref-title { font-weight: 700; color: var(--navy); font-size: 14px; margin-bottom: 12px; }
.save-bar {
  position: sticky; bottom: 0; background: #FFFFFF; border-top: 1px solid var(--border);
  padding: 16px 0; margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.save-bar .save-status { color: var(--gray); font-size: 13.5px; }
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .profile-card { padding: 26px 18px; }
}

/* Document checklist (documents.php) */
.progress-track {
  height: 10px; border-radius: 6px; background: var(--border); overflow: hidden; margin: 18px 0 8px;
}
.progress-fill { height: 100%; background: var(--gold); transition: width 0.25s; }
.progress-label { font-size: 13.5px; color: var(--gray); }
.doc-card {
  border: 1.5px solid var(--border); border-radius: 12px; padding: 20px 22px; margin-bottom: 14px; background: #FFFFFF;
}
.doc-card.is-required { border-left: 4px solid var(--navy); }
.doc-card.is-optional { border-left: 4px solid var(--border); }
.doc-card.is-uploaded { border-left-color: var(--green); }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.doc-title { font-weight: 700; font-size: 15.5px; color: #1A1A1A; }
.doc-badge {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.doc-badge.required { background: rgba(31,56,100,0.08); color: var(--navy); }
.doc-badge.optional { background: var(--light); color: var(--gray); }
.doc-badge.uploaded { background: var(--green-bg); color: var(--green); }
.doc-hint { color: var(--gray); font-size: 13.5px; margin-bottom: 14px; }
.doc-file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-file-row input[type="file"] { font-size: 13.5px; flex: 1; min-width: 200px; }
.doc-current {
  display: flex; align-items: center; gap: 10px; background: var(--light); border-radius: 8px;
  padding: 10px 14px; font-size: 13.5px; color: #333; margin-top: 10px; flex-wrap: wrap;
}
.doc-current a { font-weight: 700; }
.doc-current .doc-remove { color: var(--red); font-weight: 700; cursor: pointer; background: none; border: none; font-size: 13.5px; }
.doc-error { color: var(--red); font-size: 13px; margin-top: 8px; display: none; }
.doc-error.show { display: block; }
.doc-uploading { font-size: 13px; color: var(--gray); margin-top: 8px; display: none; }
.doc-uploading.show { display: block; }
.extra-list { margin-top: 10px; }

/* Property manager: service-area checkboxes + application-mode radios (pm-profile.php) */
.checkbox-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 14px; margin-top: 4px;
}
.checkbox-option { font-weight: 400; font-size: 13.5px; color: #333; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checkbox-option input { margin: 0; }

/* Mobile hamburger menu (added for responsive nav) */
.nav-toggle {
      display: none;
        background: none;
          border: none;
            font-size: 34px;
              line-height: 1;
                cursor: pointer;
                  color: var(--navy);
                    padding: 6px 10px;
}

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