/*! Server Panel Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-input: #0f0f1a;
  --text-primary: #e0e0e0;
  --text-secondary: #8892a4;
  --text-muted: #5a6577;
  --accent: #4361ee;
  --accent-hover: #3a56d4;
  --accent-glow: rgba(67, 97, 238, 0.3);
  --danger: #e63946;
  --danger-hover: #c5303c;
  --success: #2ec4b6;
  --warning: #ffd166;
  --info: #4895ef;
  --border: #2a2a4a;
  --sidebar-width: 260px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: all 0.2s ease;
}

html { font-size: 15px; line-height: 1.5; }
body { font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; }
hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ============ LOADING SCREEN ============ */
.loading-screen { display: flex; flex-direction: column; justify-content: center; align-items: center; position: fixed; inset: 0; background: var(--bg-primary); z-index: 9999; gap: 1.5rem; }
.loading-logo { font-size: 3rem; animation: loadPulse 1.5s ease-in-out infinite; }
.loading-spinner-big { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes loadPulse { 0%,100% { opacity: 0.5; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ LOGIN ============ */
.login-screen { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #0a0a15 0%, var(--bg-secondary) 40%, #0d1b2a 70%, #0a0a15 100%); position: relative; }
.login-screen::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 20%, rgba(67,97,238,0.08), transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(46,196,182,0.05), transparent 50%); pointer-events: none; }
.login-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow), 0 0 80px rgba(67, 97, 238, 0.06); position: relative; z-index: 1; }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.login-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.3rem; }
.login-header p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-group input, .form-select, .form-textarea { width: 100%; padding: 0.7rem 0.9rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.95rem; transition: var(--transition); outline: none; font-family: inherit; }
.form-input:focus, .form-group input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder, .form-group input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; appearance: auto; }
.form-textarea { resize: vertical; min-height: 60px; }
.form-color { width: 60px; height: 38px; padding: 2px; cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-primary); cursor: pointer; text-transform: none; letter-spacing: 0; }
.checkbox-label input[type="checkbox"] { width: auto; accent-color: var(--accent); }
.error-message { background: rgba(230, 57, 70, 0.15); border: 1px solid rgba(230, 57, 70, 0.3); color: var(--danger); padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 1rem; }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.6rem 1.1rem; border: none; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5a7bff); color: white; }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), #4a6bef); box-shadow: 0 0 20px var(--accent-glow); }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-full { width: 100%; padding: 0.8rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-xs { padding: 0.25rem 0.55rem; font-size: 0.75rem; }
.btn-logout { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); width: 100%; font-size: 0.85rem; }
.btn-logout:hover { background: rgba(230,57,70,0.15); color: var(--danger); border-color: var(--danger); }

