/* ==========================================================================
   Personal Loan Calculator Styles - Exact Clone of Reference Images 1 & 2
   Clean, Modern, Responsive & Multilingual Layout
   ========================================================================== */

:root {
  --plc-blue: #084d8d;
  --plc-link-blue: #0844a4;
  --plc-header-blue: #245d8c;
  --plc-green: #4c8b2c;
  --plc-green-hover: #3f7524;
  --plc-border: #cbd5e1;
  --plc-form-bg: #eef2f6;
  --plc-text: #333333;
  --plc-gray-btn: #88929b;
  --plc-gray-btn-hover: #737c84;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--plc-text);
  background-color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
}

.plc-page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 16px 48px;
  box-sizing: border-box;
}

/* ==========================================================================
   Top Utility Bar & Breadcrumbs (Matching Image 2)
   ========================================================================== */
.plc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.plc-breadcrumbs {
  color: var(--plc-link-blue);
  font-size: 12px;
}

.plc-breadcrumbs a {
  color: var(--plc-link-blue);
  text-decoration: none;
}

.plc-breadcrumbs a:hover {
  text-decoration: underline;
}

.plc-breadcrumbs .sep {
  color: #777777;
  margin: 0 4px;
}

.plc-breadcrumbs .current {
  color: #333333;
}

.plc-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plc-print-link {
  color: var(--plc-link-blue);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-family: inherit;
  font-weight: normal;
}

.plc-print-link:hover {
  color: #002b66;
}

.plc-instant-btn,
.plc-saved-badge-btn {
  background: #f4f7fa;
  border: 1px solid #b8cad9;
  color: #084d8d;
  font-size: 11.5px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.plc-instant-btn:hover,
.plc-saved-badge-btn:hover {
  background: #e4ecf3;
  border-color: #084d8d;
}

/* Top Search Bar (Core Requirement 2) */
.plc-top-search-wrap {
  margin-bottom: 12px;
  position: relative;
}

.plc-top-search-box {
  display: flex;
  align-items: center;
  position: relative;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.plc-top-search-icon {
  margin-left: 10px;
  color: #64748b;
  flex-shrink: 0;
}

.plc-top-search-input {
  flex: 1;
  border: none;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  background: transparent;
  color: #1e293b;
  font-family: inherit;
}

.plc-top-search-btn {
  background-color: var(--plc-header-blue);
  color: #ffffff;
  border: none;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.plc-top-search-btn:hover {
  background-color: #1b4b72;
}

/* ==========================================================================
   Page Heading (Matching Image 2)
   ========================================================================== */
.plc-page-title {
  color: var(--plc-blue);
  font-size: 24px;
  font-weight: bold;
  margin: 4px 0 14px 0;
  letter-spacing: -0.2px;
}

.plc-page-intro {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 980px;
}

/* ==========================================================================
   Main Layout: Content Left, Sidebar Right
   ========================================================================== */
.plc-main-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.plc-content-area {
  flex: 1;
  min-width: 0;
}

.plc-sidebar-area {
  width: 250px;
  flex-shrink: 0;
}

/* ==========================================================================
   Calculator Two-Column Panel (Form Left, Results Right - Matching Image 2)
   ========================================================================== */
.plc-calc-panel {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  align-items: stretch;
}

/* Form Box (Left) */
.plc-form-box {
  width: 285px;
  flex-shrink: 0;
  background-color: var(--plc-form-bg);
  border: 1px solid #b8cad9;
  padding: 12px 14px;
  box-sizing: border-box;
  font-size: 12.5px;
}

.plc-form-table {
  width: 100%;
  border-collapse: collapse;
}

.plc-form-table td {
  padding: 5px 2px;
  vertical-align: middle;
}

.plc-form-table .lbl-col {
  width: 92px;
  color: #222222;
  font-weight: normal;
}

.plc-form-table .inp-col {
  text-align: left;
}

.plc-input-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.plc-input-text {
  padding: 3px 5px;
  border: 1px solid #7a92a5;
  border-radius: 1px;
  font-size: 12.5px;
  background-color: #ffffff;
  color: #111111;
  box-sizing: border-box;
  font-family: inherit;
}

.plc-input-text:focus {
  outline: 1px solid #245d8c;
  border-color: #245d8c;
}

.plc-input-amount {
  width: 110px;
  text-align: left;
}

.plc-input-rate {
  width: 60px;
  text-align: left;
}

.plc-term-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.plc-input-term {
  width: 38px;
  text-align: center;
}

.plc-term-label {
  font-size: 11.5px;
  color: #444444;
  margin-right: 4px;
}

.plc-date-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.plc-select-month {
  padding: 2px 4px;
  font-size: 12px;
  border: 1px solid #7a92a5;
  background: #ffffff;
  border-radius: 1px;
  color: #111111;
  font-family: inherit;
}

.plc-input-year {
  width: 48px;
  padding: 2px 4px;
  font-size: 12px;
  border: 1px solid #7a92a5;
  background: #ffffff;
  border-radius: 1px;
  text-align: center;
  color: #111111;
  font-family: inherit;
}

/* Checkbox Row */
.plc-checkbox-row {
  margin-top: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #111111;
  cursor: pointer;
  user-select: none;
}

.plc-checkbox-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--plc-green);
}

/* Expanded Fee & Insurance Options */
.plc-fee-panel {
  background: #e5edf5;
  border: 1px dashed #9cb6cb;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
  border-radius: 2px;
  display: none;
}

.plc-fee-panel.open {
  display: block;
}

.plc-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.plc-fee-row:last-child {
  margin-bottom: 0;
}

.plc-fee-input {
  width: 70px;
  padding: 2px 4px;
  font-size: 11.5px;
  border: 1px solid #7a92a5;
  text-align: right;
  background: #ffffff;
}

/* Form Action Buttons (Matching Image 2) */
.plc-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-left: 20px;
}

