/* V8 Asszisztens – modal-overlay, modal-box, edit modálok */

[data-theme="dark"] .modal-box              { background: #242938; }

[data-theme="dark"] .modal-body             { background: #242938; color: var(--text); }

[data-theme="dark"] .modal-footer           { background: #1e2535; border-color: var(--border); }

[data-theme="dark"] .modal-body input,
[data-theme="dark"] .modal-body select,
[data-theme="dark"] .modal-body textarea    { background: #1a1f2e; border-color: var(--border); color: var(--text); }

[data-theme="dark"] .modal-body label       { color: var(--cancel); }

/* ── Sötét mód: Összes modal overlay és box egységesítve ── */
[data-theme="dark"] .modal-overlay           { background: rgba(0,0,0,0.75); }

[data-theme="dark"] .modal-box              { background: #242938; color: var(--text); }

[data-theme="dark"] .modal-footer           { background: #1e2535 !important; border-color: var(--border); }

[data-theme="dark"] .modal-body             { background: #242938; }

/* ── Sötét mód: Modal belső szekció panelek (#f8fafc, #fff5f5, white inline) ── */
[data-theme="dark"] .modal-body > div[style*="background: #f8fafc"],
[data-theme="dark"] .modal-body > div[style*="background:#f8fafc"] { background: #1e2535 !important; }

[data-theme="dark"] .modal-body > div[style*="background: #fff5f5"],
[data-theme="dark"] .modal-body > div[style*="background:#fff5f5"] { background: #2d1f1f !important; }

[data-theme="dark"] .modal-body > div[style*="background: #f0fff4"],
[data-theme="dark"] .modal-body > div[style*="background:#f0fff4"] { background: #1a2e24 !important; }

[data-theme="dark"] .modal-body > div[style*="background: #ebf8ff"],
[data-theme="dark"] .modal-body > div[style*="background:#ebf8ff"] { background: #1a2535 !important; }

[data-theme="dark"] #pb-print-modal .modal-body > div[style*="border-top"] { border-color: var(--border) !important; }

/* ── Sötét mód: Print modal belső ── */
[data-theme="dark"] #print-modal .modal-body > div { color: var(--text); }

/* ── Sötét mód: Custom confirm / alert modalok ── */
[data-theme="dark"] #custom-confirm .modal-box,
[data-theme="dark"] #custom-alert .modal-box  { background: #242938; }

[data-theme="dark"] #confirm-message,
[data-theme="dark"] #custom-alert-message     { color: var(--text); }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: center; z-index: 1000; }

.modal-box { background: var(--panel-bg); width: 450px; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; max-height: 95vh; }

.modal-header { padding: 15px 20px; background: var(--primary); color: white; display: flex; justify-content: space-between; align-items: center; }

.modal-header h3 { margin: 0; font-size: 1.1rem; }

.close-btn { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; }

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }

.modal-body label { display: block; font-size: 0.85rem; font-weight: bold; color: var(--cancel); margin-bottom: 4px; }

.modal-body input[type="text"], .modal-body select, .modal-body input[type="date"], .modal-body input[type="time"], .modal-body input[type="number"] { padding: 10px; border: 1px solid var(--border); border-radius: 5px; width: 100%; box-sizing: border-box;}

.modal-footer { padding: 15px 20px; border-top: 1px solid var(--border); background: #fafbfc; display: flex; gap: 10px; }

/* ── rec-preview dark mode ── */
[data-theme="dark"] #cal-export-modal .modal-box,
[data-theme="dark"] #cal-import-mode-modal .modal-box { background: var(--panel-bg); }

[data-theme="dark"] #copy-entry-modal .modal-box { background: var(--panel-bg); }

[data-theme="dark"] #cal-cat-resolve-modal .modal-box { background: var(--panel-bg); }

/* Modal */
#phonebook-modal .modal-box { width: 560px; }

/* ── Sötét mód: Admin felhasználó modal ── */
[data-theme="dark"] #admin-users-modal .modal-box { background: #242938; }

[data-theme="dark"] #admin-users-modal .modal-body { background: #242938; }

[data-theme="dark"] #admin-users-modal .modal-footer { background: #1e2535 !important; }

[data-theme="dark"] #admin-users-list > div { background: #1e2535; border-color: var(--border); }

[data-theme="dark"] #admin-users-modal input,
[data-theme="dark"] #admin-users-modal select { background: #1a1f2e !important; border-color: var(--border) !important; color: var(--text) !important; }

[data-theme="dark"] #admin-pwd-reset-modal .modal-box { background: #242938; }

[data-theme="dark"] #admin-pwd-reset-modal input { background: #1a1f2e !important; border-color: var(--border) !important; color: var(--text) !important; }

/* ── Sötét mód: Megosztott visszajelzős modal ── */
[data-theme="dark"] #shared-respond-modal .modal-box { background: #242938; }

[data-theme="dark"] #shared-respond-modal .modal-body { background: #242938; }

[data-theme="dark"] #shared-respond-modal .modal-footer { background: #1e2535 !important; }