/* ============ DASHBOARD LAYOUT ============ */
.dashboard { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar { width: var(--sidebar-width); background: var(--bg-secondary); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; overflow-y: auto; }
.sidebar-header { padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.8rem; background: linear-gradient(135deg, rgba(67,97,238,0.06), transparent); }
.sidebar-logo { font-size: 1.8rem; filter: drop-shadow(0 0 4px rgba(67,97,238,0.3)); }
.sidebar-header h2 { font-size: 1.1rem; font-weight: 700; background: linear-gradient(135deg, var(--text-primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar-nav { list-style: none; padding: 0.8rem 0; flex: 1; }
.nav-category { padding: 0.8rem 1.5rem 0.3rem; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }
.nav-link { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1.5rem; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: var(--transition); border-left: 3px solid transparent; }
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--accent); background: rgba(67,97,238,0.08); border-left-color: var(--accent); }
.nav-icon { font-size: 1rem; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }
.user-info { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; font-size: 0.9rem; }

/* ============ RANK BADGE ============ */
.rank-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============ MAIN CONTENT ============ */
.main-content { flex: 1; margin-left: var(--sidebar-width); padding: 2rem; min-height: 100vh; }
.content-section { display: none; }
.content-section.active { display: block; }
.section-header { margin-bottom: 1.5rem; }
.section-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.2rem; }
.section-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

/* ============ TOOLBAR ============ */
.toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.filter-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-group .form-select { width: auto; min-width: 130px; padding: 0.4rem 0.7rem; font-size: 0.8rem; }

/* ============ CARDS ============ */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.8rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.card-header h3 { margin-bottom: 0; }

/* ============ STATS GRID ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; text-align: center; position: relative; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.3); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-critical::before { background: var(--danger); }
.stat-high::before { background: #ff6b35; }
.stat-open::before { background: var(--info); }
.stat-progress::before { background: var(--warning); }
.stat-resolved::before { background: var(--success); }
.stat-users::before { background: var(--accent); }
.stat-number { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 0.3rem; }
.stat-critical .stat-number { color: var(--danger); }
.stat-high .stat-number { color: #ff6b35; }
.stat-open .stat-number { color: var(--info); }
.stat-progress .stat-number { color: var(--warning); }
.stat-resolved .stat-number { color: var(--success); }
.stat-users .stat-number { color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

/* ============ MINI LIST (Dashboard) ============ */
.mini-list { max-height: 300px; overflow-y: auto; }
.mini-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-bottom: 1px solid rgba(42,42,74,0.4); font-size: 0.85rem; }
.mini-item:last-child { border-bottom: none; }
.mini-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-time { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.empty-mini { text-align: center; padding: 1.5rem; color: var(--text-muted); }

.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.priority-dot.priority-kritisch { background: var(--danger); }
.priority-dot.priority-hoch { background: #ff6b35; }
.priority-dot.priority-mittel { background: var(--warning); }
.priority-dot.priority-niedrig { background: var(--success); }

/* ============ DATA TABLE ============ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th { text-align: left; padding: 0.6rem 0.8rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table td { padding: 0.65rem 0.8rem; font-size: 0.85rem; color: var(--text-secondary); border-bottom: 1px solid rgba(42,42,74,0.4); vertical-align: middle; }
.file-name { display: flex; align-items: center; gap: 0.4rem; color: var(--text-primary) !important; font-weight: 500; }
.actions-cell { white-space: nowrap; display: flex; gap: 0.3rem; }

.bug-title-cell { color: var(--accent) !important; cursor: pointer; font-weight: 500; }
.bug-title-cell:hover { text-decoration: underline; }

/* ============ BADGES ============ */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.badge-offen { background: rgba(72,149,239,0.2); color: var(--info); }
.badge-in-bearbeitung { background: rgba(255,209,102,0.2); color: var(--warning); }
.badge-erledigt { background: rgba(46,196,182,0.2); color: var(--success); }
.badge-geschlossen { background: rgba(108,117,125,0.2); color: #adb5bd; }
.badge-warning { background: rgba(255,209,102,0.2); color: var(--warning); }
.badge-active { background: rgba(46,196,182,0.2); color: var(--success); }
.badge-inactive { background: rgba(230,57,70,0.2); color: var(--danger); }

.priority-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; }
.priority-kritisch { background: rgba(230,57,70,0.2); color: var(--danger); }
.priority-hoch { background: rgba(255,107,53,0.2); color: #ff6b35; }
.priority-mittel { background: rgba(255,209,102,0.2); color: var(--warning); }
.priority-niedrig { background: rgba(46,196,182,0.2); color: var(--success); }

.category-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.cat-bug { background: rgba(230,57,70,0.15); color: #ff6b6b; }
.cat-feature { background: rgba(67,97,238,0.15); color: var(--accent); }
.cat-verbesserung { background: rgba(46,196,182,0.15); color: var(--success); }
.cat-aufgabe { background: rgba(255,209,102,0.15); color: var(--warning); }

/* ============ BUG DETAIL ============ */
.bug-detail { }
.bug-meta { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.bug-desc { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.6; white-space: pre-wrap; }
.bug-info-row { display: flex; gap: 1.5rem; font-size: 0.85rem; color: var(--text-muted); flex-wrap: wrap; margin-bottom: 1rem; }
.comments-list { margin-bottom: 0.5rem; }
.comment { background: var(--bg-input); border-radius: var(--radius-sm); padding: 0.7rem 1rem; margin-bottom: 0.5rem; }
.comment p { margin-top: 0.3rem; color: var(--text-secondary); font-size: 0.9rem; }

/* ============ NOTES GRID ============ */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.note-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; transition: var(--transition); }
.note-card:hover { border-color: rgba(67,97,238,0.3); }
.note-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.7rem; gap: 0.5rem; }
.note-header h4 { font-size: 1rem; font-weight: 600; flex: 1; }
.note-type-badge { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 4px; white-space: nowrap; }
.note-type-badge.team { background: rgba(67,97,238,0.15); color: var(--accent); }
.note-type-badge.personal { background: rgba(46,196,182,0.15); color: var(--success); }
.note-content { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; margin-bottom: 0.8rem; white-space: pre-wrap; word-break: break-word; }
.note-footer { display: flex; justify-content: space-between; align-items: center; }
.note-actions { display: flex; gap: 0.3rem; }

/* ============ CHANGELOG ============ */
.changelog-timeline { }
.cl-entry { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; border-left: 3px solid var(--accent); }
.cl-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.cl-header h3 { font-size: 1rem; font-weight: 600; flex: 1; }
.cl-version { background: rgba(67,97,238,0.2); color: var(--accent); padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.cl-meta { font-size: 0.75rem; color: var(--text-muted); width: 100%; }
.cl-type { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.cl-type-update { background: rgba(67,97,238,0.2); color: var(--accent); }
.cl-type-feature { background: rgba(46,196,182,0.2); color: var(--success); }
.cl-type-bugfix { background: rgba(255,107,53,0.2); color: #ff6b35; }
.cl-type-hotfix { background: rgba(230,57,70,0.2); color: var(--danger); }
.cl-type-release { background: rgba(155,89,182,0.2); color: #bb86fc; }
.cl-changes { list-style: none; padding-left: 0; }
.cl-changes li { padding: 0.3rem 0; padding-left: 1.2rem; position: relative; font-size: 0.85rem; color: var(--text-secondary); }
.cl-changes li::before { content: '•'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }
.cl-actions { margin-top: 0.5rem; display: flex; gap: 0.3rem; }

/* ============ UPLOAD ============ */
.upload-area { border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; cursor: pointer; transition: var(--transition); }
.upload-area:hover, .upload-area.drag-over { border-color: var(--accent); background: rgba(67,97,238,0.05); }
.upload-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.upload-area p { color: var(--text-secondary); font-size: 0.9rem; }
.upload-hint { font-size: 0.75rem !important; color: var(--text-muted) !important; margin-top: 0.3rem; }
.upload-progress { margin-top: 1rem; }
.progress-bar { width: 100%; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; margin-bottom: 0.4rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--success)); border-radius: 3px; transition: width 0.3s ease; }
#upload-status { font-size: 0.8rem; color: var(--text-secondary); }

/* ============ MODAL ============ */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1000; display: flex; justify-content: center; align-items: center; padding: 2rem; animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 750px; max-height: 85vh; overflow-y: auto; box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(67,97,238,0.08); animation: slideUp 0.2s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, rgba(67,97,238,0.04), transparent); }
.modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 0.2rem; line-height: 1; border-radius: 6px; transition: all 0.15s; }
.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.modal-body { padding: 1.5rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: rgba(0,0,0,0.1); }

/* ============ TOAST ============ */
.toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); font-size: 0.85rem; transform: translateX(120%); opacity: 0; transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1); backdrop-filter: blur(8px); }
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--info); }