.plc-btn-calc {
  background-color: var(--plc-green);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: bold;
  border: 1px solid #3d7322;
  border-radius: 3px;
  padding: 4px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.plc-btn-calc:hover {
  background-color: var(--plc-green-hover);
}

.plc-calc-play-icon {
  width: 14px;
  height: 14px;
  fill: #ffffff;
  background: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.plc-calc-play-icon svg {
  fill: var(--plc-green);
  width: 8px;
  height: 8px;
  margin-left: 1px;
}

.plc-btn-clear {
  background-color: var(--plc-gray-btn);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: bold;
  border: 1px solid #737c84;
  border-radius: 3px;
  padding: 4px 14px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.plc-btn-clear:hover {
  background-color: var(--plc-gray-btn-hover);
}

/* ==========================================================================
   Results Box (Right - Matching Image 2)
   ========================================================================== */
.plc-result-box {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid #b8cad9;
  display: flex;
  flex-direction: column;
}

.plc-result-header {
  background-color: var(--plc-green);
  color: #ffffff;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plc-res-monthly-title {
  font-size: 15px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plc-res-monthly-val {
  font-size: 16px;
  font-weight: bold;
}

.plc-btn-save {
  background: transparent;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: inherit;
  padding: 2px 5px;
  border-radius: 2px;
  transition: background-color 0.15s ease;
}

.plc-btn-save:hover {
  background: rgba(255, 255, 255, 0.2);
}

.plc-save-icon {
  width: 14px;
  height: 14px;
  fill: #ffffff;
}

.plc-result-body {
  padding: 12px 14px;
}

.plc-result-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.plc-result-table td {
  padding: 3px 2px;
  font-size: 12.5px;
}

.plc-result-table .res-lbl {
  color: #222222;
  text-align: left;
  width: 60%;
}

.plc-result-table .res-val {
  color: #111111;
  font-weight: bold;
  text-align: right;
  width: 40%;
}

/* Donut Chart & Legend Matching Image 2 */
.plc-chart-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 4px 0 0 10px;
}

.plc-donut-svg {
  width: 115px;
  height: 115px;
  flex-shrink: 0;
}

.plc-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.plc-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #333333;
}

.plc-legend-color {
  width: 12px;
  height: 12px;
  display: inline-block;
  flex-shrink: 0;
  border-radius: 1px;
}

/* ==========================================================================
   Amortization Schedule Section (Matching Image 2)
   ========================================================================== */
.plc-amort-section {
  margin-top: 10px;
  margin-bottom: 30px;
}

.plc-amort-header-title {
  color: var(--plc-blue);
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 8px 0;
}

.plc-amort-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
}

.plc-amort-tab {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--plc-link-blue);
  text-decoration: underline;
}

