/* Custom CSS matching exact RealMe and Immigration NZ VisaView dark theme screenshots */

:root {
  --rm-orange: #df4100;
  --rm-orange-hover: #c43900;
  --rm-bg-grey: #f5f6f8;
  --rm-input-bg: #eef1f3;

  --inz-blue-header: #042e56;
  --inz-subbar-bg: #202428;
  --inz-dark-bg: #1c1f23;
  --inz-cyan-title: #3bb8ed;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--rm-bg-grey);
  color: #222222;
  line-height: 1.5;
  font-size: 15px;
  overflow-x: hidden;
}

.view-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.text-orange {
  color: var(--rm-orange) !important;
}

.uppercase {
  text-transform: uppercase;
}

.ml-3 { margin-left: 0.75rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

/* ================= 1. REALME LOGIN PAGE STYLING ================= */

.realme-header {
  background-color: #000000;
  color: #ffffff;
  padding: 1.25rem 0;
  border-bottom: 1px solid #111111;
}

.realme-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.realme-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.realme-logo-svg {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rm-icon-dot {
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--rm-orange);
  border-radius: 50%;
  display: inline-block;
}

.rm-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.rm-subtext {
  font-size: 1.1rem;
  color: #df4100;
  font-weight: 500;
}

.nz-immigration-logo-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #ffffff;
}

.silver-fern-icon {
  font-size: 1.6rem;
  color: #ffffff;
}

.nz-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* Sub Navigation Bar */
.sub-nav-bar {
  background-color: #eef1f3;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e6ea;
}

.back-link {
  color: #444444;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  text-decoration: underline;
  color: #111111;
}

/* Maintenance Notice Banner */
.maintenance-notice {
  background-color: #f7f7f7;
  padding: 1.25rem 0;
  color: #444444;
  font-size: 0.9rem;
  line-height: 1.45;
  border-bottom: 1px solid #e5e5e5;
}

/* Login Main Layout */
.login-main-content {
  padding: 3rem 0 4rem 0;
  flex: 1;
}

.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .login-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.login-col-left {
  border-right: 1px solid #e0e4e8;
  padding-right: 3rem;
}

@media (max-width: 768px) {
  .login-col-left {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #e0e4e8;
    padding-bottom: 2.5rem;
  }
}

.realme-heading {
  font-size: 2.2rem;
  font-weight: 400;
  color: #222222;
  margin-bottom: 0.5rem;
}

.realme-heading-sm {
  font-size: 1.9rem;
  font-weight: 400;
  color: #222222;
  margin-bottom: 0.5rem;
}

.realme-sub {
  font-size: 0.95rem;
  color: #555555;
  margin-bottom: 1.75rem;
}

.realme-desc {
  font-size: 0.925rem;
  color: #555555;
  margin-bottom: 2rem;
  line-height: 1.55;
}

/* Login Form Inputs */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group-rm {
  display: flex;
  flex-direction: column;
}

.rm-input {
  width: 100%;
  max-width: 380px;
  background-color: var(--rm-input-bg);
  border: 1px solid #e0e4e8;
  border-radius: 20px;
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #222222;
  outline: none;
  transition: all 0.2s;
}

.rm-input:focus {
  background-color: #ffffff;
  border-color: var(--rm-orange);
  box-shadow: 0 0 0 3px rgba(223, 65, 0, 0.15);
}

.rm-error-msg {
  color: #c92a2a;
  background-color: #ffe3e3;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  max-width: 380px;
}

/* RealMe Orange Pill Button */
.btn-realme-orange {
  background-color: var(--rm-orange);
  color: #ffffff;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  transition: background-color 0.2s;
  box-shadow: 0 2px 5px rgba(223, 65, 0, 0.2);
}

.btn-realme-orange:hover {
  background-color: var(--rm-orange-hover);
}

