:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #6c766f;
  --line: #dfe5df;
  --paper: #f4f6f2;
  --white: #ffffff;
  --green: #1f6b4f;
  --green-soft: #e6f1eb;
  --amber: #9b6716;
  --amber-soft: #fff4d9;
  --shadow: 0 18px 50px rgba(25, 45, 34, 0.09);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
.topbar { height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; color: white; background: var(--ink); border-radius: 10px; font-family: Georgia, serif; font-size: 19px; }
.environment { padding: 7px 12px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.user-chip { justify-self: end; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; }
.user-chip span:last-child { display: grid; }
.user-chip small { color: var(--muted); font-size: 11px; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 90px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 36px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 720px; margin: 0; font: 500 clamp(42px, 6vw, 70px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.intro > div > p:last-child { margin: 20px 0 0; color: var(--muted); font-size: 17px; }
.safety { min-width: 300px; padding: 17px 18px; display: flex; align-items: center; gap: 12px; border: 1px solid #cfe1d5; border-radius: 14px; background: var(--green-soft); }
.safety span:last-child { display: grid; }
.safety small { color: #587064; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #2c8b64; box-shadow: 0 0 0 6px rgba(44,139,100,.12); }
.metrics { margin: 48px 0 66px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 9px 30px rgba(25,45,34,.04); }
.metrics article { min-height: 134px; padding: 23px 26px; display: grid; align-content: center; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.metrics strong { margin: 4px 0 0; font: 500 34px/1.1 Georgia, serif; }
.metrics small { margin-top: 7px; color: var(--muted); }
.section-heading { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; }
.section-heading h2 { margin: 0; font: 500 31px/1.2 Georgia, serif; }
.section-heading > p { margin: 0; color: var(--muted); }
.app-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.app-card { min-height: 355px; padding: 26px 28px 0; display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.app-card:hover { transform: translateY(-3px); border-color: #aebdb3; }
.app-card-top { display: flex; justify-content: space-between; align-items: start; }
.app-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: #e9eff7; color: #36536f; font: 700 15px Georgia, serif; }
.npt .app-icon { color: #8a5b16; background: #fff0d0; }
.status { padding: 7px 10px; display: flex; align-items: center; gap: 7px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ready { color: var(--green); background: var(--green-soft); }
.status.testing { color: var(--amber); background: var(--amber-soft); }
.app-card h3 { margin: 30px 0 7px; font: 500 28px/1.15 Georgia, serif; }
.app-card p { max-width: 370px; margin: 0; color: var(--muted); }
.app-card dl { margin: 28px 0 20px; padding: 18px 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.app-card dl div { display: grid; }
.app-card dt { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.app-card dd { margin: 4px 0 0; font-weight: 680; }
.app-card footer { margin: 0 -28px; padding: 18px 28px; display: flex; justify-content: space-between; background: #f9faf8; border-top: 1px solid var(--line); font-weight: 720; }
.app-card footer b { color: var(--green); font-size: 18px; }

@media (max-width: 780px) {
  .topbar { grid-template-columns: 1fr auto; }
  .environment { display: none; }
  .shell { width: min(100% - 30px, 600px); padding-top: 45px; }
  .intro { display: block; }
  .safety { margin-top: 30px; min-width: 0; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { min-height: 100px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics article:last-child { border-bottom: 0; }
  .section-heading > p { display: none; }
  .app-grid { grid-template-columns: 1fr; }
}

.top-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.top-actions form { margin: 0; }
.nav-link, .link-button { color: var(--muted); font: 650 12px/1 inherit; }
.link-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.nav-link:hover, .link-button:hover { color: var(--ink); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1fr) minmax(380px, .78fr); background: var(--white); }
.login-panel { width: min(560px, calc(100% - 64px)); margin: auto; padding: 55px 0; }
.login-brand { margin-bottom: clamp(55px, 9vh, 105px); display: flex; align-items: center; gap: 12px; font-weight: 760; }
.login-panel h1 { max-width: 620px; font-size: clamp(42px, 5vw, 67px); }
.login-copy { max-width: 530px; margin: 22px 0 34px; color: var(--muted); font-size: 17px; }
.login-form, .upload-form { display: grid; gap: 17px; }
label { display: grid; gap: 7px; }
label > span, legend { color: #49534d; font-size: 12px; font-weight: 720; }
label em { color: var(--muted); font-weight: 500; }
input, select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #ced6cf; border-radius: 10px; color: var(--ink); background: var(--white); font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,107,79,.11); }
.primary-button, .secondary-button, .danger-link { min-height: 48px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; font: 760 13px/1 inherit; cursor: pointer; }
.primary-button { color: white; background: var(--ink); }
.primary-button:hover { background: #28372e; }
.primary-button:disabled { opacity: .55; cursor: not-allowed; }
.secondary-button { color: var(--green); border: 1px solid #bfd4c6; background: var(--green-soft); }
.danger-link { color: #9d3830; border: 1px solid #eccdca; background: #fff2f1; }
.wide { width: 100%; }
.login-footnote { color: var(--muted); font-size: 12px; text-align: center; }
.login-aside { padding: clamp(50px, 9vw, 120px); display: grid; align-content: center; gap: 56px; color: #edf4ef; background: #15261e; }
.login-aside > div { max-width: 380px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); }
.login-aside h2 { margin: 8px 0 7px; font: 500 31px Georgia, serif; }
.login-aside p { margin: 0; color: #aebdb4; }
.aside-number { color: #7eb294; font-size: 11px; letter-spacing: .14em; }
.app-shell { padding-top: 40px; }
.back-link { display: inline-block; margin-bottom: 42px; color: var(--muted); font-weight: 680; }
.app-hero, .deployment-hero { margin-bottom: 46px; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.app-hero h1, .deployment-hero h1 { font-size: clamp(42px, 5vw, 64px); }
.app-hero > div > p:last-child, .deployment-hero > div > p:last-child { max-width: 650px; margin: 15px 0 0; color: var(--muted); font-size: 17px; }
.hero-links { display: grid; gap: 8px; }
.hero-links a { min-width: 190px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.release-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 22px; align-items: start; }
.upload-card, .environment-card, .release-actions, .log-card { border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 10px 32px rgba(25,45,34,.05); }
.upload-card { padding: 32px; }
.upload-card h2, .release-actions h2 { margin: 7px 0 10px; font: 500 28px Georgia, serif; }
.upload-card > p, .release-actions > p { margin: 0 0 26px; color: var(--muted); }
.number-label { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.drop-zone { min-height: 180px; padding: 24px; place-items: center; align-content: center; border: 1px dashed #aebeb2; border-radius: 12px; background: #f7faf7; cursor: pointer; text-align: center; }
.drop-zone:hover { border-color: var(--green); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.drop-zone small { color: var(--muted); }
.drop-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 850; }
.environment-card { padding: 27px; }
.environment-card h3 { margin: 5px 0 9px; font: 500 25px Georgia, serif; }
.environment-card > p:not(.eyebrow) { color: var(--muted); }
.environment-card form { margin-top: 12px; }
.environment-row { padding: 17px 0; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); font-size: 12px; }
.environment-row span { display: flex; align-items: center; gap: 8px; }
.environment-row + .secondary-button { margin-top: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }.dot.green { background: #2a8a62; }.dot.amber { background: #ca8a24; }
.history-section { margin-top: 58px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #f8faf7; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td { font-size: 13px; }
td small, td > strong + small, .release-link small { display: block; margin-top: 2px; color: var(--muted); }
.table-action { color: var(--green); font-weight: 750; }
.button-reset { padding: 0; border: 0; background: transparent; cursor: pointer; }
.muted-text { color: var(--muted); font-size: 12px; }
.empty-row { padding: 34px; color: var(--muted); text-align: center; }
.deployment-hero .status.large { flex: 0 0 auto; padding: 10px 13px; }
.release-detail-grid { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.45fr); gap: 22px; align-items: start; }
.release-actions { padding: 30px; }
.release-actions > a, .release-actions > form { margin-top: 12px; }
.release-meta { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.release-meta div { padding: 8px 0; display: flex; justify-content: space-between; gap: 10px; }
.release-meta dt { color: var(--muted); }.release-meta dd { margin: 0; font-weight: 700; text-align: right; }
.log-card { overflow: hidden; background: #132019; }
.log-header { height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; color: #dce8df; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 12px; }
.log-header i { width: 7px; height: 7px; margin-right: 8px; display: inline-block; border-radius: 50%; background: #64c18f; }
.log-header button { color: #9fb1a5; border: 0; background: transparent; cursor: pointer; }
.log-card pre { height: 520px; margin: 0; padding: 20px; overflow: auto; color: #c6d5cb; background: transparent; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.progress-line { height: 6px; overflow: hidden; border-radius: 6px; background: #e7ece8; }
.progress-line span { width: 42%; height: 100%; display: block; border-radius: inherit; background: var(--green); animation: progress 1.5s ease-in-out infinite alternate; }
@keyframes progress { from { transform: translateX(-55%); } to { transform: translateX(180%); } }
.alert { margin: 0 0 25px; padding: 14px 16px; border-radius: 10px; }
.alert.error { display: grid; color: #833a34; border: 1px solid #efcbc7; background: #fff1ef; }
fieldset { margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.check-row { padding: 9px 0; display: flex; align-items: center; gap: 10px; }
.check-row input { width: 17px; min-height: 17px; }
.check-row span { display: grid; }.check-row small { color: var(--muted); }

@media (max-width: 900px) {
  .user-chip span:last-child, .nav-link { display: none; }
  .release-layout, .release-detail-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; padding: 0 15px; }
  .brand > span:last-child { display: none; }
  .app-hero, .deployment-hero { display: block; }
  .hero-links, .deployment-hero > .status { margin-top: 22px; }
  .upload-card, .release-actions { padding: 23px; }
  .login-panel { width: min(100% - 36px, 520px); }
}