.plc-amort-tab.active {
  color: #111111;
  font-weight: bold;
  text-decoration: none;
  cursor: default;
}

.plc-amort-grid {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.plc-amort-table-col {
  flex: 1;
  min-width: 0;
}

.plc-amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: 1px solid #b8cad9;
}

.plc-amort-table th {
  background-color: var(--plc-header-blue);
  color: #ffffff;
  padding: 6px 6px;
  font-weight: bold;
  text-align: right;
  border: 1px solid #1c4b72;
}

.plc-amort-table th:first-child,
.plc-amort-table th:nth-child(2) {
  text-align: center;
}

.plc-amort-table td {
  padding: 5px 6px;
  border: 1px solid #d5e0ea;
  text-align: right;
  color: #111111;
}

.plc-amort-table td:first-child,
.plc-amort-table td:nth-child(2) {
  text-align: center;
}

.plc-amort-table tr:nth-child(even) {
  background-color: #f7fafc;
}

.plc-amort-table tr:hover {
  background-color: #edf4fa;
}

/* Amortization Line Chart (Right of Table in Image 2) */
.plc-amort-chart-col {
  width: 250px;
  flex-shrink: 0;
  border: 1px solid #b8cad9;
  background: #ffffff;
  padding: 8px 8px 10px;
  box-sizing: border-box;
}

.plc-line-chart-svg {
  width: 100%;
  height: 200px;
  display: block;
}

/* ==========================================================================
   Fraction Arithmetic & Debt Share Calculator (Core Requirements 1 & 5)
   ========================================================================== */
.plc-fraction-section {
  border: 1px solid #b8cad9;
  background: #ffffff;
  margin-top: 24px;
  margin-bottom: 30px;
}

.plc-fraction-header {
  background-color: var(--plc-header-blue);
  color: #ffffff;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: bold;
}

.plc-fraction-body {
  padding: 16px 18px;
}

.plc-fraction-desc {
  font-size: 12.5px;
  color: #475569;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.plc-fraction-calc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.plc-fraction-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plc-fraction-label {
  font-size: 12px;
  font-weight: bold;
  color: #333333;
}

.plc-fraction-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.plc-fraction-stack input[type="number"] {
  width: 54px;
  padding: 3px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid #7a92a5;
  border-radius: 2px;
}

.plc-fraction-divider {
  width: 46px;
  height: 2px;
  background-color: #222222;
}

.plc-fraction-op-select {
  padding: 6px 10px;
  font-size: 15px;
  font-weight: bold;
  border: 1px solid #7a92a5;
  border-radius: 3px;
  background: #ffffff;
  cursor: pointer;
}

