:root {
  color-scheme: light;
  --ink: #13213c;
  --ink-soft: #536179;
  --paper: #f4f6f9;
  --surface: #ffffff;
  --line: #dfe4ec;
  --accent: #ef8354;
  --accent-dark: #d65f2f;
  --navy: #14213d;
  --mint: #23a094;
  --danger: #b4233c;
  --warning-bg: #fff4dc;
  --warning-border: #e8b849;
  --shadow: 0 20px 60px rgba(20, 33, 61, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 0, #fff2ea 0, transparent 28rem), var(--paper); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: white; background: var(--navy); font-size: 13px; font-weight: 900; letter-spacing: .08em; box-shadow: 0 10px 24px rgba(20,33,61,.2); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small { color: var(--ink-soft); margin-top: 2px; }
.top-actions, .button-row { display: flex; align-items: center; gap: 10px; }
.admin-name { color: var(--ink-soft); font-size: 14px; }
main { min-height: calc(100vh - 150px); padding: 34px 0 70px; }
footer { padding: 26px 0 34px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(36px, 6vw, 66px); line-height: .98; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
h3 { margin-bottom: 8px; }
p { color: var(--ink-soft); line-height: 1.65; }
.eyebrow { margin-bottom: 10px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; padding: 10px 16px; font-weight: 750; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(239,131,84,.28); outline-offset: 2px; }
.button-primary { color: white; background: var(--accent); box-shadow: 0 10px 25px rgba(239,131,84,.25); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { color: var(--navy); border-color: var(--line); background: white; }
.button-ghost { color: var(--ink-soft); border-color: var(--line); background: transparent; }
.button-danger { color: white; background: var(--danger); }
.button-danger-quiet { color: var(--danger); border-color: #efcbd2; background: #fff7f8; }
.button-wide { width: 100%; }

.hero { display: flex; min-height: 265px; align-items: end; justify-content: space-between; gap: 36px; padding: 46px; border-radius: 28px; color: white; background: linear-gradient(135deg, #14213d 0%, #24375f 100%); box-shadow: var(--shadow); }
.hero h1 { margin-bottom: 16px; }
.hero p { max-width: 670px; margin-bottom: 0; color: #cbd4e5; font-size: 17px; }
.hero .eyebrow { color: #ffae88; }
.hero .button { flex: 0 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 18px 0 38px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.85); }
.stat-card span, .stat-card strong { display: block; }
.stat-card span { color: var(--ink-soft); font-size: 13px; }
.stat-card strong { margin-top: 8px; font-size: 23px; }

.panel { margin: 22px 0; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 10px 35px rgba(20,33,61,.04); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.section-heading p { margin-bottom: 0; }
.progress { width: 100%; height: 13px; margin-top: 24px; overflow: hidden; border: 0; border-radius: 999px; background: #e8ecf2; appearance: none; }
.progress::-webkit-progress-bar { border-radius: inherit; background: #e8ecf2; }
.progress::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--mint), #66cec3); }
.progress::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--mint), #66cec3); }
.upload-meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--ink-soft); font-size: 13px; }
.resume-list { display: grid; gap: 10px; }
.resume-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border-radius: 14px; background: var(--paper); }
.resume-item strong, .resume-item small { display: block; }
.resume-item small { margin-top: 4px; color: var(--ink-soft); }

.library { margin-top: 50px; }
.library-heading { margin-bottom: 20px; }
.search { display: flex; gap: 8px; width: min(470px, 100%); }
.search input { flex: 1; }
input, textarea, select { width: 100%; border: 1px solid #cfd6e2; border-radius: 12px; padding: 11px 13px; color: var(--ink); background: white; }
textarea { resize: vertical; }
label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.stack-form { display: grid; gap: 18px; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app-card { display: flex; gap: 16px; min-height: 154px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; background: var(--surface); transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease; }
.app-card:hover { transform: translateY(-3px); border-color: #bdc7d6; box-shadow: var(--shadow); }
.app-icon, .detail-icon { flex: 0 0 auto; object-fit: cover; border-radius: 20%; background: #e8edf5; }
.app-icon { width: 66px; height: 66px; }
.detail-icon { width: 106px; height: 106px; }
.app-icon-placeholder { display: inline-grid; place-items: center; color: white; background: linear-gradient(145deg, var(--navy), #59709f); font-weight: 900; }
.app-card-body { min-width: 0; flex: 1; }
.app-card h3, .app-card p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card p { margin-bottom: 18px; font-size: 13px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 7px; }
.pill-row span, .tags { border-radius: 999px; padding: 5px 9px; color: #43506a; background: #eef1f6; font-size: 11px; }
.tags { display: inline-block; margin-top: 10px; color: #7b4a33; background: #fff0e8; }
.empty-state { display: grid; place-items: center; min-height: 240px; border: 1px dashed #c8d0dc; border-radius: 22px; color: var(--ink-soft); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 20px; }

.breadcrumbs { display: flex; gap: 9px; margin-bottom: 24px; color: var(--ink-soft); font-size: 14px; }
.detail-hero { display: flex; align-items: center; gap: 24px; padding: 26px 0 38px; }
.detail-title { flex: 1; min-width: 0; }
.detail-title h1 { margin-bottom: 7px; font-size: clamp(38px, 6vw, 64px); }
.detail-title p { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); gap: 20px; }
.detail-grid .panel { margin: 0; }
.facts { display: grid; gap: 0; margin: 20px 0 28px; }
.facts div, .transfer-facts div { display: grid; grid-template-columns: minmax(150px, .45fr) 1fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt, .transfer-facts dt { color: var(--ink-soft); }
.facts dd, .transfer-facts dd { margin: 0; font-weight: 650; }
.clean-list { list-style: none; padding: 0; }
.clean-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.clean-list span { color: var(--ink-soft); }
.share-form { display: flex; align-items: end; gap: 10px; }
.share-form label { min-width: 130px; }
.active-links { display: grid; gap: 9px; margin-top: 20px; }
.active-links > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 14px; border-radius: 12px; background: var(--paper); }

.alert { margin: 16px 0; padding: 14px 16px; border: 1px solid; border-radius: 13px; line-height: 1.5; }
.alert-danger { color: #8b1830; border-color: #efc3cc; background: #fff2f4; }
.alert-warning { color: #735516; border-color: var(--warning-border); background: var(--warning-bg); }
.alert-success { color: #17635c; border-color: #8bd0c9; background: #edfbf9; }
.login-wrap, .transfer-body { display: grid; min-height: calc(100vh - 190px); place-items: center; }
.login-panel, .phone-card, .share-card, .confirm-card { width: min(520px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.login-panel h1, .share-card h1, .confirm-card h1, .phone-card h1 { font-size: clamp(34px, 7vw, 52px); }
.confirm-card, .share-card, .phone-card { margin: 30px auto; text-align: center; }
.danger-symbol { display: grid; width: 60px; height: 60px; margin: 0 auto 20px; place-items: center; border-radius: 50%; color: white; background: var(--danger); font-size: 30px; font-weight: 900; }
.centered { justify-content: center; }
.qr { display: block; width: min(300px, 80vw); height: auto; margin: 24px auto; border: 10px solid white; border-radius: 15px; box-shadow: 0 10px 30px rgba(20,33,61,.12); }
.share-url { overflow-wrap: anywhere; margin: 15px 0; padding: 12px; border-radius: 12px; color: var(--ink-soft); background: var(--paper); font-family: ui-monospace, monospace; font-size: 12px; }
.transfer-body { min-height: 100vh; padding: 18px; }
.phone-card .brand-mark { margin: 0 auto 28px; }
.transfer-facts { margin: 25px 0; text-align: left; }
.transfer-actions { display: grid; gap: 10px; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 1180px); }
  .topbar { min-height: 72px; }
  .admin-name { display: none; }
  main { padding-top: 18px; }
  .hero { min-height: 0; align-items: stretch; flex-direction: column; padding: 28px 22px; }
  .hero h1 { font-size: 42px; }
  .stats-grid, .app-grid { grid-template-columns: 1fr; }
  .section-heading, .library-heading, .detail-hero { align-items: stretch; flex-direction: column; }
  .search, .share-form { width: 100%; align-items: stretch; flex-direction: column; }
  .detail-hero .button { align-self: start; }
  .detail-icon { width: 88px; height: 88px; }
  .panel, .login-panel, .share-card, .confirm-card, .phone-card { padding: 22px; border-radius: 19px; }
  .facts div, .transfer-facts div { grid-template-columns: 1fr; gap: 4px; }
  .resume-item, .active-links > div { align-items: stretch; flex-direction: column; }
}
