:root {
    color-scheme: light;
    --ink: #192437;
    --muted: #647086;
    --accent: #2d6bf3;
    --soft: #f2f5fb;
    --line: #e6eaf1;
    --canvas: #edf1f8;
    --radius: 26px;
    --shadow: 0 5px 18px -9px rgb(40 60 100 / 12%);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
    background: radial-gradient(ellipse at 92% 0%, #e5ebfc, transparent 40%),
        radial-gradient(ellipse at 0 90%, #e7f2f0, transparent 45%), var(--canvas);
    background-attachment: fixed;
}
a { color: #2256c5; text-underline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(29px, 4vw, 40px); line-height: 1.14; letter-spacing: -.04em; overflow-wrap: anywhere; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.025em; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #6495fc; outline-offset: 3px; }
.sidebar {
    position: fixed; inset: 18px auto 18px 18px; width: 232px; padding: 18px 14px;
    display: flex; flex-direction: column; border-radius: 30px; z-index: 2;
    background: rgb(255 255 255 / 62%); border: 1px solid rgb(255 255 255 / 80%);
    backdrop-filter: blur(28px) saturate(145%); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; padding: 6px 8px; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--accent); color: white; }
.brand small { display: block; color: var(--muted); font-weight: 400; }
.sidebar nav { margin-block: 22px 10px; overflow: auto; padding: 4px; }
.sidebar nav a { display: block; padding: 8px 13px; border-radius: 13px; margin-bottom: 3px; color: var(--muted); text-decoration: none; font-size: 14px; }
.sidebar nav a:hover { background: white; color: var(--ink); }
.sidebar nav a[aria-current] { background: var(--accent); color: white; }
.account { margin-top: auto; display: flex; flex-wrap: wrap; padding-inline: 8px; align-items: center; justify-content: space-between; gap: 5px; font-size: 12px; }
.account button { border: 0; background: transparent; color: #2256c5; padding: 5px; }
main { margin-left: 264px; padding: 38px 30px 60px 10px; max-width: 1650px; }
main.guest { display: grid; min-height: 100dvh; place-content: center; margin: auto; padding: 22px; }
.guest .card { width: min(390px, calc(100vw - 44px)); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 23px; }
.page-header p { margin-top: 8px; color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.card h2 { margin-bottom: 15px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric { display: flex; flex-direction: column; justify-content: space-between; gap: 9px; text-decoration: none; color: var(--ink); }
.metric strong { font-size: 39px; line-height: 1.1; color: #2256c5; }
.metric:first-child { background: #dfeaff; }
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.pipeline div { display: grid; padding: 10px 12px; border-radius: 13px; background: var(--soft); }
.pipeline strong { color: #2256c5; font-size: 20px; }
.muted, small { color: var(--muted); }
.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 17px;
    border-radius: 50px; border: 1px solid #dfe6f3; background: white; color: var(--ink);
    font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.button:hover { background: #eef4ff; }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: #1e5ce0; }
.button.danger { color: #a53136; }
.actions, .filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.filters { margin-bottom: 16px; }
.filters > * { flex: 1 1 125px; }
.filters > .button { flex: 0 0 auto; }
label { display: grid; gap: 5px; font-weight: 550; font-size: 13px; min-width: 0; }
label.checkbox { display: flex; align-items: center; }
.form { display: grid; gap: 13px; }
.form > .button { justify-self: start; }
input, select, textarea {
    min-width: 0; min-height: 43px; width: 100%; padding: 10px 12px; color: var(--ink);
    background: var(--soft); border: 1px solid #e1e7f1; border-radius: 13px; font-size: 14px;
}
input[type=checkbox], input[type=radio] { width: 17px; min-height: auto; accent-color: var(--accent); }
select {
    appearance: none; padding-right: 36px; text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3 6 5 5 5-5' stroke='%23647086' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 13px center; background-repeat: no-repeat; background-size: 14px 14px;
}
textarea { min-height: 100px; resize: vertical; }
.notice { padding: 12px 16px; border-radius: 14px; margin-bottom: 15px; background: #e6f4ea; }
.notice.error { background: #fcebed; color: #8c252c; }
.notice ul { margin-block: 4px 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; }
td:first-child { width: 50%; min-width: 180px; }
td { overflow-wrap: anywhere; }
.chip { display: inline-block; padding: 4px 9px; color: #315994; background: #edf3ff; border-radius: 9px; font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 9px; padding-top: 14px; }
.details { display: grid; grid-template-columns: minmax(100px, 185px) minmax(0, 1fr); gap: 9px 14px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.list { display: grid; gap: 9px; padding-left: 20px; }
.preview { width: 100%; min-height: 170px; border: 1px solid var(--line); border-radius: 12px; }
.mobile-menu { display: none; }
@media (max-width: 820px) {
    .sidebar { position: static; width: auto; margin: 12px; border-radius: 21px; padding: 10px; }
    .sidebar nav { display: flex; gap: 3px; margin: 6px 0 0; }
    .sidebar nav a { white-space: nowrap; }
    .account { margin-top: 6px; justify-content: flex-start; }
    main { margin: 0; padding: 16px 13px 34px; }
}
@media (max-width: 540px) {
    .card { padding: 15px; }
    .cols { grid-template-columns: 1fr; gap: 0; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .details { grid-template-columns: 1fr; }
    .details dd { margin-bottom: 6px; }
    .page-header { margin-bottom: 15px; }
}
td .chip { white-space: nowrap; }
td:last-child small { white-space: nowrap; }
.login-brand { display: grid; justify-items: center; gap: 12px; margin-bottom: 24px; }
.login-brand img { display: block; }