.plc-fraction-btn-calc {
  background-color: var(--plc-green);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: bold;
  border: 1px solid #3d7322;
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.plc-fraction-btn-calc:hover {
  background-color: var(--plc-green-hover);
}

.plc-fraction-btn-reset {
  background-color: var(--plc-gray-btn);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: bold;
  border: 1px solid #737c84;
  border-radius: 3px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.plc-fraction-btn-reset:hover {
  background-color: var(--plc-gray-btn-hover);
}

/* Fraction Arithmetic Output */
.plc-fraction-result-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.plc-fraction-res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.plc-frac-res-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 8px 10px;
  text-align: center;
}

.plc-frac-res-lbl {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.plc-frac-res-val {
  font-size: 16px;
  font-weight: bold;
  color: #084d8d;
}

.plc-fraction-steps {
  font-size: 12px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 10px 12px;
  line-height: 1.6;
}

/* Visualizations for Fractions (Core Requirement 5) */
.plc-fraction-visuals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.plc-visual-box {
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #ffffff;
  padding: 10px 12px;
}

.plc-visual-title {
  font-size: 12px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plc-frac-pie-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
}

.plc-frac-pie-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.plc-frac-pie-svg {
  width: 64px;
  height: 64px;
}

.plc-frac-bar-svg {
  width: 100%;
  height: 60px;
}

.plc-frac-numline-svg {
  width: 100%;
  height: 70px;
}

/* Co-Borrower Loan Split Card */
.plc-co-borrower-box {
  margin-top: 14px;
  background: #eef5fc;
  border: 1px solid #b8cad9;
  border-radius: 3px;
  padding: 12px 14px;
}

.plc-co-borrower-title {
  font-size: 12.5px;
  font-weight: bold;
  color: #084d8d;
  margin-bottom: 6px;
}

.plc-co-borrower-text {
  font-size: 12px;
  color: #334155;
  margin-bottom: 8px;
}

.plc-co-borrower-shares {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.plc-co-share-badge {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  padding: 6px 10px;
  font-size: 12px;
}

/* ==========================================================================
   Sidebar: Search Box & Financial Calculators (Matching Image 2)
   ========================================================================== */
.plc-sidebar-search {
  display: flex;
  margin-bottom: 16px;
  position: relative;
}

.plc-sidebar-input {
  flex: 1;
  border: 1px solid #7a92a5;
  padding: 4px 6px;
  font-size: 12.5px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.plc-sidebar-input:focus {
  border-color: #245d8c;
  outline: 1px solid #245d8c;
}

.plc-sidebar-btn {
  background-color: var(--plc-header-blue);
  color: #ffffff;
  border: 1px solid #1d4d73;
  padding: 4px 14px;
  font-size: 12.5px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.plc-sidebar-btn:hover {
  background-color: #1b4b72;
}

/* Search Dropdown (Works for top and sidebar across all 8 languages) */
.plc-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
}

.plc-search-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #1e293b;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.plc-search-dropdown-item:last-child {
  border-bottom: none;
}

.plc-search-dropdown-item:hover,
.plc-search-dropdown-item.active {
  background-color: #eef6fc;
}

.plc-search-item-cat {
  font-size: 10.5px;
  background-color: #e2e8f0;
  color: #475569;
  padding: 2px 6px;
  border-radius: 2px;
  margin-left: 8px;
}

.plc-search-item-feature {
  background: #fdfaf3;
}

.plc-search-item-badge-feature {
  font-size: 10.5px;
  background-color: #fef08a;
  color: #854d0e;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: bold;
}

/* Highlight Animation when jumping to a feature via search */
.plc-feature-highlight {
  animation: plcHighlightPulse 2s ease;
}

@keyframes plcHighlightPulse {
  0% { outline: 3px solid #245d8c; }
  50% { outline: 3px solid #7ac143; }
  100% { outline: none; }
}

/* Financial Calculators Widget Box (Matching Image 2) */
.plc-fin-widget {
  border: 1px solid #245d8c;
  background: #ffffff;
  font-size: 12px;
}

.plc-fin-header {
  background-color: var(--plc-header-blue);
  color: #ffffff;
  padding: 6px 10px;
  font-weight: bold;
  font-size: 13px;
}

.plc-fin-body {
  padding: 8px 10px;
}

.plc-fin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 12px;
  margin-bottom: 8px;
}

.plc-fin-grid a {
  color: var(--plc-link-blue);
  text-decoration: underline;
  padding: 1px 0;
  white-space: nowrap;
}

.plc-fin-grid a:hover {
  color: #002266;
}

.plc-fin-more-link {
  display: block;
  color: var(--plc-link-blue);
  text-decoration: underline;
  margin-top: 6px;
  margin-bottom: 8px;
}

.plc-fin-footer {
  background-color: #d8e6f1;
  border-top: 1px solid #b8cad9;
  padding: 5px 8px;
  font-size: 11px;
  color: #333333;
  text-align: center;
}

.plc-fin-footer a {
  color: var(--plc-link-blue);
  text-decoration: underline;
  margin: 0 3px;
}

/* ==========================================================================
   SEO, AEO, GEO Educational Content & FAQ Section
   ========================================================================== */
.plc-content-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.plc-article h2 {
  color: var(--plc-blue);
  font-size: 18px;
  font-weight: bold;
  margin: 20px 0 10px 0;
}

.plc-article h3 {
  color: #1e293b;
  font-size: 15px;
  font-weight: bold;
  margin: 16px 0 8px 0;
}

.plc-article p {
  font-size: 13px;
  line-height: 1.65;
  color: #334155;
  margin: 0 0 14px 0;
}

.plc-article ul,
.plc-article ol {
  font-size: 13px;
  line-height: 1.65;
  color: #334155;
  padding-left: 20px;
  margin: 0 0 14px 0;
}

.plc-article li {
  margin-bottom: 6px;
}

.plc-faq-section {
  margin-top: 24px;
}

.plc-faq-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
}

.plc-faq-q {
  font-size: 14px;
  font-weight: bold;
  color: #084d8d;
  margin-bottom: 6px;
}

.plc-faq-a {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}

/* ==========================================================================
   Modals (Instant Modal - Image 1, Saved History, Print Sheet)
   ========================================================================== */
.plc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.plc-modal-overlay.open {
  display: flex;
}

.plc-modal-card,
.plc-modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Modal Matching Image 1 Exactly */
.plc-instant-modal-card {
  max-width: 460px;
}

.plc-modal-header {
  background-color: var(--plc-header-blue);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
}

.plc-modal-close,
.plc-modal-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  font-weight: bold;
  line-height: 1;
}

.plc-modal-body {
  padding: 16px 20px 20px;
}

.plc-modal-subtitle {
  font-size: 12.5px;
  color: #555555;
  margin-bottom: 16px;
}

.plc-modal-form-group {
  margin-bottom: 14px;
}

.plc-modal-form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: bold;
  color: #333333;
  margin-bottom: 4px;
}

.plc-modal-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #7a92a5;
  border-radius: 2px;
  box-sizing: border-box;
  font-family: inherit;
}