/* ============ STATES ============ */
.loading { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 2.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 2.5rem; }
.empty-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.empty-state p { color: var(--text-secondary); }
.error-state { text-align: center; padding: 1.5rem; color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============ EVIDENCE (Beweise) ============ */
.ev-stats-bar { display: flex; align-items: center; gap: 1.2rem; padding: 0.6rem 1rem; margin-bottom: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ev-stat-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.ev-stat-dot { width: 8px; height: 8px; border-radius: 50%; }
.ev-dot-open { background: var(--warning); box-shadow: 0 0 6px rgba(255,209,102,0.4); }
.ev-dot-done { background: var(--success); box-shadow: 0 0 6px rgba(46,196,182,0.4); }
.ev-stat-total { margin-left: auto; color: var(--text-muted); }

.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }

.ev-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all 0.2s; }
.ev-card:hover { border-color: rgba(67,97,238,0.25); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25); }

.ev-card-top { position: relative; }
.ev-image-wrap { position: relative; cursor: pointer; overflow: hidden; height: 180px; background: var(--bg-primary); }
.ev-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.ev-image-wrap:hover .ev-image { transform: scale(1.05); }
.ev-image-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 0.9rem; opacity: 0; transition: opacity 0.2s; backdrop-filter: blur(2px); }
.ev-image-wrap:hover .ev-image-overlay { opacity: 1; }
.ev-no-image { height: 80px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); color: var(--text-muted); font-size: 0.85rem; }

