:root {
  --ink: #16231d;
  --ink-soft: #35433c;
  --muted: #69766f;
  --muted-light: #8d9892;
  --line: #dfe6e2;
  --line-strong: #ced8d2;
  --panel: #ffffff;
  --canvas: #f4f7f5;
  --surface: #f8faf9;
  --green: #176b47;
  --green-hover: #0f5839;
  --green-soft: #e8f4ed;
  --lime: #b9e767;
  --amber: #94601e;
  --amber-soft: #fff4df;
  --red: #a03e36;
  --red-soft: #fcedeb;
  --navy: #10251d;
  --shadow-sm: 0 1px 2px rgba(20, 42, 31, .04), 0 5px 18px rgba(20, 42, 31, .04);
  --shadow-lg: 0 28px 80px rgba(11, 35, 25, .14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(23, 107, 71, .22);
  outline-offset: 2px;
}
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 15px; font-weight: 780; letter-spacing: -.015em; text-decoration: none; }
.brand-light { color: #f5fff9; }
.brand-mark { display: inline-flex; align-items: flex-end; justify-content: center; gap: 2px; width: 31px; height: 31px; padding: 7px; border-radius: 9px; background: var(--green); }
.brand-mark i { display: block; width: 3px; border-radius: 3px; background: var(--lime); }
.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 11px; }
.brand-light .brand-mark { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.eyebrow-light { color: var(--lime); }

/* Sign in */
.login-active { background: #fff; }
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(410px, 46%) 1fr; background: #fff; }
.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: clamp(36px, 5vw, 70px);
  flex-direction: column;
  overflow: hidden;
  color: #d5e4dc;
  background:
    radial-gradient(circle at 90% 15%, rgba(185, 231, 103, .12), transparent 28%),
    radial-gradient(circle at 10% 100%, rgba(87, 159, 122, .15), transparent 35%),
    var(--navy);
}
.login-story::after {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -260px;
  bottom: 14%;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.018), 0 0 0 140px rgba(255,255,255,.012);
  content: "";
}
.login-story-copy { position: relative; z-index: 1; max-width: 590px; margin: auto 0 48px; }
.login-story-copy h1 { margin: 0; max-width: 570px; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 4.5vw, 68px); font-weight: 400; line-height: .99; letter-spacing: -.045em; }
.login-story-copy > p:last-child { max-width: 500px; margin: 24px 0 0; color: #a9bdb3; font-size: 17px; line-height: 1.65; }
.login-preview { position: relative; z-index: 1; width: min(520px, 100%); margin-bottom: auto; padding: 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(255,255,255,.065); box-shadow: 0 20px 60px rgba(0,0,0,.16); backdrop-filter: blur(8px); }
.preview-top { display: flex; gap: 5px; padding: 3px 3px 12px; }
.preview-top span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.27); }
.preview-job { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px; border-radius: 11px; background: rgba(255,255,255,.09); }
.preview-job + .preview-job { margin-top: 7px; }
.preview-job-muted { opacity: .62; }
.preview-status { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(185,231,103,.12); }
.preview-job div { min-width: 0; }
.preview-job strong, .preview-job small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-job strong { color: #f7fcf9; font-size: 12px; font-weight: 650; }
.preview-job small { margin-top: 5px; color: #8eaaa0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.preview-pill { padding: 5px 8px; border-radius: 20px; color: var(--lime); background: rgba(185,231,103,.1); font-size: 9px; font-weight: 750; }
.login-story-foot { position: absolute; left: clamp(36px, 5vw, 70px); bottom: 24px; margin: 0; color: #708a7f; font-size: 11px; }
.login-main { display: grid; min-height: 100vh; place-items: center; padding: 42px; }
.login-card { width: min(420px, 100%); }
.login-mobile-brand { display: none; }
.login-card h2 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 36px; font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
.login-intro { margin: 12px 0 32px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.login-error { margin: -12px 0 20px; padding: 12px 14px; border: 1px solid #f2cbc7; border-radius: var(--radius-sm); color: var(--red); background: var(--red-soft); font-size: 12px; line-height: 1.45; }
.field { display: grid; gap: 8px; margin: 18px 0; }
.field > span:first-child { color: var(--ink-soft); font-size: 12px; font-weight: 720; }
.field input, .field select, .filter select {
  width: 100%;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:hover, .field select:hover, .filter select:hover { border-color: #aebdb4; }
.field input:focus, .field select:focus, .filter select:focus { border-color: #75a58c; box-shadow: 0 0 0 3px rgba(23,107,71,.09); }
.input-shell { position: relative; display: flex; align-items: center; }
.input-shell > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted-light); pointer-events: none; }
.input-shell input { padding-left: 42px; }
.input-shell input[type="password"], .input-shell input[type="text"] { padding-right: 62px; }
.password-toggle { position: absolute; right: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: 7px; color: var(--green); background: transparent; font-size: 11px; font-weight: 740; cursor: pointer; }
.password-toggle:hover { background: var(--green-soft); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; font-weight: 720; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.button:disabled { opacity: .58; cursor: wait; }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 8px 22px rgba(23,107,71,.16); }
.button-primary:hover:not(:disabled) { background: var(--green-hover); transform: translateY(-1px); }
.button-secondary { border-color: var(--line-strong); background: #fff; }
.button-secondary:hover:not(:disabled) { border-color: #afbeb5; background: var(--surface); }
.button-danger { color: #fff; background: var(--red); box-shadow: 0 8px 22px rgba(160,62,54,.14); }
.button-danger:hover:not(:disabled) { background: #85342e; transform: translateY(-1px); }
.button-danger-outline { border-color: #e6b9b5; color: var(--red); background: #fff; }
.button-danger-outline:hover:not(:disabled) { border-color: #d78d87; background: var(--red-soft); }
.login-submit { width: 100%; min-height: 50px; margin-top: 8px; justify-content: space-between; padding: 0 18px; }
.secure-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 22px; color: var(--muted-light); font-size: 10px; line-height: 1.5; }
.secure-note svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--green); }

/* Application */
.app-header { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid rgba(210,220,214,.85); background: rgba(255,255,255,.88); backdrop-filter: blur(16px); }
.app-header-inner { display: flex; width: min(1220px, calc(100% - 48px)); min-height: 68px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 24px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.connection { display: inline-flex; align-items: center; gap: 7px; margin-right: 8px; color: var(--muted); font-size: 11px; font-weight: 640; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: #39a96b; box-shadow: 0 0 0 3px #e5f5ec; }
.icon-text-button { display: inline-flex; min-height: 36px; padding: 0 11px; border: 0; border-radius: 8px; align-items: center; gap: 7px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 680; cursor: pointer; }
.icon-text-button:hover { color: var(--ink); background: var(--surface); }
.icon-text-button svg { width: 16px; height: 16px; }
.icon-text-button.is-loading svg { animation: spin .8s linear infinite; }
.user-menu { display: flex; min-height: 38px; margin-left: 5px; padding-left: 12px; border-left: 1px solid var(--line); align-items: center; gap: 8px; }
.avatar { display: inline-grid; width: 28px; height: 28px; border-radius: 50%; place-items: center; color: #fff; background: var(--navy); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.user-name { max-width: 110px; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { padding: 6px 8px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 650; cursor: pointer; }
.logout-button:hover { color: var(--red); background: var(--red-soft); }
.shell { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 80px; }
.page-heading { display: flex; margin-bottom: 30px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading h1 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 4vw, 52px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.subtitle { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.updated-badge { display: grid; min-width: 110px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.62); text-align: right; }
.updated-badge span { color: var(--muted-light); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.updated-badge strong { margin-top: 2px; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card { display: flex; min-height: 92px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); align-items: center; gap: 15px; background: rgba(255,255,255,.72); box-shadow: var(--shadow-sm); }
.stat-card > span:last-child { display: grid; gap: 2px; }
.stat-icon { display: inline-grid; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; place-items: center; font-size: 13px; font-weight: 800; }
.stat-icon-all { color: #496159; background: #edf1ef; }
.stat-icon-running { color: var(--green); background: var(--green-soft); font-size: 10px; }
.stat-icon-paused { color: var(--amber); background: var(--amber-soft); }
.stat-icon-sources { color: #526a9a; background: #ecf0f9; font-size: 20px; }
.stat-label { color: var(--muted); font-size: 10px; font-weight: 680; }
.stat-card strong { font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 500; line-height: 1; }
.jobs-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; min-height: 92px; padding: 20px 22px; border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; gap: 24px; }
.panel-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; letter-spacing: -.025em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.toolbar { display: flex; gap: 8px; }
.search { display: flex; width: min(270px, 26vw); min-height: 40px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); align-items: center; gap: 8px; color: var(--muted-light); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.search:hover { border-color: #afbeb5; }
.search:focus-within { border-color: #75a58c; box-shadow: 0 0 0 3px rgba(23,107,71,.09); background: #fff; }
.search svg { flex: 0 0 auto; width: 16px; height: 16px; }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search input::placeholder { color: var(--muted-light); }
.filter select { min-height: 40px; width: 138px; padding: 0 32px 0 11px; font-size: 11px; }
#category-filter { width: 164px; }
#type-filter { width: 142px; }
.job-list { padding: 0 22px; }
.job-card { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(215px, 280px) 142px; min-height: 132px; border-bottom: 1px solid var(--line); border-radius: 10px; align-items: center; gap: 28px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.job-card:hover { background: #fbfdfc; box-shadow: inset 3px 0 0 #c4dccf; }
.job-card:focus-visible { outline: 3px solid rgba(23, 107, 71, .18); outline-offset: -3px; }
.job-card:last-child { border-bottom: 0; }
.job-card-paused { background: linear-gradient(90deg, transparent, rgba(255,247,230,.24), transparent); }
.job-identity { min-width: 0; padding: 20px 0; }
.job-title-row { display: flex; min-width: 0; align-items: center; gap: 11px; }
.job-title { display: inline-flex; min-width: 0; max-width: min(440px, 100%); margin: 0; padding: 3px 4px 3px 0; border: 0; border-radius: 5px; align-items: center; gap: 6px; overflow: hidden; color: var(--ink); background: transparent; font-size: 13px; font-weight: 760; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.job-title svg { flex: 0 0 auto; width: 13px; height: 13px; opacity: 0; color: var(--green); transition: opacity .15s; }
.job-title:hover { color: var(--green); }
.job-title:hover svg, .job-title:focus-visible svg { opacity: 1; }
.job-title-empty { color: var(--muted); font-style: italic; font-weight: 590; }
.job-title-readonly { cursor: default; }
.job-title-readonly:hover { color: var(--ink); }
.status { display: inline-flex; flex: 0 0 auto; padding: 4px 7px; border-radius: 20px; align-items: center; gap: 5px; font-size: 9px; font-weight: 760; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-running { color: var(--green); background: var(--green-soft); }
.status-paused { color: var(--amber); background: var(--amber-soft); }
.category-badge { display: inline-flex; flex: 0 0 auto; padding: 4px 7px; border-radius: 20px; font-size: 9px; font-weight: 760; }
.category-business { color: #5a4392; background: #f0ebfb; }
.category-server { color: #526277; background: #edf1f5; }
.job-meta { display: flex; min-width: 0; margin-top: 9px; gap: 14px; color: var(--muted); font-size: 9px; }
.job-meta span { display: flex; min-width: 0; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta b { color: var(--muted-light); font-weight: 600; }
.command-details { margin-top: 10px; }
.command-details summary { width: max-content; border-radius: 4px; color: var(--muted-light); font-size: 9px; font-weight: 650; cursor: pointer; list-style-position: inside; }
.command-details[open] summary { margin-bottom: 8px; color: var(--green); }
.command-details code { display: block; max-width: 100%; padding: 8px 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: var(--surface); font-size: 9px; line-height: 1.5; }
.schedule-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; min-height: 66px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; align-items: center; gap: 10px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.schedule-card:hover { border-color: #b7c8be; background: var(--green-soft); transform: translateY(-1px); }
.schedule-card-readonly { cursor: default; background: #f7f8fb; }
.schedule-card-readonly:hover { border-color: var(--line); background: #f7f8fb; transform: none; }
.schedule-icon { display: grid; width: 31px; height: 31px; border-radius: 9px; place-items: center; color: var(--green); background: #fff; box-shadow: 0 1px 5px rgba(28,51,39,.08); }
.schedule-icon svg { width: 16px; height: 16px; }
.schedule-card > span:nth-child(2) { min-width: 0; }
.schedule-card small, .schedule-card code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-card small { margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 650; }
.schedule-card code { font-size: 10px; font-weight: 650; }
.schedule-edit { width: 13px; height: 13px; color: var(--muted-light); }
.job-actions { display: grid; justify-items: end; gap: 8px; text-align: right; }
.details-button { padding: 3px 2px; border: 0; border-radius: 4px; color: var(--green); background: transparent; font-size: 9px; font-weight: 720; cursor: pointer; }
.details-button:hover { text-decoration: underline; }
.button-action { min-height: 38px; width: 122px; padding: 0 10px; font-size: 10px; }
.button-pause { border-color: #e8d9bc; color: var(--amber); background: #fff; }
.button-pause:hover:not(:disabled) { background: var(--amber-soft); }
.button-resume { color: #fff; background: var(--green); }
.button-resume:hover:not(:disabled) { background: var(--green-hover); }
.action-icon { font-size: 9px; font-weight: 850; }
.read-only-badge { display: inline-flex; min-height: 32px; padding: 0 10px; border: 1px solid #d9dee8; border-radius: 8px; align-items: center; color: #64708a; background: #f4f6fa; font-size: 9px; font-weight: 720; }
.panel-footer { display: flex; min-height: 47px; padding: 0 22px; border-top: 1px solid var(--line); align-items: center; justify-content: flex-end; background: var(--surface); }
.backup-note { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.backup-note svg { width: 14px; height: 14px; color: var(--green); }
.source-errors { padding: 13px 22px; border-bottom: 1px solid #f0c8c4; color: var(--red); background: var(--red-soft); font-size: 10px; }
.source-errors p { display: grid; grid-template-columns: minmax(100px, 180px) 1fr; margin: 4px 0; gap: 12px; }
.source-errors span { color: #875d58; }
.empty { padding: 70px 24px 78px; text-align: center; }
.empty-icon { display: grid; width: 50px; height: 50px; margin: 0 auto 15px; border-radius: 15px; place-items: center; color: var(--green); background: var(--green-soft); font-size: 23px; }
.empty h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.empty p { max-width: 390px; margin: 7px auto 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.skeleton-card { display: grid; grid-template-columns: 26px 38% 1fr; min-height: 108px; border-bottom: 1px solid var(--line); align-items: center; gap: 14px; }
.skeleton-card i, .skeleton-card span { display: block; height: 11px; border-radius: 7px; background: linear-gradient(90deg, #edf1ef 25%, #f7f9f8 50%, #edf1ef 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skeleton-card i { width: 10px; height: 10px; border-radius: 50%; }
.skeleton-card span:last-child { justify-self: end; width: 180px; height: 54px; border-radius: 12px; }

/* Feedback and dialogs */
.toast { position: fixed; z-index: 100; display: grid; grid-template-columns: auto minmax(0,1fr) auto; top: 86px; right: 22px; width: min(380px, calc(100% - 32px)); min-height: 54px; padding: 11px 11px 11px 14px; border: 1px solid; border-radius: 13px; align-items: center; gap: 10px; background: #fff; box-shadow: 0 16px 45px rgba(16,37,29,.15); animation: toast-in .2s ease-out; font-size: 11px; font-weight: 650; }
.toast-icon { width: 8px; height: 8px; border-radius: 50%; }
.toast-success { border-color: #b9dcc8; color: var(--green); }
.toast-success .toast-icon { background: #32a166; box-shadow: 0 0 0 4px var(--green-soft); }
.toast-error { border-color: #efc3bf; color: var(--red); }
.toast-error .toast-icon { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.toast button { width: 30px; height: 30px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 18px; cursor: pointer; }
.toast button:hover { background: var(--surface); }
dialog { width: min(550px, calc(100% - 28px)); padding: 0; border: 1px solid rgba(255,255,255,.6); border-radius: 20px; color: var(--ink); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(9, 24, 17, .58); backdrop-filter: blur(4px); }
dialog form { padding: 28px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; letter-spacing: -.035em; }
.dialog-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.icon-button { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 21px; cursor: pointer; }
.icon-button:hover { color: var(--ink); background: #edf2ef; }
.dialog-job-context { display: grid; gap: 5px; margin: 23px 0; padding: 12px 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.dialog-job-context span { font-size: 11px; font-weight: 720; }
.dialog-job-context code { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
dialog .field { margin: 16px 0; }
.details-dialog { width: min(700px, calc(100% - 28px)); }
.details-dialog .dialog-heading p:last-child { max-width: 560px; font-size: 12px; line-height: 1.55; }
.details-summary { display: flex; margin-top: 22px; gap: 8px; }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.details-grid > div { min-width: 0; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.details-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.details-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
.details-grid dt { margin-bottom: 5px; color: var(--muted-light); font-size: 9px; font-weight: 730; letter-spacing: .04em; text-transform: uppercase; }
.details-grid dd { margin: 0; overflow-wrap: anywhere; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.details-grid .detail-code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.details-command { display: grid; gap: 7px; }
.details-command span { color: var(--muted-light); font-size: 9px; font-weight: 730; letter-spacing: .04em; text-transform: uppercase; }
.details-command code { display: block; max-height: 150px; padding: 13px 14px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: var(--surface); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.danger-zone { display: flex; margin-top: 22px; padding: 14px; border: 1px solid #edc5c1; border-radius: 12px; align-items: center; justify-content: space-between; gap: 18px; background: #fffafa; }
.danger-zone > div { display: grid; gap: 4px; }
.danger-zone strong { color: var(--red); font-size: 11px; }
.danger-zone span { color: #875d58; font-size: 9px; line-height: 1.45; }
.eyebrow-danger { color: var(--red); }
.delete-dialog { width: min(590px, calc(100% - 28px)); }
.delete-dialog .dialog-job-context { border-color: #efd2cf; background: #fffafa; }
#delete-confirmation { font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
.field small { color: var(--muted-light); font-size: 9px; }
#schedule-help { display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 8px; text-align: center; }
.code-input { font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: .02em; }
.dialog-actions { display: flex; margin-top: 25px; justify-content: flex-end; gap: 9px; }
.form-error { margin: 12px 0; padding: 11px 12px; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: 10px; line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 980px) {
  .login-view { grid-template-columns: minmax(360px, 42%) 1fr; }
  .login-story { padding: 42px; }
  .login-story-copy h1 { font-size: 48px; }
  .login-story-foot { left: 42px; }
  .job-card { grid-template-columns: minmax(220px, 1fr) 220px 116px; gap: 18px; }
  .button-action { width: 108px; }
}

@media (max-width: 760px) {
  .login-view { display: block; background: linear-gradient(180deg, var(--canvas), #fff 45%); }
  .login-story { display: none; }
  .login-main { min-height: 100svh; padding: 30px 22px; }
  .login-mobile-brand { display: inline-flex; margin-bottom: 70px; }
  .app-header-inner, .shell { width: min(100% - 28px, 1220px); }
  .connection, .user-name, .icon-text-button span { display: none; }
  .user-menu { padding-left: 8px; }
  .shell { padding: 34px 0 55px; }
  .page-heading { align-items: flex-start; }
  .updated-badge { min-width: 90px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .panel-heading { display: grid; }
  .toolbar { width: 100%; }
  .toolbar { flex-wrap: wrap; }
  .search { width: 100%; }
  .job-card { grid-template-columns: minmax(0, 1fr) 108px; gap: 12px; padding: 20px 0; }
  .job-identity { grid-column: 1 / -1; padding: 0; }
  .schedule-card { min-height: 58px; }
  .job-actions { text-align: right; }
  .button-action { width: 100%; min-height: 58px; display: grid; align-content: center; gap: 3px; }
}

@media (max-width: 500px) {
  .login-mobile-brand { margin-bottom: 55px; }
  .login-card h2 { font-size: 32px; }
  .app-header-inner { min-height: 62px; }
  .logout-button { padding-left: 4px; padding-right: 4px; }
  .page-heading { display: block; }
  .updated-badge { display: inline-flex; margin-top: 16px; align-items: center; gap: 6px; text-align: left; }
  .updated-badge strong { margin: 0; }
  .subtitle { line-height: 1.5; }
  .stats { gap: 8px; }
  .stat-card { min-height: 78px; padding: 13px; gap: 11px; }
  .stat-icon { width: 34px; height: 34px; }
  .jobs-panel { border-radius: 18px; }
  .panel-heading { padding: 18px 16px; gap: 16px; }
  .toolbar { display: grid; grid-template-columns: minmax(0,1fr) 120px 138px; }
  .search { grid-column: 1 / -1; }
  .filter select { width: 120px; }
  #category-filter { width: 138px; }
  #type-filter { width: 126px; }
  .job-list { padding: 0 16px; }
  .job-title-row { align-items: flex-start; }
  .status { margin-top: 1px; }
  .job-meta { flex-wrap: wrap; gap: 7px 12px; }
  .job-card { grid-template-columns: minmax(0, 1fr) 96px; }
  .schedule-card { padding: 10px; gap: 8px; }
  .schedule-icon { display: none; }
  .schedule-edit { width: 12px; }
  .button-action { font-size: 9px; }
  .panel-footer { padding: 0 16px; }
  dialog form { padding: 22px 18px; }
  .details-grid { grid-template-columns: 1fr; }
  .details-grid > div:nth-child(odd) { border-right: 0; }
  .details-grid > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .details-grid > div:last-child { border-bottom: 0; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .danger-zone .button { width: 100%; }
  .dialog-heading h2 { font-size: 27px; }
  .dialog-actions .button { flex: 1; padding: 0 10px; }
  .toast { top: 74px; right: 16px; }
}

@media (max-width: 410px) {
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .filter select, #type-filter, #category-filter { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