.plc-modal-input:focus {
  border-color: #245d8c;
  outline: 1px solid #245d8c;
}

.plc-modal-btn {
  background-color: #205684;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 3px;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
  transition: background-color 0.15s ease;
  margin-top: 6px;
}

.plc-modal-btn:hover {
  background-color: #174266;
}

.plc-modal-result-box {
  margin-top: 14px;
  background: #f1f6fb;
  border: 1px solid #b8cad9;
  border-radius: 2px;
  padding: 10px 12px;
  display: none;
}

/* Print Modal & History Modal */
.plc-print-card {
  max-width: 780px;
}

.plc-history-card {
  max-width: 680px;
}

.plc-print-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.plc-btn-print-action {
  background-color: var(--plc-header-blue);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: bold;
  border-radius: 3px;
  cursor: pointer;
}

.plc-btn-print-secondary {
  background: #ffffff;
  border: 1px solid #94a3b8;
  color: #334155;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
}

.plc-print-sheet {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px 20px;
  background: #ffffff;
  font-size: 12px;
}

/* History Table */
.plc-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.plc-history-table th {
  background: #f1f5f9;
  padding: 6px 8px;
  border-bottom: 1px solid #cbd5e1;
  text-align: left;
}

.plc-history-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.plc-btn-sm {
  background: #ffffff;
  border: 1px solid #94a3b8;
  padding: 3px 8px;
  font-size: 11.5px;
  border-radius: 2px;
  cursor: pointer;
}