.ev-card-body { padding: 1rem; }
.ev-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.ev-cat-badge { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 6px; }
.ev-status-badge { font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 6px; }
.ev-status-open { background: rgba(255,209,102,0.15); color: var(--warning); }
.ev-status-progress { background: rgba(72,149,239,0.15); color: var(--info); }
.ev-status-done { background: rgba(46,196,182,0.15); color: var(--success); }

.ev-player { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; font-size: 0.92rem; }
.ev-player-head { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; }
.ev-reason { font-size: 0.84rem; color: var(--text-primary); margin-bottom: 0.3rem; line-height: 1.4; }
.ev-label { color: var(--text-muted); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.ev-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 0.3rem; padding: 0.4rem 0.6rem; background: var(--bg-primary); border-radius: var(--radius-sm); border-left: 2px solid var(--accent); }
.ev-note { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.3rem; padding: 0.3rem 0.6rem; background: rgba(46,196,182,0.06); border-radius: var(--radius-sm); border-left: 2px solid var(--success); }
.ev-meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid rgba(42,42,74,0.3); }
.ev-processed { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }
.ev-actions { display: flex; gap: 0.3rem; margin-top: 0.6rem; }

/* Evidence Upload Zone */
.ev-upload-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.ev-upload-zone:hover, .ev-upload-zone.drag-over { border-color: var(--accent); background: rgba(67,97,238,0.04); }
.ev-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; color: var(--text-secondary); font-size: 0.85rem; }
.ev-upload-icon { font-size: 2rem; }
.ev-upload-hint { font-size: 0.72rem; color: var(--text-muted); }
.ev-upload-preview { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); object-fit: contain; }

/* Evidence Lightbox */
.ev-lightbox { display: flex; justify-content: center; align-items: center; }
.ev-lightbox img { max-width: 100%; max-height: 70vh; border-radius: var(--radius-sm); object-fit: contain; }

/* Evidence Modal Info */
.ev-modal-info { padding: 0.7rem 1rem; background: var(--bg-primary); border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid var(--border); }
.ev-modal-info p { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.3rem; }

/* ============ MOBILE HEADER ============ */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; height: 52px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); z-index: 200; align-items: center; justify-content: space-between; padding: 0 1rem; }
.hamburger { background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; padding: 0.3rem; }
.mobile-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 150; backdrop-filter: blur(2px); }
.sidebar-overlay.open { display: block; }

