/* Scoped styles to prevent bleeding into the master dashboard */
.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: #3b82f6; }
.fac-page-subtitle { font-size: 14px; color: #64748b; }

/* Layout */
.fac-split-layout { display: flex; gap: 24px; flex-wrap: wrap; align-items: stretch; }
.fac-panel { background: #fff; border-radius: 12px; padding: 30px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); }
.fac-panel-left { flex: 1; min-width: 380px; display: flex; flex-direction: column; }
.fac-panel-right { flex: 2; min-width: 480px; }

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

/* Dual Logo Engine */
.fac-dual-logo-wrapper { display: flex; gap: 15px; justify-content: center; align-items: stretch; margin-bottom: 20px; transition: 0.3s ease; }
.fac-logo-container { flex: 1; display: flex; flex-direction: column; align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; text-align: center;}
.fac-logo-preview { width: 120px; height: 120px; border-radius: 12px; border: 2px dashed #cbd5e1; background: #ffffff; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; overflow: hidden; position: relative; transition: 0.3s; }
.fac-logo-preview:hover { border-color: #3b82f6; background: #eff6ff; }
.fac-logo-placeholder { color: #94a3b8; font-size: 35px; transition: 0.3s; }
.fac-logo-preview:hover .fac-logo-placeholder { color: #3b82f6; transform: scale(1.1); }

.fac-upload-btn { background: #ffffff; border: 1px solid #cbd5e1; color: #334155; padding: 8px 12px; border-radius: 8px; font-size: 11px; font-weight: 600; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.05);}
.fac-upload-btn:hover { background: #f8fafc; border-color: #94a3b8; color: #0f172a; }
.fac-file-input { display: none; }

/* Switch Toggle UI */
.fac-toggle-container { display: flex; align-items: center; justify-content: space-between; background: #fffbeb; border: 1px solid #fde68a; padding: 16px; border-radius: 8px; margin-bottom: 20px; }
.fac-toggle-text { font-size: 13px; font-weight: 700; color: #92400e; }
.fac-toggle-desc { font-size: 11px; color: #b45309; display: block; margin-top: 4px; line-height: 1.4;}
.fac-slim-toggle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fac-slim-toggle label { margin-bottom: 0 !important; }
.switch-sm { transform: scale(0.8); transform-origin: right center; margin: 0; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; 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: #fcd34d; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #d97706; }
input:checked + .slider:before { transform: translateX(20px); }

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

.fac-input { padding: 12px 16px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 13px; outline: none; width: 100%; background: #f8fafc; color: #1e293b; transition: 0.2s; font-weight: 500;}
.fac-input:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 3px #eff6ff; }
.fac-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* Alignment Engine UI */
.alignment-group { display: flex; gap: 6px; background: #f8fafc; padding: 6px; border: 1px solid #cbd5e1; border-radius: 8px; }
.align-btn { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 6px; cursor: pointer; color: #64748b; font-size: 13px; font-weight: 600; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.align-btn:hover { background: #e2e8f0; color: #1e293b; }
.align-btn.active { background: #ffffff; color: #3b82f6; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #bfdbfe;}

/* Color Pickers */
.color-picker-wrap { display: flex; align-items: center; gap: 10px; background: #f8fafc; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; }
.color-picker { -webkit-appearance: none; border: none; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; padding: 0; }
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: 1px solid #cbd5e1; border-radius: 4px; }
.color-hex { font-size: 13px; font-weight: 600; color: #475569; text-transform: uppercase; }

.fac-btn-primary { background: #3b82f6; color: #fff; border: none; padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.fac-btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.2); }

/* Notice Box */
.fac-notice { background: #f0fdf4; border: 1px solid #bbf7d0; padding: 16px 20px; border-radius: 8px; margin-bottom: 24px; font-size: 13px; color: #166534; line-height: 1.6; display: flex; gap: 12px; align-items: flex-start;}
.fac-notice i { font-size: 18px; color: #15803d; margin-top: 2px;}
.fac-notice strong { color: #14532d; display: block; font-size: 14px; margin-bottom: 4px;}

/* ID Card Preview Engine */
.id-preview-wrapper { background: #f1f5f9; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 10px;}
.id-card { width: 320px; height: 200px; background: #ffffff; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); position: relative; overflow: hidden; border: 1px solid #e2e8f0; font-family: 'Inter', sans-serif;}
.id-card-header { height: 45px; background: #1e3a8a; display: flex; align-items: center; padding: 0 15px; color: white; gap: 10px;}
.id-card-header i { font-size: 18px; }
.id-card-header span { font-size: 13px; font-weight: 700; letter-spacing: 0.5px;}
.id-card-body { padding: 15px; display: flex; gap: 15px; align-items: flex-start;}
.id-card-photo { width: 65px; height: 75px; background: #e2e8f0; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 24px;}
.id-card-details { flex: 1; }
.id-card-name { font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 4px;}
.id-card-no { font-size: 13px; font-weight: 700; color: #3b82f6; font-family: monospace; letter-spacing: 1px; margin-bottom: 8px;}
.id-card-meta { font-size: 10px; color: #64748b; margin-bottom: 2px;}
.id-card-code { position: absolute; bottom: 15px; right: 15px; width: 50px; height: 50px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #1e293b;}

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