.plc-btn-sm:hover {
  background: #f1f5f9;
}

/* Toast */
.plc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 12.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: none;
  animation: plcToastFade 0.25s ease;
}

@keyframes plcToastFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RTL Layout Rules for Arabic (Core Requirement 8)
   ========================================================================== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .plc-breadcrumbs {
  text-align: right;
}

[dir="rtl"] .plc-top-search-icon {
  margin-left: 0;
  margin-right: 10px;
}

[dir="rtl"] .plc-top-search-btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

[dir="rtl"] .plc-form-actions {
  padding-left: 0;
  padding-right: 20px;
}

[dir="rtl"] .plc-result-table .res-lbl {
  text-align: right;
}

[dir="rtl"] .plc-result-table .res-val {
  text-align: left;
}

[dir="rtl"] .plc-amort-table th,
[dir="rtl"] .plc-amort-table td {
  text-align: left;
}

[dir="rtl"] .plc-amort-table th:first-child,
[dir="rtl"] .plc-amort-table th:nth-child(2),
[dir="rtl"] .plc-amort-table td:first-child,
[dir="rtl"] .plc-amort-table td:nth-child(2) {
  text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
  .plc-main-layout {
    flex-direction: column;
  }
  .plc-sidebar-area {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .plc-calc-panel {
    flex-direction: column;
  }
  .plc-form-box {
    width: 100%;
  }
  .plc-amort-grid {
    flex-direction: column;
  }
  .plc-amort-chart-col {
    width: 100%;
  }
}

/* ==========================================================================
   Print Stylesheet (Modal Statement & Full Calculator Document)
   ========================================================================== */
@media print {
  /* Hide interactive, non-content elements */
  .site-header,
  .site-footer,
  .plc-top-bar,
  .plc-sidebar-area,
  .plc-toast,
  .plc-print-toolbar,
  .plc-modal-header,
  .plc-modal-close,
  .plc-modal-close-btn,
  #plc-instant-modal,
  #plc-history-modal {
    display: none !important;
  }

  /* When printing from the Statement Modal */
  body.plc-printing-modal * {
    visibility: hidden;
  }

  body.plc-printing-modal #plc-print-modal,
  body.plc-printing-modal #plc-print-modal .plc-modal-dialog,
  body.plc-printing-modal #plc-print-modal .plc-modal-card,
  body.plc-printing-modal #plc-print-modal .plc-modal-body,
  body.plc-printing-modal #plc-print-sheet,
  body.plc-printing-modal #plc-print-sheet * {
    visibility: visible !important;
  }

  body.plc-printing-modal #plc-print-modal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  body.plc-printing-modal .plc-modal-dialog,
  body.plc-printing-modal .plc-modal-card {
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body.plc-printing-modal .plc-modal-body {
    padding: 0 !important;
  }

  body.plc-printing-modal #plc-print-sheet {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    font-family: Arial, sans-serif !important;
    color: #000000 !important;
  }

  body.plc-printing-modal #plc-print-modal-done,
  body.plc-printing-modal [data-i18n="print_tip"] {
    display: none !important;
  }

  /* When printing page directly (not in modal print mode) */
  body:not(.plc-printing-modal) {
    background: #ffffff !important;
    color: #000000 !important;
  }

  body:not(.plc-printing-modal) .plc-main-layout {
    display: block !important;
    width: 100% !important;
  }

  body:not(.plc-printing-modal) .plc-content-area {
    width: 100% !important;
    max-width: 100% !important;
  }

  body:not(.plc-printing-modal) .plc-calculator-container {
    box-shadow: none !important;
    border: 1px solid #cccccc !important;
  }

  body:not(.plc-printing-modal) .plc-modal-overlay {
    display: none !important;
  }
}