/* ============ NOTIFICATION BELL ============ */
.notif-bell { position: relative; background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 0.3rem; color: var(--text-primary); }
.notif-bell-desktop { margin-left: auto; }
.notif-badge { position: absolute; top: -4px; right: -6px; background: var(--danger); color: white; font-size: 0.6rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 8px rgba(230,57,70,0.5); animation: bellPulse 2s ease infinite; }
@keyframes bellPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* ============ TASKS ============ */
.task-my-banner { padding: 0.6rem 1rem; background: linear-gradient(135deg, rgba(67,97,238,0.1), rgba(255,209,102,0.08)); border: 1px solid rgba(67,97,238,0.2); border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.88rem; color: var(--text-primary); }
.task-list { display: flex; flex-direction: column; gap: 0.6rem; }
.task-card { display: flex; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: all 0.15s; }
.task-card:hover { border-color: rgba(67,97,238,0.25); transform: translateX(2px); }
.task-card.task-mine { border-left-color: var(--accent); }
.task-card.task-done { opacity: 0.5; }
.task-prio-bar { width: 4px; flex-shrink: 0; }
.task-prio-high { background: var(--danger); }
.task-prio-mid { background: var(--warning); }
.task-prio-normal { background: var(--accent); }
.task-card-body { flex: 1; padding: 0.8rem 1rem; min-width: 0; }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.task-title { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.task-status-badge { font-size: 0.65rem; font-weight: 700; padding: 0.12rem 0.45rem; border-radius: 5px; white-space: nowrap; flex-shrink: 0; }
.task-st-open { background: rgba(72,149,239,0.15); color: var(--info); }
.task-st-progress { background: rgba(255,209,102,0.15); color: var(--warning); }
.task-st-done { background: rgba(46,196,182,0.15); color: var(--success); }
.task-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; margin-bottom: 0.3rem; }
.task-meta { display: flex; flex-wrap: wrap; gap: 0.8rem; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.task-actions { display: flex; gap: 0.3rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .notif-bell-desktop { display: none; }
  .sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100vh; z-index: 180; transition: left 0.25s ease; border-right: 1px solid var(--border); }
  .sidebar.open { left: 0; }
  .dashboard { flex-direction: column; padding-top: 52px; }
  .main-content { margin-left: 0; padding: 0.8rem; min-height: calc(100vh - 52px); }
  .section-header h1 { font-size: 1.2rem; }
  .section-subtitle { font-size: 0.8rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .stat-card { padding: 0.8rem 0.5rem; }
  .stat-number { font-size: 1.5rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .filter-group { flex-direction: column; }
  .filter-group .form-select { width: 100%; }
  .card { padding: 0.8rem; }
  .modal { margin: 0.5rem; max-height: 92vh; width: calc(100vw - 1rem); }
  .modal-body { max-height: 65vh; overflow-y: auto; }
  .form-row { grid-template-columns: 1fr; }
  .ev-grid { grid-template-columns: 1fr; }
  .team-members-grid { grid-template-columns: 1fr; }
  .ig-tabs { flex-wrap: wrap; }
  .ig-perm-item { flex-wrap: wrap; gap: 0.3rem; }
  .ig-perm-desc { min-width: 100%; order: 3; }
  .ig-perm-actions { order: 2; margin-left: auto; }
  .perms-table-wrap { overflow-x: auto; }
  .data-table { font-size: 0.75rem; }
  .data-table th, .data-table td { padding: 0.4rem 0.5rem; }
  .task-meta { flex-direction: column; gap: 0.2rem; }
  .task-card-top { flex-wrap: wrap; }
  .sidebar-footer { padding: 0.8rem 1rem; }
  .btn { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
  .btn-xs { padding: 0.2rem 0.4rem; font-size: 0.7rem; }
  .upload-area { padding: 1rem; }
  .upload-area p { font-size: 0.82rem; }
}

@media (min-width: 769px) {
  .mobile-header { display: none !important; }
  .sidebar-overlay { display: none !important; }
  #notif-bell-mobile { display: none; }
}

/* ============ EDIT HISTORY ============ */
.edit-history { margin-top: 1rem; padding: 0.8rem; background: var(--bg-input); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.edit-history h4 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.history-entry { padding: 0.4rem 0; border-bottom: 1px solid rgba(42,42,74,0.3); font-size: 0.82rem; }
.history-entry:last-child { border-bottom: none; }
.history-author { font-weight: 600; color: var(--accent); }
.history-entry ul { margin: 0.2rem 0 0 1rem; padding: 0; }
.history-entry li { color: var(--text-secondary); font-size: 0.8rem; padding: 0.1rem 0; }
.last-edited-info { font-size: 0.78rem; color: var(--text-muted); padding: 0.5rem 0; border-top: 1px solid rgba(42,42,74,0.3); margin-top: 0.5rem; }

/* ============ PERMISSION GRID ============ */
.perm-grid { display: flex; flex-direction: column; gap: 0.3rem; max-height: 250px; overflow-y: auto; padding: 0.5rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.perm-grid .checkbox-label { font-size: 0.82rem; padding: 0.3rem 0.4rem; border-radius: 4px; transition: var(--transition); }
.perm-grid .checkbox-label:hover { background: rgba(67,97,238,0.06); }
.perm-grid small { display: inline; font-size: 0.72rem; }
.badge-info { background: rgba(67,97,238,0.2); color: var(--accent); }

/* ============ TEAM: MEMBER CARDS (Redesigned) ============ */
.team-total-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; margin-bottom: 1.2rem; background: linear-gradient(135deg, rgba(67,97,238,0.08), rgba(46,196,182,0.06)); border: 1px solid rgba(67,97,238,0.15); border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); }
.team-rank-section { margin-bottom: 1.8rem; }
.rank-section-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; padding-bottom: 0.5rem; }
.rank-section-bar { width: 4px; height: 22px; border-radius: 4px; flex-shrink: 0; }
.rank-section-label { font-weight: 700; font-size: 1rem; letter-spacing: 0.3px; }
.rank-section-count { background: rgba(255,255,255,0.06); padding: 0.1rem 0.5rem; border-radius: 10px; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.team-members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.7rem; }
.member-card { display: flex; gap: 0.8rem; padding: 0.8rem 1rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.2s ease; position: relative; overflow: hidden; }
.member-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: transparent; transition: background 0.2s ease; }
.member-card:hover { border-color: rgba(67,97,238,0.3); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.member-card:hover::before { background: var(--accent); }
.member-card.member-absent { opacity: 0.6; border-style: dashed; }
.member-card.member-absent:hover { opacity: 0.85; }
.member-avatar-wrap { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.member-avatar-img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--ring-color, var(--border)); image-rendering: pixelated; display: block; transition: border-color 0.2s, transform 0.2s; }
.member-card:hover .member-avatar-img { transform: scale(1.08); border-color: var(--accent); }
.member-avatar-wrap .member-status-dot { position: absolute; bottom: -1px; right: -1px; width: 12px; height: 12px; border: 2px solid var(--bg-secondary); border-radius: 50%; }
.member-info { flex: 1; min-width: 0; }
.member-name-row { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.2rem; }
.member-username { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-online { background: var(--success); box-shadow: 0 0 6px rgba(46,196,182,0.5); }
.dot-absent { background: var(--danger); box-shadow: 0 0 6px rgba(230,57,70,0.4); }
.member-detail { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; display: flex; align-items: center; gap: 0.25rem; }
.detail-icon { font-size: 0.7rem; flex-shrink: 0; }
.member-absence-tag { display: inline-block; font-size: 0.7rem; color: var(--danger); background: rgba(230,57,70,0.1); padding: 0.1rem 0.4rem; border-radius: 4px; margin-top: 0.2rem; }

/* ============ TEAM: RULE & TEXT CARDS ============ */
.rule-card { border-left: 3px solid var(--accent); }
.rule-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.rule-header h3 { flex: 1; font-size: 1rem; margin-bottom: 0; }
.rule-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--accent); color: white; font-weight: 700; font-size: 0.85rem; border-radius: 50%; flex-shrink: 0; }
.rule-content { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }
.rule-actions, .text-actions { display: flex; gap: 0.3rem; }

