/* Scoped styles to prevent dashboard bleed */
.fac-module { width: 100%; animation: fadeIn 0.3s ease-in-out; }

.fac-header-area { margin-bottom: 24px; border-bottom: 1px solid #e2e8f0; padding-bottom: 16px; }
.fac-page-title { font-size: 22px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fac-page-title i { color: #10b981; } /* Emerald green for NHIS */
.fac-page-subtitle { font-size: 14px; color: #64748b; }

.fac-split-layout { display: flex; gap: 24px; flex-wrap: wrap; align-items: stretch; margin-bottom: 24px; }
.fac-panel { background: #fff; border-radius: 12px; padding: 24px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); }
.fac-panel-left { flex: 1.5; min-width: 350px; }
.fac-panel-right { flex: 1; min-width: 300px; background: #f8fafc; border-style: dashed; }

.fac-panel-title { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #e2e8f0; display:flex; align-items:center; gap:8px;}

/* Forms */
.fac-form-row { display: flex; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.fac-form-col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.fac-form-col label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }

.fac-input { padding: 12px 14px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 14px; outline: none; width: 100%; background: #ffffff; color: #1e293b; transition: 0.2s;}
.fac-input:focus { border-color: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.fac-input:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; }

.fac-btn-primary { background: #10b981; color: #fff; border: none; padding: 14px 24px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px;}
.fac-btn-primary:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2); }

.fac-btn-outline { background: #ffffff; color: #065f46; border: 1px solid #10b981; padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; transition: 0.2s; display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none;}
.fac-btn-outline:hover { background: #ecfdf5; box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1); }

/* Switch Toggle UI */
.api-toggle-container { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #e2e8f0; padding: 16px; border-radius: 8px; margin-bottom: 16px; }
.api-toggle-text { font-size: 14px; font-weight: 600; color: #1e293b; }
.api-toggle-desc { font-size: 12px; color: #64748b; display: block; margin-top: 4px; }

.switch { position: relative; display: inline-block; width: 50px; height: 26px; flex-shrink: 0;}
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(24px); }

/* Info Box */
.info-box { background: #d1fae5; border: 1px solid #a7f3d0; padding: 16px; border-radius: 8px; margin-bottom: 20px; font-size: 13px; color: #065f46; line-height: 1.5; }
.info-box strong { color: #047857; }

/* Dictionary Quick Cards */
.dict-nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 24px; }
.dict-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; display: flex; align-items: center; gap: 16px; cursor: pointer; transition: 0.2s; text-decoration: none;}
.dict-card:hover { border-color: #10b981; background: #fff; box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1); transform: translateY(-2px);}
.dict-icon { width: 45px; height: 45px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;}
.dict-text h4 { color: #1e293b; font-size: 14px; margin-bottom: 4px; font-weight: 700;}
.dict-text p { color: #64748b; font-size: 11px; margin: 0; line-height: 1.4;}

/* Preview Table */
.preview-table-container { overflow-x: auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; }
.preview-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.preview-table th { padding: 12px 16px; color: #64748b; background: #f8fafc; border-bottom: 1px solid #e2e8f0; text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;}
.preview-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #334155; }
.preview-table tr:hover td { background: #f8fafc; }
.preview-badge { padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; text-transform: uppercase;}
.price-tag { font-weight: 700; color: #047857; font-family: monospace; font-size: 14px;}