:root {
    --navy: #0c2d57;
    --ink: #15243a;
    --muted: #667389;
    --teal: #008c95;
    --teal-dark: #00747b;
    --sidebar: #f4f7f9;
    --surface: #ffffff;
    --line: #d8e0e7;
    --line-strong: #becbd6;
    --green: #078447;
    --green-bg: #e9f7ef;
    --orange: #bb5d00;
    --orange-bg: #fff3e4;
    --red: #c52f36;
    --red-bg: #fdecee;
    --shadow: 0 16px 44px rgba(11, 36, 65, .16);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--surface); color: var(--ink); font-size: 14px; }
button, input, select { font: inherit; }

.topbar {
    position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; border-bottom: 1px solid var(--line); background: #fff;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--navy); font-size: 23px; font-weight: 760; letter-spacing: -.03em; }
.brand-mark { width: 9px; height: 28px; border-radius: 2px; background: var(--teal); box-shadow: 5px 0 0 #9bd8d9; }
.environment { color: var(--muted); font-size: 13px; }

.sidebar {
    position: fixed; z-index: 20; top: 64px; bottom: 40px; left: 0; width: 224px;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 24px 12px; background: var(--sidebar); border-right: 1px solid var(--line);
}
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a {
    position: relative; display: flex; align-items: center; gap: 12px; height: 46px;
    padding: 0 14px; color: #3c4a5c; text-decoration: none; border-radius: 7px; font-size: 15px;
}
.sidebar nav a:hover { background: #eaf0f3; }
.sidebar nav a.selected { color: var(--teal-dark); background: #e6eef1; font-weight: 650; }
.sidebar nav a.selected::before { content: ""; position: absolute; left: -12px; width: 3px; height: 34px; border-radius: 0 3px 3px 0; background: var(--teal); }
.nav-icon { width: 22px; font-size: 21px; color: #607083; text-align: center; }
.selected .nav-icon { color: var(--teal); }
.sidebar-note { padding: 14px; color: #7a8795; line-height: 1.6; font-size: 12px; border-top: 1px solid var(--line); }

.workspace { min-height: calc(100vh - 40px); margin-left: 224px; padding: 92px 32px 72px; }
.summary-strip {
    display: flex; gap: 40px; margin-bottom: 26px; padding: 14px 18px;
    border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 8px;
}
.summary-strip > div { display: flex; align-items: baseline; gap: 8px; }
.summary-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.summary-strip strong { color: var(--navy); font-size: 13px; }

.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
h1 { margin: 0 0 7px; color: var(--navy); font-size: 29px; line-height: 1.15; letter-spacing: -.035em; }
.section-heading p, .drawer-header p { margin: 0; color: var(--muted); line-height: 1.45; }
.button {
    min-height: 40px; padding: 0 17px; border: 1px solid transparent; border-radius: 7px;
    font-size: 14px; font-weight: 650; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { color: #425068; background: #fff; border-color: var(--line-strong); }

.filters { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.filters label { width: 200px; }
label { display: grid; gap: 7px; color: #29394f; font-size: 13px; font-weight: 620; }
label small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
input[type=text], select {
    width: 100%; height: 40px; padding: 0 12px; color: var(--ink);
    background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; outline: none;
}
input[type=text]:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 140, 149, .12); }
.filter-button { height: 40px; }

.table-shell { width: 100%; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 7px; }
.data-table { width: 100%; min-width: 980px; border-collapse: collapse; background: #fff; }
.data-table th {
    padding: 13px 12px; color: #33445b; background: #f4f7f9; border-bottom: 1px solid var(--line-strong);
    text-align: left; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.data-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); color: #344256; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfd; }
.data-table strong, .version { color: var(--navy); }
.data-table code { color: #405169; font-family: "Cascadia Mono", Consolas, monospace; font-size: 11px; }
.nowrap { white-space: nowrap; }
.status { display: inline-block; padding: 5px 8px; border-radius: 5px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.status.active { color: var(--green); background: var(--green-bg); }
.status.staged { color: var(--orange); background: var(--orange-bg); }
.status.withdrawn { color: var(--red); background: var(--red-bg); }
.actions { white-space: nowrap; }
.action-link { margin-right: 8px; color: var(--teal-dark); font-size: 12px; text-decoration: none; }
.action-link:hover { text-decoration: underline; }
.action-link.danger { color: var(--red); }
.empty-state { padding: 36px !important; color: var(--muted) !important; text-align: center; }

.activity-section { margin-top: 42px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-title h2 { margin: 0; color: var(--navy); font-size: 20px; letter-spacing: -.02em; }
.section-title span { color: var(--muted); font-size: 12px; }
.data-table.compact { min-width: 880px; }
.data-table.compact td { padding: 10px 12px; font-size: 12px; }
.http-status { color: var(--green); font-weight: 700; }

.message { margin: 0 0 22px; padding: 13px 16px; border-radius: 7px; border: 1px solid; }
.message.success { color: #08673b; background: var(--green-bg); border-color: #bce1cc; }
.message.error { color: #9f252c; background: var(--red-bg); border-color: #efc3c6; }

.drawer-backdrop { position: fixed; z-index: 39; inset: 0; background: rgba(10, 30, 54, .26); opacity: 0; visibility: hidden; transition: opacity .2s; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
    position: fixed; z-index: 40; top: 64px; right: 0; bottom: 0; width: min(450px, 100vw);
    display: flex; flex-direction: column; padding: 24px; background: #fff; border-left: 1px solid var(--line);
    box-shadow: var(--shadow); overflow-y: auto; transform: translateX(105%); transition: transform .24s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.drawer-header h2 { margin: 0 0 6px; color: var(--navy); font-size: 21px; letter-spacing: -.02em; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 6px; color: #5d697b; background: transparent; font-size: 27px; line-height: 1; cursor: pointer; }
.icon-button:hover { background: var(--sidebar); }
.form-grid { display: grid; gap: 18px; }
.file-drop { position: relative; display: grid; place-items: center; height: 76px; border: 1px dashed #9babb9; border-radius: 7px; color: #4c5a6d; font-weight: 400; overflow: hidden; }
.file-drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.file-drop em { color: var(--teal); font-style: normal; }
.selected-file { display: block; padding: 10px 12px; color: #536175; background: var(--sidebar); border-radius: 5px; font-size: 12px; font-weight: 400; }
.drawer-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: auto; padding-top: 28px; }

footer {
    position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; height: 40px;
    display: flex; align-items: center; justify-content: flex-end; padding: 0 22px;
    color: #7c8795; background: #fff; border-top: 1px solid var(--line); font-size: 11px;
}

@media (max-width: 900px) {
    .sidebar { width: 70px; padding-inline: 8px; }
    .sidebar nav a { justify-content: center; padding: 0; }
    .sidebar nav a:not(.selected)::after, .sidebar nav a.selected::after { display: none; }
    .sidebar nav a { font-size: 0; }
    .nav-icon { font-size: 22px; }
    .sidebar-note { display: none; }
    .workspace { margin-left: 70px; padding-inline: 20px; }
    .filters { flex-wrap: wrap; }
    .filters label { flex: 1 1 160px; }
}

@media (max-width: 620px) {
    .topbar { padding: 0 16px; }
    .brand { font-size: 18px; }
    .environment { display: none; }
    .sidebar { display: none; }
    .workspace { margin-left: 0; padding: 84px 14px 66px; }
    .summary-strip { flex-direction: column; gap: 8px; }
    .section-heading { flex-direction: column; }
    .section-heading .button { width: 100%; }
    .filters { display: grid; grid-template-columns: 1fr 1fr; }
    .filters label { width: auto; }
    .filter-button { width: 100%; }
    .drawer { top: 0; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