/* ============ TEAM-TEXTE: CATEGORY ACCORDION ============ */
.text-category-section { margin-bottom: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-card); }
.cat-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; cursor: pointer; background: var(--bg-secondary); transition: background 0.15s; user-select: none; }
.cat-header:hover { background: rgba(67,97,238,0.06); }
.cat-header-left { display: flex; align-items: center; gap: 0.5rem; }
.cat-header-left h3 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.cat-header-right { display: flex; gap: 0.3rem; }
.cat-chevron { font-size: 0.7rem; color: var(--text-muted); transition: transform 0.2s; width: 14px; text-align: center; }
.cat-chevron.open { transform: rotate(0deg); }
.cat-icon { font-size: 1rem; }
.cat-count { font-size: 0.72rem; background: rgba(255,255,255,0.06); color: var(--text-muted); padding: 0.1rem 0.45rem; border-radius: 8px; font-weight: 600; }
.cat-vis-badge { font-size: 0.62rem; background: rgba(255,209,102,0.12); color: var(--warning); padding: 0.1rem 0.45rem; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.cat-body { padding: 0; }
.cat-empty { padding: 1.2rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; font-style: italic; }

.text-list-compact { padding: 0; }
.text-list-item { border-top: 1px solid var(--border); }
.text-list-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; cursor: pointer; transition: background 0.12s; user-select: none; }
.text-list-row:hover { background: rgba(67,97,238,0.04); }
.text-expand-icon { font-size: 0.6rem; color: var(--text-muted); width: 12px; text-align: center; flex-shrink: 0; transition: transform 0.15s; }
.text-list-title { flex: 1; font-size: 0.88rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-list-actions { display: flex; gap: 0.2rem; flex-shrink: 0; }
.text-list-body { padding: 0 1rem 0.8rem 1.7rem; animation: expandIn 0.15s ease; }
@keyframes expandIn { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 500px; } }
.text-entry-content { color: var(--text-secondary); font-size: 0.84rem; line-height: 1.65; padding: 0.5rem 0.7rem; background: var(--bg-primary); border-radius: var(--radius-sm); border: 1px solid rgba(42,42,74,0.3); white-space: pre-wrap; word-wrap: break-word; }
.text-entry-footer { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.35rem; }

/* ============ PERMISSIONS TABLE ============ */
.perms-table-wrap { overflow-x: auto; }
.perms-table th, .perms-table td { text-align: center; min-width: 70px; }
.perms-table td:first-child, .perms-table th:first-child { text-align: left; min-width: 180px; }
.perm-cell { font-size: 1rem; }
.perm-yes { color: var(--success); }
.perm-no { color: var(--text-muted); font-size: 0.8rem; }

