:root {
    --bg: #071322;
    --panel: rgba(255,255,255,.92);
    --ink: #0e1b2d;
    --muted: #637083;
    --brand: #0677ff;
    --cyan: #18d8ff;
    --line: #dce7f3;
    --ok: #12a66a;
    --warn: #c98510;
    --danger: #d64545;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: radial-gradient(circle at top right, rgba(24,216,255,.22), transparent 32rem), radial-gradient(circle at bottom left, rgba(6,119,255,.18), transparent 28rem), linear-gradient(135deg, #071322, #0b1f35 55%, #071322);
    color: var(--ink);
}
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    width: 292px;
    background: rgba(4, 16, 31, .9);
    color: #fff;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    border-left: 1px solid rgba(255,255,255,.1);
    backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.brand-logo { width: 82px; max-height: 48px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(24,216,255,.24)); }
.brand strong { display:block; letter-spacing:.2px; }
.brand small { display: block; color: #9cc4e8; margin-top: 3px; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar a { color: #e7f3ff; padding: 11px 12px; border-radius: 8px; transition: transform .18s ease, background .18s ease; }
.sidebar a:hover { background: linear-gradient(90deg, rgba(6,119,255,.34), rgba(24,216,255,.15)); transform: translateX(-4px); }
.content { flex: 1; padding: 24px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: #fff; }
h1 { margin: 0; font-size: 28px; }
h2 { margin-top: 0; }
.topbar p { color: #b8cbe0; margin: 6px 0 0; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    background: var(--panel);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 20px 42px rgba(1, 11, 24, .18);
    animation: rise .32s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.metric { position: relative; overflow: hidden; }
.metric:before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(6,119,255,.13), transparent 55%, rgba(24,216,255,.16)); pointer-events: none; }
.metric strong { display: block; font-size: 34px; margin-bottom: 6px; position: relative; }
.metric span { color: var(--muted); position: relative; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
th { background: #edf6ff; color: #17324d; font-weight: 700; }
tr:hover td { background: rgba(6,119,255,.045); }
.badge { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: #e8eef5; color: #24384f; font-size: 12px; white-space: nowrap; }
.badge.urgent, .badge.emergency, .badge.rejected { background: #fde8e8; color: var(--danger); }
.badge.closed, .badge.approved, .badge.paid { background: #e5f7ed; color: var(--ok); }
.badge.pending_approval, .badge.important, .badge.draft { background: #fff3d7; color: var(--warn); }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; cursor: pointer; display: inline-block; box-shadow: 0 10px 22px rgba(6,119,255,.22); }
.btn-secondary { background: linear-gradient(135deg, #142b46, #0b77c5); }
.btn-light { background: #eef6ff; color: #12304f; box-shadow: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
.full { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.alert { background: #eaf6ff; border: 1px solid #badff8; padding: 12px; border-radius: 10px; margin-bottom: 14px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at top right, rgba(24,216,255,.28), transparent 32rem), linear-gradient(135deg, #061225, #0b2a46); }
.login-card { width: min(470px, 100%); }
.login-logo { width: 260px; display:block; margin: 0 auto 18px; }
.login-card h1 { margin-bottom: 6px; text-align:center; }
.muted { color: var(--muted); }
.progress { height: 10px; background: #e6eef8; border-radius: 999px; overflow: hidden; }
.progress span { display:block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--cyan)); }
@media (max-width: 980px) {
    .app-shell { display: block; }
    .sidebar { width: 100%; height: auto; position: static; }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { align-items: stretch; gap: 12px; flex-direction: column; }
    .grid-4, .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
    .content { padding: 16px; }
}