.rm-btn-badge {
  background-color: #ffffff;
  color: var(--rm-orange);
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.btn-realme-outline {
  border: 2px solid var(--rm-orange);
  color: var(--rm-orange);
  background-color: transparent;
  border-radius: 25px;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s;
}

.btn-realme-outline:hover {
  background-color: var(--rm-orange);
  color: #ffffff;
}

.forgot-links {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #555555;
}

.forgot-links a {
  color: var(--rm-orange);
  font-weight: 700;
  text-decoration: none;
}

.forgot-links a:hover {
  text-decoration: underline;
}


/* ================= 2. IMMIGRATION NZ DARK THEME PAGES ================= */

.dark-theme-page {
  background-color: var(--inz-dark-bg);
  color: #ffffff;
}

/* Header */
.inz-header {
  background-color: var(--inz-blue-header);
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inz-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

.header-inz-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inz-logo-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.silver-fern-badge {
  color: #3bb8ed;
  font-size: 1.8rem;
}

.inz-brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.inz-title-main {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.inz-title-sub {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.inz-contact-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.inz-contact-link:hover {
  text-decoration: underline;
}

/* Sub-bar */
.inz-subbar {
  background-color: var(--inz-subbar-bg);
  padding: 0.85rem 0;
  border-bottom: 1px solid #2a2e33;
}

.subbar-inner {
  font-size: 0.875rem;
  color: #a0a6ad;
  line-height: 1.6;
}

.breadcrumb-line {
  margin-bottom: 0.4rem;
  color: #9aa0a6;
}

.user-info-line {
  color: #c0c5cc;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.user-info-line strong {
  color: #ffffff;
}

.app-num-subbar {
  color: #a0a6ad;
  font-size: 0.85rem;
}

.app-num-subbar strong {
  color: #ffffff;
}

.logout-link {
  color: #3bb8ed;
  text-decoration: none;
  margin-left: 0.25rem;
}

.logout-link:hover {
  text-decoration: underline;
}

/* Main Content */
.inz-main-content {
  padding: 2rem 0 3rem 0;
  flex: 1;
}

.result-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.result-title-row .result-page-title {
  margin-bottom: 0;
}

.result-page-title, .inz-page-heading {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--inz-cyan-title);
  margin-bottom: 1.25rem;
}

.app-num-display {
  color: #a0a6ad;
  font-size: 0.9rem;
}

.app-num-display strong {
  color: #ffffff;
  font-weight: 700;
}

.inz-page-sub {
  color: #b0b6be;
  margin-bottom: 1.25rem;
  font-size: 0.925rem;
}

/* Sections */
.res-section {
  margin-bottom: 1.5rem;
}

.res-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.res-body-text {
  color: #d0d5dc;
  font-size: 0.9rem;
  line-height: 1.55;
}

.res-body-text p {
  margin-bottom: 0.65rem;
}

.res-body-text strong {
  color: #ffffff;
}

/* Table Grid for Visa Details (Exact Mobile Screenshot Styling) */
.details-table {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 600px;
  width: 100%;
}

.table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.15rem 0;
  font-size: 0.9rem;
}

.spacer-row {
  height: 0.4rem;
}

.cell-label {
  color: #aaaaaa;
  font-weight: 400;
  width: 50%;
}

.cell-value {
  color: #ffffff;
  font-weight: 700;
  text-align: right;
  width: 50%;
}

/* Dark Visa Conditions Box (Optimized padding & line-height to fit single page PDF perfectly without text cuts) */
.conditions-dark-box {
  background-color: #232934;
  border: 1px solid #2d3544;
  padding: 1rem 1.15rem;
  border-radius: 4px;
  color: #d0d5dd;
  font-size: 0.875rem;
  line-height: 1.5;
  width: 100%;
  word-break: break-word;
}

/* Dates Summary Section */
.dates-summary-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 600px;
  margin-top: 0.85rem;
  width: 100%;
}

.summary-line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.sum-label {
  color: #aaaaaa;
}

.sum-val {
  color: #ffffff;
  font-weight: 700;
}

/* Warning Olive Box */
.warning-olive-box {
  background-color: #2a2e19;
  border: 1px solid #6b7228;
  padding: 1rem 1.15rem;
  border-radius: 4px;
  color: #d9deaa;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.warning-olive-box strong {
  color: #ffffff;
}

/* Action Buttons */
.res-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 600px;
  margin-top: 1.25rem;
  width: 100%;
}

.btn-action-cyan {
  background-color: #0082a6;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: background-color 0.2s;
  width: 100%;
}

.btn-action-cyan:hover {
  background-color: #0096c0;
}

.btn-action-grey {
  background-color: #4a4e54;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  width: 100%;
}

.btn-action-grey:hover {
  background-color: #595e65;
}

/* Dark Enquiry Form Inputs */
.dark-enquiry-form {
  background-color: #23272c;
  border: 1px solid #30353c;
  padding: 1.75rem;
  border-radius: 6px;
  width: 100%;
  overflow: hidden;
}

.form-section-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--inz-cyan-title);
  border-bottom: 1px solid #333942;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Grid Layouts */
.form-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

@media (max-width: 640px) {
  .form-row-grid {
    grid-template-columns: 1fr;
  }
}

.form-group-dark {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}

.label-dark {
  font-size: 0.85rem;
  color: #b0b6be;
  font-weight: 600;
}

.req {
  color: #ff6b6b;
}

.control-dark {
  background-color: #17191c;
  border: 1px solid #383e47;
  color: #ffffff;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  font-size: 0.925rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.control-dark option {
  background-color: #17191c;
  color: #ffffff;
}

.control-dark:focus {
  border-color: var(--inz-cyan-title);
  box-shadow: 0 0 0 2px rgba(59, 184, 237, 0.2);
}

/* Consent Checkbox Styling */
.consent-checkbox-row {
  display: flex;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #30353c;
}

.consent-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #d0d5dc;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.consent-check {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #0082a6;
  cursor: pointer;
}

.form-actions-dark {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.btn-inz-cyan {
  background-color: #0082a6;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: background-color 0.2s;
}

.btn-inz-cyan:hover {
  background-color: #0096c0;
}

/* Footer */
.inz-footer {
  background-color: #141618;
  padding: 1.75rem 0;
  border-top: 1px solid #23272c;
  font-size: 0.825rem;
  color: #7b828a;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-primary, .footer-links-secondary {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-links-primary a, .footer-links-secondary a {
  color: #9097a0;
  text-decoration: none;
}

.footer-links-primary a:hover, .footer-links-secondary a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Loading Buffer Overlay (2 Second Transition Screen) */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(20, 23, 27, 0.92);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: #23272c;
  border: 1px solid #383e47;
  padding: 2.25rem 3rem;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  text-align: center;
  min-width: 320px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(59, 184, 237, 0.2);
  border-top: 4px solid #3bb8ed;
  border-radius: 50%;
  animation: spinOverlay 0.85s linear infinite;
}

@keyframes spinOverlay {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* Printable PDF Styling Overrides */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  .inz-header, .inz-subbar, .inz-footer, .res-action-buttons {
    display: none !important;
  }
  .dark-theme-page {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  .result-page-title {
    color: #003366 !important;
  }
  .res-heading {
    color: #003366 !important;
  }
  .res-body-text, .cell-label, .sum-label {
    color: #333333 !important;
  }
  .cell-value, .sum-val, .res-body-text strong {
    color: #000000 !important;
  }
  .conditions-dark-box {
    background-color: #f5f5f5 !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
  }
  .warning-olive-box {
    background-color: #fffde6 !important;
    color: #333300 !important;
    border: 1px solid #999900 !important;
  }
}

/* ================= 6. OFFICIAL NEW ZEALAND WORK VISA APPROVAL DOCUMENT (IMAGE FORMAT) ================= */

.official-doc-preview-wrapper {
  display: none !important;
  margin-top: 2rem;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.doc-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #042e56;
  color: #3bb8ed;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 20px 20px 0 0;
  border: 1px solid #00509d;
  border-bottom: none;
}

.official-approval-doc {
  background-color: #ffffff;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  max-width: 800px;
  padding: 45px 50px 40px 50px;
  box-sizing: border-box;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  border: 1px solid #d0d5dd;
  position: relative;
  text-align: left;
}

.official-approval-doc .doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.official-approval-doc .doc-header-left {
  font-size: 13.5px;
  line-height: 1.45;
  color: #111111;
}

.official-approval-doc .doc-header-left .meta-row {
  margin-bottom: 2px;
}

.official-approval-doc .doc-header-left .meta-row strong {
  font-weight: 700;
}

.official-approval-doc .doc-header-left .meta-date {
  margin-top: 4px;
}

.official-approval-doc .doc-header-right {
  text-align: right;
}

.official-approval-doc .doc-greeting {
  font-size: 14px;
  font-weight: 400;
  color: #111111;
  margin-bottom: 22px;
}

.official-approval-doc .doc-approval-section {
  margin-bottom: 22px;
}

.official-approval-doc .doc-approval-heading {
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 4px;
}

.official-approval-doc .doc-approval-paragraph {
  font-size: 13px;
  line-height: 1.45;
  color: #222222;
}

.official-approval-doc .doc-section-heading {
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  margin-top: 18px;
  margin-bottom: 12px;
}

.official-approval-doc .doc-applicant-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 20px;
}

.official-approval-doc .doc-applicant-grid .grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.official-approval-doc .doc-applicant-grid .grid-cell {
  color: #222222;
}

.official-approval-doc .doc-applicant-grid .lbl {
  font-weight: 400;
  color: #111111;
}

.official-approval-doc .doc-applicant-grid .val {
  font-weight: 400;
  color: #111111;
}

.official-approval-doc .doc-conditions-body {
  font-size: 12.5px;
  line-height: 1.45;
  color: #222222;
  margin-bottom: 24px;
}

.official-approval-doc .doc-conditions-body p {
  margin-bottom: 3.5px;
}

.official-approval-doc .doc-deportation-warning {
  font-size: 13.5px;
  font-weight: 700;
  color: #111111;
  margin-top: 16px;
  margin-bottom: 45px;
}

.official-approval-doc .doc-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid #ffffff;
  padding-top: 10px;
}