/* ============ REGELWERK VIEW + RICH TEXT EDITOR ============ */
.regelwerk-view { padding: 0.5rem 0; }
.regelwerk-text { color: var(--text-primary); font-size: 0.92rem; line-height: 1.85; word-wrap: break-word; }
.regelwerk-text h2 { font-size: 1.2rem; font-weight: 700; color: var(--accent); margin: 1rem 0 0.4rem; border-bottom: 1px solid rgba(67,97,238,0.15); padding-bottom: 0.3rem; }
.regelwerk-text h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin: 0.8rem 0 0.3rem; }
.regelwerk-text ul, .regelwerk-text ol { margin: 0.4rem 0 0.4rem 1.5rem; }
.regelwerk-text li { margin-bottom: 0.2rem; }

/* Rich Editor */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem; background: var(--bg-primary); border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; align-items: center; }
.toolbar-group { display: flex; gap: 0.2rem; align-items: center; }
.toolbar-separator { width: 1px; height: 20px; background: var(--border); margin: 0 0.3rem; }
.toolbar-btn { background: rgba(255,255,255,0.04); border: 1px solid transparent; color: var(--text-secondary); padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.78rem; cursor: pointer; transition: all 0.15s; font-family: inherit; line-height: 1.2; white-space: nowrap; }
.toolbar-btn:hover { background: rgba(67,97,238,0.15); color: var(--text-primary); border-color: rgba(67,97,238,0.25); }
.toolbar-btn:active { background: rgba(67,97,238,0.25); }
.toolbar-color-wrap { display: flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; cursor: pointer; color: var(--text-secondary); }
.toolbar-color-wrap input[type="color"] { width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 4px; background: none; cursor: pointer; padding: 0; }
.toolbar-range-wrap { display: flex; align-items: center; gap: 0.3rem; }
.range-label { color: var(--text-muted); font-size: 0.65rem; font-weight: 700; }
.range-label-big { font-size: 0.95rem; }
.toolbar-range { -webkit-appearance: none; appearance: none; width: 80px; height: 4px; background: var(--border); border-radius: 2px; outline: none; cursor: pointer; }
.toolbar-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; border: 2px solid var(--bg-card); box-shadow: 0 0 4px rgba(67,97,238,0.4); }
.toolbar-range::-moz-range-thumb { width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; border: 2px solid var(--bg-card); }
.current-filename { padding: 0.5rem 0.8rem; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--text-secondary); font-family: monospace; }
.rich-editor { min-height: 350px; max-height: 55vh; overflow-y: auto; padding: 1rem 1.2rem; background: var(--bg-input); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); color: var(--text-primary); font-size: 0.9rem; line-height: 1.8; outline: none; }
.rich-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(67,97,238,0.15); }
.rich-editor h2 { font-size: 1.2rem; color: var(--accent); margin: 0.5rem 0; }
.rich-editor h3 { font-size: 1.05rem; color: var(--text-primary); margin: 0.4rem 0; }
.rich-editor ul, .rich-editor ol { margin-left: 1.5rem; }
.rich-editor p { margin-bottom: 0.4rem; }

/* ============ INGAME PERMISSIONS ============ */
.ig-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }

