:root {
  --bg-dark: #101827;
  --panel-bg: #1e293b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }

/* Header & Navigation */
header { background: #0f172a; border-bottom: 1px solid var(--border); padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 50px; }
.brand { font-weight: 700; font-size: 1.05rem; color: #38bdf8; display: flex; align-items: center; gap: 8px; text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 1.2rem; }
nav ul li { position: relative; }
nav ul li a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; padding: 8px 12px; border-radius: 4px; display: block; cursor: pointer; }
nav ul li a:hover, nav ul li a.active { color: #fff; background: var(--panel-bg); }

.dropdown { display: none; position: absolute; top: 100%; left: 0; background: #1e293b; border: 1px solid var(--border); border-radius: 4px; min-width: 240px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5); z-index: 50; }
nav ul li:hover .dropdown { display: block; }
.dropdown a { padding: 10px 15px; border-bottom: 1px solid #334155; color: var(--text-muted); text-decoration: none; display: block; font-size: 0.85rem; }
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--accent); color: white; }

/* Main Layout & Cards */
main { flex: 1; padding: 1.5rem; }
.card { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1rem; }
.card-header h2 { font-size: 1.25rem; font-weight: 600; }

/* Tables */
.table-container { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { background: #0f172a; color: var(--text-muted); font-weight: 600; }
tr:hover { background: rgba(255,255,255,0.03); }

/* Buttons */
.btn { background: var(--accent); color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: 500; font-size: 0.85rem; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--accent-hover); }
.btn-secondary { background: #475569; }
.btn-secondary:hover { background: #64748b; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }

/* Modals & Forms */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 100; overflow-y: auto; padding: 20px; }
.modal-box { background: #1e293b; border: 1px solid var(--border); border-radius: 8px; width: 850px; max-width: 95vw; padding: 1.5rem; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5); }
.modal-box h3 { margin-bottom: 1rem; font-size: 1.15rem; color: #38bdf8; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 0.85rem; }
.form-group label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.form-group input, .form-group select { width: 100%; padding: 8px 10px; background: #0f172a; border: 1px solid var(--border); border-radius: 4px; color: #fff; outline: none; font-size: 0.85rem; }
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.error-msg { color: #ef4444; font-size: 0.8rem; margin-bottom: 0.8rem; display: none; }

/* Footer */
footer { background: #0b1329; border-top: 1px solid var(--border); padding: 6px 1.5rem; font-size: 0.8rem; color: var(--text-muted); display: flex; justify-content: space-between; }
.status-badge { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; }
