/* =========================================================================
   CYBER-MINT DESIGN SYSTEM & DIALOG ANONYMOUS MANAGEMENT © 2026
   ========================================================================= */

:root {
  --bg-cyber: #0b0f17;
  --bg-panel: rgba(20, 27, 41, 0.7);
  --bg-sidebar: #111827;
  --bg-overlay: rgba(5, 6, 8, 0.85);
  --border-neon: rgba(45, 212, 191, 0.2);
  --border-neon-focus: #2dd4bf;
  
  --mint: #2dd4bf;
  --rose: #f43f5e;
  --cyan: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-cyber); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; }

.glassmorphic { background: var(--bg-panel); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-neon); box-shadow: 0 0 25px rgba(0, 0, 0, 0.5); }

/* LOGIN */
.login-overlay { position: fixed; inset: 0; background-color: var(--bg-overlay); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.login-box { width: 100%; max-width: 380px; padding: 30px; border-radius: 12px; border: 1px solid var(--border-neon); position: relative; }
.login-header { text-align: center; margin-bottom: 25px; }
.logo-title { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 2.8rem; letter-spacing: -2px; color: white; line-height: 1; }
.logo-subtitle { font-size: 0.8rem; color: var(--mint); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; margin-top: 5px; }
.logo-glow { width: 80px; height: 80px; background: var(--mint); filter: blur(40px); position: absolute; top: -10px; left: 50%; transform: translateX(-50%); opacity: 0.15; }

.btn-logout { background: transparent; border: 1px solid rgba(244, 63, 94, 0.3); color: var(--rose); padding: 8px; border-radius: 6px; cursor: pointer; margin-top: 15px; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 8px; justify-content: center; width: 100%; }
.btn-logout:hover { background: var(--rose); color: white; }

.btn-distribution { background: linear-gradient(135deg, #eab308, #ca8a04); color: #0b0f17; font-weight: 700; box-shadow: 0 4px 15px rgba(234, 179, 8, 0.2); }
.btn-distribution:hover { background: linear-gradient(135deg, #facc15, #eab308); }

/* LAYOUT */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background-color: var(--bg-sidebar); border-right: 1px solid var(--border-neon); padding: 35px 20px; display: flex; flex-direction: column; position: fixed; height: 100vh; }
.brand { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; }
.brand-accent { color: var(--mint); text-shadow: 0 0 10px rgba(45, 212, 191, 0.4); }

.main-content { margin-left: 280px; flex-grow: 1; padding: 40px; }

/* TABLES */
.cyber-table-container { background: var(--bg-panel); border: 1px solid var(--border-neon); border-radius: 12px; overflow: hidden; margin-top: 20px; }
.cyber-table { width: 100%; border-collapse: collapse; text-align: left; }
.cyber-table th { padding: 16px; background: rgba(0,0,0,0.4); font-size: 0.75rem; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 0.5px; }
.cyber-table td { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.9rem; }

/* MODALS */
dialog.modal { background: transparent; border: none; width: 100vw; height: 100vh; max-width: 100%; max-height: 100%; display: none; align-items: center; justify-content: center; position: fixed; inset: 0; z-index: 3000; }
dialog[open] { display: flex !important; }
dialog::backdrop { background: rgba(5, 6, 8, 0.9); backdrop-filter: blur(10px); }

.modal-content { width: 100%; max-width: 500px; padding: 30px; border-radius: 12px; border: 1px solid var(--border-neon); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.btn-close { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; transition: 0.2s; font-size: 1.5rem; }
.btn-close:hover { background: rgba(255,255,255,0.05); color: white; transform: rotate(90deg); }

/* TOASTS */
.toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: #1e293b; border: 1px solid var(--mint); color: white; padding: 14px 28px; border-radius: 8px; transition: 0.3s ease; box-shadow: 0 0 20px rgba(0,0,0,0.5); font-size: 0.9rem; z-index: 9999; }
.toast.show { bottom: 40px; }

.tax-status-widget { display: flex; align-items: center; gap: 10px; margin-top: 20px; background: rgba(0,0,0,0.3); padding: 10px; border-radius: 8px; font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.05); }
.status-indicator-pulse { width: 8px; height: 8px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 8px var(--mint); }

.sidebar-nav { margin-top: 35px; flex-grow: 1; }
.sidebar-nav ul { list-style: none; }
.nav-link { display: flex; align-items: center; gap: 14px; padding: 14px; color: var(--text-secondary); border-radius: 8px; font-weight: 500; transition: 0.2s; text-decoration: none; }
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.nav-link.active { background: linear-gradient(90deg, rgba(45,212,191,0.2), transparent); border-left: 3px solid var(--mint); color: var(--text-primary); }

.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 35px; }
.system-time-badge { background: rgba(0,0,0,0.4); border: 1px solid var(--border-neon); padding: 8px 16px; border-radius: 6px; font-size: 0.85rem; color: var(--mint); }

/* COMPANY BADGE (NEU) */
.company-badge { display: flex; align-items: center; gap: 8px; background: rgba(45, 212, 191, 0.1); border: 1px solid var(--mint); color: var(--mint); padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; font-weight: 600; box-shadow: 0 0 10px rgba(45,212,191,0.1); }

/* HELP MODAL FORMATIERUNG (NEU) */
.help-content { line-height: 1.6; color: var(--text-primary); font-size: 0.95rem; }
.help-content h3 { color: var(--cyan); margin-top: 25px; margin-bottom: 12px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.help-content ul { padding-left: 20px; margin-bottom: 15px; }
.help-content li { margin-bottom: 8px; color: var(--text-secondary); }
.help-content li strong { color: var(--text-primary); }
.help-content p { margin-bottom: 15px; color: var(--text-secondary); }
.help-contact { margin-top: 30px; padding: 18px; background: rgba(0,0,0,0.4); border-left: 4px solid var(--mint); border-radius: 4px; font-style: italic; color: var(--text-primary); }

/* FINANZ KARTEN */
.financial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.fin-card { position: relative; border-radius: 12px; background: #161e2e; padding: 25px; border: 1px solid rgba(255,255,255,0.05); overflow: hidden; }
.card-glow { position: absolute; width: 60px; height: 60px; border-radius: 50%; filter: blur(30px); opacity: 0.2; top: -10px; right: -10px; }
.card-inner { display: flex; flex-direction: column; gap: 12px; }
.card-label { font-size: 0.78rem; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 1px; font-weight: 500; }
.card-value { font-family: 'Outfit', sans-serif; font-size: 1.85rem; font-weight: 700; line-height: 1.1; }
.card-rev .card-value { color: var(--mint); }
.card-exp .card-value { color: var(--rose); }
.card-profit .card-value { color: var(--cyan); }
.card-tax .card-value { color: #eab308; }

/* FORMS & WORKSPACE */
.workspace-split { display: flex; gap: 30px; margin-top: 30px; }
.form-container-main { flex: 3; background: var(--bg-panel); border: 1px solid var(--border-neon); border-radius: 12px; padding: 30px; }
.form-header-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab-link { padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; border: 1px solid var(--text-secondary); background: transparent; color: var(--text-secondary); }
.tab-link.active { border-color: var(--mint); background: rgba(45,212,191,0.1); color: var(--mint); }

.form-row { display: flex; gap: 20px; margin-bottom: 15px; }
.form-group { display: flex; flex-direction: column; flex: 1; }
.form-group label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }

input, select { padding: 12px; background-color: #0f172a; border: 1px solid rgba(255,255,255,0.08); color: white; border-radius: 8px; outline: none; transition: 0.2s; }
input:focus, select:focus { border-color: var(--border-neon-focus); box-shadow: 0 0 10px rgba(45,212,191,0.2); }

.btn { padding: 12px 24px; border-radius: 8px; border: none; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.btn-submit-in { background: var(--mint); color: #0b0f17; width: 100%; justify-content: center; }
.btn-submit-out { background: var(--rose); color: white; width: 100%; justify-content: center; }
.btn-primary { background: var(--cyan); color: #0b0f17; width: 100%; justify-content: center; }
.btn-outline { background: transparent; border: 1px solid var(--text-secondary); color: var(--text-secondary); width: 100%; justify-content: center; }

.table-badge { background: rgba(45,212,191,0.1); color: var(--mint); padding: 4px 10px; border-radius: 9999px; font-size: 0.75rem; }

/* RADAR PANEL */
.explanation-radar-panel { flex: 1; background: var(--bg-panel); border: 1px solid var(--border-neon); border-radius: 12px; padding: 20px; height: fit-content; }
.radar-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.radar-icon { color: var(--cyan); }

/* EÜR PANEL */
.euer-card-box { background: var(--bg-panel); border: 1px solid var(--border-neon); border-radius: 12px; padding: 30px; }
.euer-header-area { margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; }
.ledger-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 15px; background: rgba(0,0,0,0.3); border-radius: 8px; }
.ledger-info { display: flex; flex-direction: column; }
.ledger-info small { color: var(--text-secondary); font-size: 0.8rem; margin-top: 5px; }
.ledger-total { border: 1px solid var(--cyan); background: rgba(56, 189, 248, 0.05); }

/* TEXT COLORS */
.txt-mint { color: var(--mint); }
.txt-rose { color: var(--rose); }
.txt-cyan { color: var(--cyan); }
.text-yellow { color: #eab308; }
.readonly-glow { background: rgba(45,212,191,0.05) !important; border-color: var(--mint) !important; color: var(--mint) !important; font-weight: 700; }
.readonly-glow-red { background: rgba(244,63,94,0.05) !important; border-color: var(--rose) !important; color: var(--rose) !important; font-weight: 700; }

.view-section { display: none; }
.view-section.active { display: block; }
.grid-form { display: none; }
.grid-form.active { display: block; }