/* Rank Tabs */
.ig-tabs-wrap { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 0.6rem 0.8rem; overflow-x: auto; }
.ig-tabs { display: flex; gap: 0.35rem; min-width: max-content; }
.ig-rank-tab { display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.85rem; border: 1px solid transparent; border-radius: 8px; background: rgba(255,255,255,0.03); color: var(--text-secondary); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.ig-rank-tab:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.ig-rank-tab.active { background: rgba(var(--rank-color), 0.12); border-color: var(--rank-color); color: var(--text-primary); box-shadow: 0 0 12px rgba(67,97,238,0.1); }
.ig-rank-tab.active { background: color-mix(in srgb, var(--rank-color) 12%, transparent); border-color: color-mix(in srgb, var(--rank-color) 40%, transparent); }
.ig-tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ig-tab-count { font-size: 0.65rem; background: rgba(255,255,255,0.08); padding: 0.05rem 0.35rem; border-radius: 6px; color: var(--text-muted); }
.ig-rank-tab.active .ig-tab-count { background: rgba(255,255,255,0.15); color: var(--text-primary); }

/* Panel Header */
.ig-panel { padding: 1.2rem; }
.ig-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 0.5rem; flex-wrap: wrap; }
.ig-panel-stats { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ig-stat { font-size: 0.78rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 6px; background: rgba(255,255,255,0.04); }
.ig-stat-on { color: var(--success); }
.ig-stat-off { color: var(--danger); }
.ig-stat-total { color: var(--text-muted); }

/* Category Sections */
.ig-cat-section { margin-bottom: 1rem; }
.ig-cat-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; padding: 0.3rem 0; }
.ig-cat-icon { font-size: 0.9rem; }
.ig-cat-name { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.ig-cat-badge { font-size: 0.6rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 6px; }

/* Permission Items */
.ig-perm-list { display: flex; flex-direction: column; gap: 0.3rem; }
.ig-perm-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.8rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; transition: all 0.15s; }
.ig-perm-item:hover { border-color: rgba(67,97,238,0.25); background: rgba(67,97,238,0.03); }
.ig-perm-item.ig-disabled { opacity: 0.45; }
.ig-perm-item.ig-disabled .ig-perm-cmd { text-decoration: line-through; }
.ig-perm-item.ig-dragging { opacity: 0.4; border-style: dashed; border-color: var(--accent); }

.ig-drag-handle { cursor: grab; color: var(--text-muted); font-size: 1rem; line-height: 1; user-select: none; letter-spacing: -1px; }
.ig-drag-handle:active { cursor: grabbing; }
.ig-perm-cmd { font-family: 'Consolas', 'Courier New', monospace; font-size: 0.85rem; font-weight: 700; color: var(--accent); background: rgba(67,97,238,0.08); padding: 0.15rem 0.5rem; border-radius: 5px; white-space: nowrap; min-width: 100px; }
.ig-perm-desc { flex: 1; font-size: 0.82rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-perm-actions { display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0; }

/* Toggle Switch */
.ig-toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.ig-toggle input { opacity: 0; width: 0; height: 0; }
.ig-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 20px; transition: all 0.2s; }
.ig-toggle-slider::before { content: ''; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: all 0.2s; }
.ig-toggle input:checked + .ig-toggle-slider { background: var(--success); }
.ig-toggle input:checked + .ig-toggle-slider::before { transform: translateX(16px); }

/* Status badges for non-editors */
.ig-status-badge { font-size: 0.68rem; font-weight: 700; padding: 0.12rem 0.4rem; border-radius: 4px; }
.ig-on { background: rgba(46,196,182,0.15); color: var(--success); }
.ig-off { background: rgba(230,57,70,0.15); color: var(--danger); }

/* Inherited Permissions */
.ig-inherited-section { margin-top: 1.2rem; border-top: 1px dashed var(--border); padding-top: 0.8rem; }
.ig-inherited-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); border-radius: 6px; transition: background 0.12s; user-select: none; }
.ig-inherited-header:hover { background: rgba(255,255,255,0.03); }
.ig-inherited-icon { font-size: 0.85rem; }
.ig-inherited-count { font-size: 0.65rem; background: rgba(255,255,255,0.06); padding: 0.1rem 0.4rem; border-radius: 6px; margin-left: auto; }
.ig-cat-inherited { opacity: 0.65; }
.ig-perm-inherited { background: rgba(255,255,255,0.015); border-style: dashed; }
.ig-perm-inherited .ig-perm-cmd { background: rgba(255,255,255,0.04); color: var(--text-muted); }
.ig-from-rank { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 0.1rem 0.4rem; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.ig-hidden { display: none; }
.ig-stat-inherited { color: var(--info); }

/* ============ TEAM STATUS MODAL ============ */
.team-status-summary { display: flex; gap: 1.2rem; margin-bottom: 1rem; padding: 0.8rem; background: var(--bg-input); border-radius: var(--radius-sm); }
.status-count { font-weight: 600; font-size: 0.95rem; }
.status-count.present { color: var(--success); }
.status-count.absent { color: var(--danger); }
.team-status-table td:first-child { width: 30px; text-align: center; font-size: 1.1rem; }
.row-absent { background: rgba(239, 71, 111, 0.05); }
.row-present {}
.status-text { font-size: 0.85rem; font-weight: 500; }
.status-text.status-present { color: var(--success); }
.status-text.status-absent { color: var(--danger); }
.absence-detail { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }

