/* ============================================================
   CURRENCY SWITCHER, PAYMENT CHECKOUT & PDF DOSSIER STYLES
   ============================================================ */

/* Topbar Currency & PDF Header Buttons */
.currency-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 8px;
}
.curr-icon {
  font-size: 13px;
}
.topbar-currency-select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
  cursor: pointer;
  outline: none;
}
.fx-rate-status { color: var(--muted); font-size: 10px; line-height: 1.2; max-width: 120px; }
.pdf-export-header-btn {
  background: #f0f7ee;
  border: 1px solid #c2dec0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdf-export-header-btn:hover {
  background: var(--soft-green);
  border-color: var(--green);
}

/* Payment Checkout Modal */
.checkout-modal {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  position: relative;
}
.payment-tabs {
  display: flex;
  gap: 4px;
  background: #edf2ea;
  padding: 4px;
  border-radius: 10px;
  margin: 16px 0 20px;
}
.payment-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.payment-tab.active {
  background: var(--white);
  color: var(--green-dark);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.checkout-summary-box {
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.summary-row strong {
  display: block;
  font-size: 14px;
}
.summary-row small {
  font-size: 11px;
  color: var(--muted);
}
.chk-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--green-dark);
  text-align: right;
}
.chk-price span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  display: block;
}

/* UPI QR Card */
.upi-qr-card {
  background: #fafbfa;
  border: 1px dashed #cadbc8;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
}
.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.qr-code-icon {
  font-size: 64px;
  line-height: 1;
  color: var(--green);
}
.qr-placeholder small {
  font-size: 11.5px;
  color: var(--muted);
}
.upi-id-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  background: var(--white);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.upi-id-row code {
  font-weight: 700;
  color: var(--green-dark);
}
.checkout-submit-btn {
  padding: 12px;
  font-size: 14px;
}

/* PDF Dossier Modal & Printable Layout */
.dossier-modal-wrap {
  background: var(--white);
  border-radius: 16px;
  max-width: 860px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  overflow: hidden;
}
.dossier-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fbfcf9;
}
.dossier-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}
.dossier-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dossier-content {
  padding: 36px 40px;
  overflow-y: auto;
  background: #ffffff;
  font-family: "DM Sans", sans-serif;
  color: #1a231b;
  line-height: 1.6;
}

/* Dossier Document Sections */
.dossier-doc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 2px solid #1a5629;
  margin-bottom: 24px;
}
.dossier-brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
}
.dossier-brand span {
  color: #245f43;
}
.dossier-meta-date {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.dossier-section {
  margin-bottom: 26px;
}
.dossier-sec-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #245f43;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8df;
  margin-bottom: 12px;
}
.dossier-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 13px;
}
.dossier-field-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed #eaeaea;
}
.dossier-field-row span:first-child {
  color: var(--muted);
  font-weight: 500;
}
.dossier-field-row strong {
  color: var(--ink);
}
.dossier-uni-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 8px;
}
.dossier-uni-table th {
  background: #f1f6ef;
  color: #2b4530;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #dce8da;
}
.dossier-uni-table td {
  padding: 8px 10px;
  border: 1px solid #eef2eb;
}
.dossier-sop-box {
  background: #f9fbf8;
  border: 1px solid #e1ebde;
  border-radius: 8px;
  padding: 14px;
  font-size: 12.5px;
  white-space: pre-wrap;
  line-height: 1.65;
}

/* Print Media Query */
@media print {
  body * {
    visibility: hidden;
  }
  #dossier-printable-content, #dossier-printable-content * {
    visibility: visible;
  }
  #dossier-printable-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
  }
}

