:root {
  --ink: #17212b;
  --muted: #65717e;
  --paper: #f5f7f8;
  --surface: #ffffff;
  --line: #dbe1e5;
  --brand: #176b5b;
  --brand-dark: #105247;
  --brand-soft: #e5f3ef;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow: 0 12px 34px rgba(20, 37, 49, 0.08);
}

html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 0%, rgba(23, 107, 91, 0.1), transparent 28rem), var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.app-header { background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.app-header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.app-brand { color: var(--ink); display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 750; text-decoration: none; letter-spacing: -0.02em; }
.brand-symbol, .brand-mark { display: inline-grid; place-items: center; color: white; background: var(--brand); font-weight: 800; letter-spacing: -0.05em; }
.brand-symbol { width: 36px; height: 36px; border-radius: 10px; }
.brand-mark { width: 54px; height: 54px; border-radius: 15px; margin-bottom: 1.4rem; }
.account-area { display: flex; align-items: center; gap: 0.85rem; }
.account-name { color: var(--muted); font-size: 0.92rem; }
.app-main { min-height: calc(100vh - 145px); padding-top: 3rem; padding-bottom: 4rem; }
.app-footer { color: var(--muted); padding: 1.2rem 0 2rem; font-size: 0.86rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page-heading h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); line-height: 0.96; letter-spacing: -0.055em; margin-bottom: 0.8rem; }
.repository-heading h1 { font-size: clamp(2rem, 4vw, 3.3rem); overflow-wrap: anywhere; }
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.76rem; font-weight: 800; margin-bottom: 0.8rem; }
.repository-count { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); }
.repository-count strong { color: var(--ink); font-size: 2.1rem; line-height: 1; }
.repository-count span { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.filter-bar { max-width: 620px; margin-bottom: 1.25rem; }
.filter-bar .form-control { border-radius: 14px; padding: 0.85rem 1rem; border-color: var(--line); box-shadow: none; }
.filter-bar .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 0.2rem rgba(23, 107, 91, 0.13); }
.repository-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.repository-card { min-height: 92px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; text-decoration: none; box-shadow: 0 3px 12px rgba(20, 37, 49, 0.03); transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; }
.repository-card:hover { color: var(--ink); transform: translateY(-2px); border-color: #a8c8c0; box-shadow: var(--shadow); }
.repository-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--brand); background: var(--brand-soft); }
.repository-content { min-width: 0; display: flex; align-items: flex-start; flex-direction: column; gap: 0.42rem; }
.repository-name { font-weight: 700; overflow-wrap: anywhere; }
.repository-status { color: var(--muted); font-size: 0.78rem; line-height: 1; }
.repository-status-empty { color: var(--danger); background: var(--danger-soft); border: 1px solid #efb9b3; border-radius: 999px; padding: 0.3rem 0.55rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; }
.repository-arrow { color: var(--muted); font-size: 1.3rem; }
.empty-repository-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; color: #714b00; background: #fff8df; border: 1px solid #ead18a; border-radius: 14px; padding: 0.85rem 1rem; margin-bottom: 1.25rem; font-size: 0.9rem; }
.empty-repository-notice > span { width: 1.45rem; height: 1.45rem; display: inline-grid; place-items: center; color: white; background: #a46b00; border-radius: 50%; font-weight: 800; }
.breadcrumb-line { display: flex; gap: 0.55rem; color: var(--muted); font-size: 0.9rem; margin-bottom: 2.2rem; }
.breadcrumb-line a { text-decoration: none; }
.version-list { display: grid; gap: 1rem; }
.version-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 3px 12px rgba(20, 37, 49, 0.03); }
.version-main { padding: 1.35rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.tag-item { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid #b9d8d0; border-radius: 999px; background: var(--brand-soft); }
.tag-pill { color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 0.34rem 0.72rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; font-weight: 700; }
.copy-reference { display: inline-flex; align-items: center; gap: 0.3rem; align-self: stretch; color: var(--brand-dark); background: rgba(255, 255, 255, 0.55); border: 0; border-left: 1px solid #b9d8d0; padding: 0.25rem 0.62rem; font-size: 0.76rem; font-weight: 700; cursor: pointer; }
.copy-reference:hover, .copy-reference:focus-visible { color: white; background: var(--brand); outline: none; }
.copy-reference.is-copied { color: white; background: var(--brand); }
.copy-reference.is-error { color: white; background: var(--danger); }
.copy-icon { font-size: 1rem; line-height: 1; }
.version-meta { display: grid; grid-template-columns: minmax(240px, 1.8fr) 1fr 1fr; gap: 1rem; margin: 0; }
.version-meta div { min-width: 0; }
.version-meta dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.version-meta dd { margin: 0; overflow-wrap: anywhere; }
.version-meta code { color: var(--ink); }
.danger-disclosure { border-top: 1px solid var(--line); }
.danger-disclosure summary { color: var(--danger); cursor: pointer; padding: 0.85rem 1.35rem; font-weight: 700; list-style-position: inside; }
.danger-disclosure[open] summary { background: var(--danger-soft); }
.danger-panel { padding: 1.2rem 1.35rem 1.35rem; background: var(--danger-soft); border-top: 1px solid #f5cbc5; }
.danger-panel p { max-width: 760px; }
.delete-repository-zone { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; margin-top: 3rem; padding: 1.5rem; border: 1px solid #efb9b3; border-radius: 18px; background: var(--surface); }
.delete-repository-zone h2 { font-size: 1.35rem; }
.danger-disclosure-wide { align-self: start; border: 1px solid #efb9b3; border-radius: 12px; overflow: hidden; }
.empty-state { text-align: center; background: var(--surface); border: 1px dashed #b9c4cb; border-radius: 20px; padding: 4rem 1.5rem; }
.empty-state h2 { font-size: 1.4rem; }
.empty-state p, .empty-filter { color: var(--muted); }
.empty-icon { color: var(--brand); font-size: 2rem; margin-bottom: 0.8rem; }
.login-shell { min-height: calc(100vh - 250px); display: grid; place-items: center; padding: 2rem 0; }
.login-card { width: min(100%, 460px); padding: clamp(1.5rem, 5vw, 3rem); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.login-card h1 { letter-spacing: -0.04em; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); }
.btn-danger { --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger); }

@media (max-width: 767px) {
  .app-main { padding-top: 2rem; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .repository-count { align-items: flex-start; }
  .version-meta { grid-template-columns: 1fr; }
  .delete-repository-zone { grid-template-columns: 1fr; }
  .account-name { display: none; }
}
