:root {
	color-scheme: dark;
	--bg: #101115;
	--panel: #17191f;
	--raised: #1d2028;
	--line: #2a2d36;
	--text: #e9ebf2;
	--muted: #8c92a3;
	--accent: #b5f3c5;
	--accent-ink: #183823;
	--danger: #f49c9c;
	--radius: 14px;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { color: inherit; }
svg { width: 19px; height: 19px; flex-shrink: 0; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; width: 238px; height: 100vh; border-right: 1px solid var(--line); padding: 33px 18px 20px; display: flex; flex-direction: column; background: #131419; z-index: 10; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 13px 40px; font-size: 20px; font-weight: 700; letter-spacing: -.8px; }
.brand-mark { width: 32px; height: 33px; background: var(--accent); border-radius: 9px; display: grid; place-items: center; color: #142e1e; }
.brand-mark svg { width: 22px; height: 22px; stroke-width: 2; }
.tiny-label { font-size: 10px; font-weight: 650; letter-spacing: 1.8px; color: #656d7e; text-transform: uppercase; }
.sidebar .tiny-label { margin: 0 15px 13px; }
.nav { display: flex; flex-direction: column; gap: 7px; }
.nav a { padding: 12px 14px; display: flex; align-items: center; gap: 12px; color: #989eac; border-radius: 8px; font-weight: 500; }
.nav a.active { background: #25352d; color: var(--accent); }
.nav a:hover { color: #fff; background: #21242b; }
.nav a.active:hover { background: #293e31; color: var(--accent); }
.nav a span:last-child { margin-left: auto; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.workspace-box { border: 1px solid #2c3530; background: linear-gradient(145deg,#202b25,#191c20); border-radius: 11px; padding: 16px; margin: 24px 4px; font-size: 12px; line-height: 1.6; }
.workspace-box strong { display: block; margin: 7px 0 3px; color: #c5e0cc; font-weight: 550; }
.workspace-box p { color: var(--muted); margin: 0; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; box-shadow: 0 0 8px #b5f3c522; }
.user-row { border-top: 1px solid var(--line); padding: 19px 7px 0; display: flex; gap: 10px; align-items: center; }
.avatar { width: 33px; height: 33px; border-radius: 50%; background: #36332f; color: #dfcbb4; display: grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 650; }
.user-name { font-size: 12px; max-width: 122px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 10px; color: var(--muted); margin-top: 4px; }
.main { grid-column: 2; min-width: 0; }
.topbar { height: 81px; padding: 0 40px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.topbar .crumb { display: flex; align-items: center; gap: 13px; }
.crumb b { color: #ced1dc; font-weight: 450; }
.topbar-right { display: flex; gap: 20px; align-items: center; }
.mobile-logout { display: none; }
.keyboard { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; color: #70798b; font-size: 10px; }
.content { padding: 38px 40px 55px; max-width: 1760px; margin: 0 auto; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
h1 { font-size: 29px; font-weight: 600; letter-spacing: -.9px; margin: 0 0 9px; }
.subtitle { color: var(--muted); line-height: 1.65; font-size: 12px; margin: 0; }
.actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 37px; border: 1px solid var(--line); background: #1e2129; padding: 9px 14px; border-radius: 8px; font-size: 12px; font-weight: 550; line-height: 1.35; }
.btn:hover { background: #292d37; border-color: #3b424f; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #173321; }
.btn.primary:hover { background: #cdfbda; }
.btn.subtle { background: transparent; }
.btn.danger { color: var(--danger); border-color: #5a363b; background: #2a1f26; }
.btn.small { padding: 7px 10px; min-height: 30px; font-size: 11px; }
.btn svg { width: 15px; height: 15px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid transparent; background: transparent; border-radius: 7px; color: var(--muted); }
.icon-btn:hover { color: #fff; background: #30343e; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 34px; }
.stat { border: 1px solid var(--line); border-radius: 11px; padding: 18px 19px; background: #17191f; position: relative; }
.stat-top { color: #a3a9b8; display: flex; justify-content: space-between; font-size: 11px; align-items: center; }
.stat-top svg { color: #747c8e; width: 17px; }
.stat strong { font-size: 27px; font-weight: 550; letter-spacing: -.9px; display: block; margin: 13px 0 7px; }
.stat small { color: #777f90; font-size: 10px; }
.stat.accent strong { color: var(--accent); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.tabs { display: flex; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); min-width: 0; max-width: 100%; overflow-x: auto; }
.tab { font-size: 12px; padding: 13px 13px 15px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: transparent; white-space: nowrap; flex-shrink: 0; }
.tab.active { border-color: var(--accent); color: #e7ece8; }
.tab .counter { border-radius: 4px; background: #292d35; font-size: 10px; padding: 2px 5px; margin-left: 6px; color: #b9c2c2; }
.search { position: relative; width: 248px; }
.search svg { position: absolute; left: 12px; top: 10px; width: 16px; color: #768092; }
.search input { width: 100%; background: #17191f; border: 1px solid var(--line); border-radius: 7px; padding: 11px 12px 10px 36px; color: #d0d6e1; font-size: 11px; }
.feed-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.feed-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 19px 15px; transition: border-color .18s; min-width: 0; }
.feed-card:hover { border-color: #444b58; }
.feed-card-top { display: flex; align-items: flex-start; gap: 10px; }
.source-icon { display: grid; place-items: center; width: 37px; height: 37px; color: #c7b9ee; background: #302b3c; border: 1px solid #4b3d61; border-radius: 10px; font-size: 12px; font-weight: 650; flex-shrink: 0; }
.source-icon.green { color: #b7d7c0; background: #24372e; border-color: #34523e; }
.feed-title { font-size: 13px; font-weight: 600; margin: 1px 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.feed-card-name { min-width: 0; }
.feed-supplier { font-size: 10px; color: var(--muted); }
.push-right { margin-left: auto; }
.badge { display: inline-flex; gap: 6px; align-items: center; font-size: 9px; line-height: 1.3; font-weight: 600; padding: 4px 7px; border-radius: 5px; background: #2c2d36; color: #c2c6d0; white-space: nowrap; }
.badge.green { color: #acdfbc; background: #263c2e; }
.badge.blue { color: #b7c3f4; background: #293449; }
.badge.red { color: #efa8a8; background: #402a30; }
.badge.gold { color: #deca99; background: #3b3527; }
.source-url { display: flex; gap: 6px; align-items: center; font-size: 10px; color: #6f7889; margin: 22px 0 19px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.source-url svg { width: 12px; height: 12px; }
.feed-meta { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.feed-meta small { display: block; font-size: 9px; color: #778092; margin-bottom: 7px; }
.feed-meta b { font-size: 12px; font-weight: 500; }
.feed-card-footer { border-top: 1px solid var(--line); padding-top: 13px; display: flex; align-items: center; gap: 5px; }
.feed-card-footer .last-time { font-size: 9px; color: #737b8d; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 36px 0 16px; gap: 12px; }
.section-title h2 { font-size: 15px; font-weight: 550; margin: 0; }
.muted { color: var(--muted); }
.table-wrap { border: 1px solid var(--line); border-radius: 11px; overflow: auto; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
th { font-weight: 450; color: #8992a3; font-size: 10px; background: #1a1d24; white-space: nowrap; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #1c2027; }
td .secondary { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; }
.cell-title { font-weight: 500; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.empty { text-align: center; border: 1px dashed #343a44; border-radius: var(--radius); padding: 60px 25px; color: var(--muted); background: #15171c; }
.empty .source-icon { margin: 0 auto 19px; }
.empty h2 { font-size: 17px; color: #e2e5ec; font-weight: 500; }
.empty p { margin: 12px 0 24px; font-size: 12px; line-height: 1.8; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 11px; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.settings-card { display: flex; gap: 15px; border: 1px solid var(--line); padding: 22px; border-radius: 11px; background: var(--panel); }
.settings-card:hover { border-color: #506055; }
.settings-card h3 { margin: 2px 0 8px; font-size: 13px; font-weight: 550; }
.settings-card p { margin: 0; font-size: 11px; line-height: 1.65; color: var(--muted); }
.overlay { position: fixed; inset: 0; background: #080b12bd; backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 36px 20px; overflow: auto; z-index: 100; }
.dialog { width: min(820px,100%); background: #181b22; border: 1px solid #363c49; border-radius: 16px; box-shadow: 0 30px 100px #0007; }
.dialog.wide { width: min(1140px,100%); }
.dialog.narrow { width: min(460px,100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 23px 26px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; font-weight: 550; margin: 0; letter-spacing: -.3px; }
.dialog-body { padding: 25px 26px; }
.dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 26px; border-top: 1px solid var(--line); background: #15181e; border-radius: 0 0 16px 16px; position: sticky; bottom: -36px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.wide, .full { grid-column: 1 / -1; }
.field > label { color: #c7ceda; font-size: 11px; font-weight: 500; }
.field input:not([type=checkbox]), .field textarea, .field select, .control { background: #101319; border: 1px solid #343a46; color: #dce3ee; padding: 10px 11px; border-radius: 7px; width: 100%; min-height: 38px; font-size: 12px; }
.field input::placeholder, .field textarea::placeholder { color: #596375; }
.field textarea { min-height: 91px; resize: vertical; line-height: 1.6; }
.field select[multiple] { min-height: 110px; }
.field small, .help { color: #7e8b9e; line-height: 1.65; font-size: 10px; margin: 0; }
.switch { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #b8c2cf; cursor: pointer; padding: 8px 0; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.field-error { color: #ffb3b3; font-size: 12px; line-height: 1.6; border: 1px solid #6a3843; border-radius: 8px; padding: 12px; background: #35232b; margin-bottom: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.field-error:empty { display: none; }
.form-divider { font-size: 12px; color: #c4d6cc; border-top: 1px solid var(--line); padding-top: 20px; margin: 3px 0 0; font-weight: 550; }
details { border: 1px solid var(--line); padding: 14px; border-radius: 8px; }
summary { cursor: pointer; font-size: 12px; color: #b5bfce; }
details > .form-grid { margin-top: 20px; }
.option-row { display: grid; grid-template-columns: 2fr 1fr 75px 32px; gap: 8px; margin-bottom: 8px; }
.option-row input { min-width: 0; }
.mapping-intro { border: 1px solid #35493b; background: #202d26; padding: 16px 18px; border-radius: 9px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.mapping-intro p { font-size: 11px; line-height: 1.7; margin: 3px 0; color: #a4bbae; }
.mapping-rule { border: 1px solid #343c47; border-radius: 9px; padding: 17px; margin-bottom: 14px; background: #1d212a; }
.rule-top { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.rule-number { font-size: 10px; color: #7c899d; }
.rule-top select { max-width: 200px; }
.rule-grid { display: grid; grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr); gap: 14px; align-items: start; }
.rule-arrow { color: #6f8b79; padding-top: 29px; text-align: center; }
.target-row { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.target-row select { flex: 1; min-width: 0; }
.target-row .part { color: #778799; font-size: 11px; }
.rule-options { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.rule-options .field { max-width: 175px; flex: 1; }
.rule-options .field input, .rule-options .field select { min-height: 30px; padding: 6px 8px; font-size: 11px; }
.sample { max-height: 270px; overflow: auto; margin-top: 15px; }
.sample td { font-size: 10px; max-width: 300px; overflow-wrap: anywhere; }
.history-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 21px; }
.history-list { max-height: 520px; overflow: auto; }
.history-item { display: block; padding: 13px 14px; border-radius: 8px; text-align: left; width: 100%; background: transparent; border: 1px solid transparent; margin-bottom: 7px; }
.history-item.active { background: #27372f; border-color: #3b5743; }
.history-item b { display: block; font-size: 11px; font-weight: 550; margin-bottom: 7px; }
.history-item span { display: block; color: var(--muted); font-size: 10px; line-height: 1.6; }
.diff-table td { max-width: 260px; overflow-wrap: anywhere; vertical-align: top; font-size: 11px; }
.diff-table td:nth-child(2) { color: #d3a7ad; background: #3d242a22; }
.diff-table td:nth-child(3) { color: #b1d5bd; background: #263f2e22; }
.diff-table pre { white-space: pre-wrap; margin: 0; font: inherit; }
.run-metrics { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; margin: 20px 0; }
.run-metric { background: #11161c; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.run-metric b { display: block; font-size: 22px; font-weight: 500; margin-bottom: 7px; }
.run-metric span { color: var(--muted); font-size: 10px; }
.progress { height: 5px; background: #303743; border-radius: 5px; overflow: hidden; }
.progress i { display: block; background: var(--accent); height: 100%; transition: width .5s; width: var(--progress); }
.progress.pending i { width: 30%; animation: drift 1.6s infinite ease-in-out; }
@keyframes drift { from { transform: translateX(-100%); } to { transform: translateX(440%); } }
.run-row { border: 1px solid var(--line); border-radius: 8px; padding: 13px; margin: 10px 0; }
.run-row > summary { display: flex; align-items: center; gap: 10px; }
.run-row table { margin-top: 15px; }
.permission-grid { max-height: 310px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.permission-grid td, .permission-grid th { padding: 9px 10px; text-align: center; }
.permission-grid th:first-child, .permission-grid td:first-child { text-align: left; position: sticky; left: 0; background: #1b2027; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #101318; }
.login-art { border-right: 1px solid var(--line); background: radial-gradient(ellipse at 20% 40%,#30463766,transparent 60%),linear-gradient(145deg,#141e18,#11151d); padding: 55px 65px; display: flex; flex-direction: column; }
.login-art .brand { padding: 0; }
.login-copy { margin: auto 0; max-width: 480px; }
.login-copy h1 { font-size: clamp(32px,3.8vw,56px); font-weight: 500; line-height: 1.15; letter-spacing: -2px; margin: 20px 0; }
.login-copy h1 em { font-style: normal; color: var(--accent); }
.login-copy p { color: #8f9c93; font-size: 14px; line-height: 1.9; max-width: 350px; }
.format-line { display: flex; gap: 9px; margin-top: 36px; flex-wrap: wrap; }
.format-line span { border: 1px solid #3a4a3e; border-radius: 6px; padding: 8px 12px; color: #b8d2bf; font-family: monospace; font-size: 11px; }
.login-art footer { color: #677c6c; font-size: 10px; }
.login-side { display: grid; place-items: center; padding: 40px; }
.login-form { width: min(340px,100%); }
.login-form h2 { font-size: 25px; font-weight: 500; letter-spacing: -.6px; margin: 13px 0 10px; }
.login-form .field { margin-top: 23px; }
.login-form .btn { width: 100%; margin-top: 28px; min-height: 43px; }
.login-form .help { margin-top: 23px; text-align: center; }
.boot { min-height: 70vh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; color: var(--muted); font-size: 12px; }
.spinner { display: inline-block; width: 23px; height: 23px; border: 2px solid #b5f3c52b; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; bottom: 26px; right: 30px; max-width: 430px; padding: 14px 20px; background: #2d4135; color: #d3efdd; border: 1px solid #53725d; border-radius: 10px; box-shadow: 0 8px 40px #0005; z-index: 1000; font-size: 12px; line-height: 1.7; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
#toast.visible { opacity: 1; transform: none; }
@media (min-width: 1600px) { .feed-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 1150px) { .sidebar { width: 205px; } .layout { grid-template-columns: 205px minmax(0,1fr); } .content { padding: 30px 25px; } .topbar { padding: 0 25px; } .feed-grid,.settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .stats { gap: 10px; } .stat { padding: 16px 13px; } .run-metrics { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 760px) { .layout { display: block; } .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; gap: 15px; } .sidebar .brand { display: none; } .sidebar .tiny-label,.sidebar-bottom { display: none; } .nav { flex-direction: row; gap: 4px; overflow: auto; min-width: 0; flex: 1; } .nav a { padding: 10px 6px; font-size: 11px; gap: 5px; } .nav a svg { width: 14px; } .nav a span:last-child { display: none; } .topbar { height: 55px; padding: 0 18px; font-size: 10px; } .keyboard { display: none; } .mobile-logout { display: inline-grid; } .topbar-right { gap: 10px; } .content { padding: 27px 18px; } .page-title { align-items: flex-start; gap: 12px; } h1 { font-size: 24px; } .subtitle { font-size: 11px; } .page-title .actions .btn { font-size: 10px; padding: 8px 10px; } .stats { grid-template-columns: repeat(2,1fr); } .feed-grid,.settings-grid { grid-template-columns: 1fr; } .toolbar { flex-wrap: wrap; } .search { width: 100%; } .tabs { flex: 1; } .overlay { padding: 13px 9px; } .dialog-head,.dialog-body { padding: 20px 17px; } .dialog-foot { padding: 15px 17px; bottom: -13px; flex-wrap: wrap; } .form-grid { grid-template-columns: 1fr; gap: 17px; } .history-layout { grid-template-columns: 1fr; } .history-list { max-height: 150px; } .rule-grid { grid-template-columns: 1fr; } .rule-arrow { display: none; } .mapping-intro { align-items: flex-start; flex-direction: column; } .login-page { grid-template-columns: 1fr; } .login-art { display: none; } .login-side { padding: 28px; min-height: 100vh; } .option-row { grid-template-columns: 1.5fr 1fr 55px 25px; gap: 5px; } .run-metrics { gap: 7px; } .run-metric { padding: 11px; } .run-metric b { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