/* ===== MOCK INTERVIEW HISTORY ===== */
.interview-history { margin-top: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.interview-history h3 { font-size: 15px; margin-bottom: 12px; }
.history-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fafaf8; }
.history-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.history-item summary::-webkit-details-marker { display: none; }
.history-title { font-weight: 600; font-size: 13px; }
.history-meta { color: var(--muted); font-size: 12px; }
.history-score { font-weight: 700; color: var(--green); white-space: nowrap; }
.history-body { padding: 4px 14px 12px; border-top: 1px solid var(--line); }
.history-answer { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.history-answer:last-of-type { border-bottom: none; }
.history-answer .history-q { font-weight: 600; margin-bottom: 4px; }
.history-answer .history-flag { color: var(--danger); margin-top: 4px; }
.history-delete-btn { margin-top: 8px; border: 1px solid var(--line); background: var(--white); color: var(--danger); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 12px; }

/* ===== SOP VERSION HISTORY ===== */
.sop-history { margin-top: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.sop-history h3 { font-size: 15px; margin-bottom: 4px; }
.sop-history-hint { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.sop-version { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafaf8; margin-bottom: 8px; }
.sop-version-title { font-weight: 600; font-size: 13px; }
.sop-version-meta { color: var(--muted); font-size: 12px; }
.sop-version-score { font-weight: 700; color: var(--green); white-space: nowrap; }
.sop-version-delta.up { color: var(--green); }
.sop-version-delta.down { color: var(--danger); }
.sop-version-actions { display: flex; gap: 6px; }
.sop-version-actions button { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.sop-version-actions .sop-version-delete { color: var(--danger); }

/* ===== GOOGLE SIGN-IN ===== */
.google-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.google-button:hover { background: #f8faf6; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ===== CHECKOUT (hosted) ===== */
.checkout-plans { display: grid; gap: 10px; margin: 16px 0 12px; }
.checkout-plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--white); }
.checkout-plan.selected { border-color: var(--green); background: var(--soft-green); }
.checkout-plan span:nth-of-type(1) { flex: 1; display: flex; flex-direction: column; }
.checkout-plan small { color: var(--muted); font-size: 12px; }
.checkout-plan-price { font-weight: 700; color: var(--green); white-space: nowrap; }
.checkout-actions { display: grid; gap: 8px; }
.checkout-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ===== DATA PROVENANCE ===== */
.prov-badge { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fafaf8; color: var(--muted); }
.prov-badge a { color: inherit; text-decoration: underline; }
.prov-badge.ok { background: var(--soft-green); color: var(--green); border-color: #cfe3c8; }
.prov-badge.stale { background: #fff6e0; color: #8a5a00; border-color: #f2dba0; }
.prov-badge.unverified { background: #fff1ef; color: #9a3412; border-color: #f6cfc7; }
.prov-badge.generic { background: #eef3fb; color: #3b5b8a; border-color: #d3e0f3; }
.uni-card-prov, .str-uni-prov, .sch-prov { margin-top: 8px; font-size: 12px; color: var(--muted); }
.uni-tuition-note { display: block; margin-top: 4px; }
.data-disclaimer { background: #fffaf0; border: 1px solid #f2dba0; color: #6b4a00; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin: 0 0 14px; }

/* ===== ORGANISATION ===== */
.org-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.org-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; align-content: start; }
.org-card h3 { font-size: 16px; }
.org-card input[type=text], .org-card input[type=email], .org-card select, .org-card textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.org-card label { display: grid; gap: 4px; font-size: 13px; font-weight: 500; }
.org-consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 12.5px; color: #3d4d3d; }
.org-consent input { margin-top: 3px; }
.org-error { color: var(--danger); font-size: 13px; min-height: 18px; }
.org-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.org-h2 { font-size: 20px; display: inline-block; margin-right: 10px; }
.org-h4 { margin: 20px 0 8px; font-size: 14px; }
.org-badge { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--soft-green); color: var(--green); font-weight: 600; }
.org-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.org-tab-btn { border: none; background: transparent; padding: 9px 14px; cursor: pointer; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.org-tab-btn.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.org-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.org-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.org-table th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.org-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.org-table tr:last-child td { border-bottom: none; }
.org-table small, .org-grid small { color: var(--muted); }
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: 13px; }
.org-list { list-style: none; display: grid; gap: 8px; }
.org-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.org-draft { background: var(--white); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 0 12px 12px; }
.org-draft summary { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; font-size: 13px; }
.org-score { font-weight: 700; color: var(--green); white-space: nowrap; }
.org-draft-text { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: #fafaf8; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.org-note { background: #f8faf6; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.org-note p { margin-top: 4px; white-space: pre-wrap; }
.org-note small { color: var(--muted); }
.org-note-input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; font-family: inherit; }
.org-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.org-inline input[type=email] { flex: 1; min-width: 200px; }
.org-link-box { display: flex; gap: 8px; }
.org-link-box input { flex: 1; font-family: monospace; font-size: 12px; }
.org-fineprint { color: var(--muted); font-size: 12px; margin-top: 16px; }

/* ===== ALL UNIVERSITIES (basic listing) ===== */
.world-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.world-filters select, .world-filters input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.world-filters input { flex: 1; min-width: 220px; }
.world-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 18px 0 6px; }

/* Temporary, escaped text preview while server-side AI output is streaming. */
.ai-stream-preview { max-height: 12rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--muted); font: 12px/1.5 ui-monospace, Consolas, monospace; }
.ai-stream-preview[hidden] { display: none; }
.voice-privacy-note { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.voice-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.voice-consent input { margin-top: 3px; }
.account-danger-card { display: grid; gap: 16px; max-width: 760px; padding: 24px; border: 1px solid #efcaca; border-radius: 14px; background: var(--white); }
.account-export-card { display: grid; gap: 16px; max-width: 760px; margin-bottom: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.account-export-card h2 { margin-bottom: 8px; font-size: 18px; }
.account-export-card p { max-width: 680px; }
.account-export-error { color: var(--muted); }
.account-danger-card h2 { margin-bottom: 8px; color: var(--danger); font-size: 18px; }
.account-danger-card p { max-width: 680px; }
.danger-button { width: fit-content; padding: 10px 16px; border: 1px solid #c62828; border-radius: 8px; background: #fff; color: #b71c1c; font-weight: 600; cursor: pointer; }
.danger-button:hover:not(:disabled) { background: #fff0f0; }
.danger-button:disabled { opacity: .65; cursor: wait; }
.account-delete-error { color: #b71c1c; }
.payment-mode-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #e8c86a;
  border-radius: 8px;
  background: #fff8df;
  color: #624b0b;
  font-size: 13px;
}
.uni-card-deadlines-unverified { background: #fbf6e9; border-color: #efe2bd; color: #6b5a24; }
.uni-card-deadlines-unverified a { color: inherit; text-decoration: underline; }
