@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root { color-scheme: dark; font-family: 'DM Sans', sans-serif; background: #09100e; color: #f4f7f5; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #09100e; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 78% 8%, rgba(69,210,151,.15), transparent 34rem), radial-gradient(circle at 8% 78%, rgba(102,114,255,.09), transparent 30rem), linear-gradient(rgba(255,255,255,.02) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,.02) 1px,transparent 1px); background-size: auto,auto,56px 56px,56px 56px; }
button, input, select { font: inherit; }
a { color: inherit; }

.app-header, .app-footer, .page-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; position: relative; }
.app-header { height: 90px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font: 800 20px Manrope,sans-serif; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #07100c; background: #59e3a7; box-shadow: 0 0 32px rgba(89,227,167,.24); }
nav { display: flex; gap: 8px; }
nav a { padding: 9px 12px; border-radius: 9px; color: #91a098; text-decoration: none; font-size: 14px; }
nav a:hover, nav a.active { color: #fff; background: rgba(255,255,255,.06); }

.upload-page { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(350px,.85fr); align-items: center; gap: clamp(50px,8vw,110px); min-height: calc(100vh - 180px); padding: 70px 0 100px; }
.intro { align-self: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #59e3a7; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
h1, h2 { font-family: Manrope,sans-serif; letter-spacing: -.05em; }
.intro h1 { margin: 24px 0; font-size: clamp(58px,8vw,100px); line-height: .94; }
.intro h1 span { color: #91a098; }
.intro p, .page-heading p, .download-panel p { color: #9caaa3; font-size: 18px; line-height: 1.65; max-width: 600px; }

.panel { border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: rgba(16,27,23,.88); box-shadow: 0 28px 90px rgba(0,0,0,.27); backdrop-filter: blur(16px); }
.upload-panel { padding: clamp(24px,4vw,38px); }
.drop-zone { display: flex; min-height: 210px; padding: 25px; border: 1px dashed rgba(89,227,167,.4); border-radius: 16px; background: rgba(89,227,167,.045); align-items: center; justify-content: center; flex-direction: column; gap: 8px; cursor: pointer; text-align: center; transition: border-color .2s,background .2s; }
.drop-zone:hover { border-color: #59e3a7; background: rgba(89,227,167,.075); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { font: 700 18px Manrope,sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.drop-zone small, .download-panel small { color: #7d8c84; }
.upload-icon, .file-mark, .success-mark, .expired-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 16px; color: #07100c; background: #59e3a7; font-size: 28px; font-weight: 700; }
.field-label { display: block; margin: 25px 0 8px; color: #a8b4ae; font-size: 13px; font-weight: 600; }
select, input { width: 100%; padding: 13px 14px; color: #f2f6f3; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: #111d19; outline: none; }
select:focus, input:focus { border-color: #59e3a7; box-shadow: 0 0 0 3px rgba(89,227,167,.1); }
.primary-action, .secondary-action, .copy-button, .text-button { border: 0; border-radius: 11px; font-weight: 700; cursor: pointer; }
.primary-action { width: 100%; margin-top: 24px; padding: 14px 20px; color: #07100c; background: #59e3a7; }
.primary-action:disabled { cursor: not-allowed; opacity: .45; }
.secondary-action { padding: 11px 16px; color: #eaf1ed; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
.message { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.message.error { color: #ffc5c5; border: 1px solid rgba(255,107,107,.22); background: rgba(255,107,107,.08); }
.success-state h2 { margin: 14px 0 8px; font-size: 34px; }
.success-state p { color: #9caaa3; line-height: 1.55; }
.share-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.copy-button { padding: 0 16px; color: #07100c; background: #59e3a7; }
.text-button { display: block; margin: 24px auto 0; padding: 8px; color: #9fb0a8; background: transparent; }

.centered-page { min-height: calc(100vh - 180px); display: grid; place-items: center; padding: 60px 0; }
.download-panel { width: min(600px,100%); padding: clamp(30px,6vw,58px); text-align: center; }
.download-panel .eyebrow { justify-content: center; }
.download-panel .eyebrow::before { display: none; }
.download-panel h1 { margin: 16px 0 10px; font-size: clamp(32px,6vw,50px); overflow-wrap: anywhere; }
.download-panel p { margin-inline: auto; font-size: 16px; }
.file-mark, .expired-mark { margin: 0 auto 20px; }
.expired-mark { color: #fff; background: #a44848; }
.link-button { display: inline-block; width: auto; min-width: 200px; text-decoration: none; }
.download-panel small { display: block; margin-top: 16px; }
.loading-ring { width: 44px; height: 44px; margin: 30px auto; border: 3px solid rgba(255,255,255,.1); border-top-color: #59e3a7; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.admin-page { min-height: calc(100vh - 180px); padding: 80px 0; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 14px 0 30px; }
.page-heading h1 { margin: 0; font-size: clamp(42px,7vw,72px); }
.page-heading p { margin: 8px 0 0; font-size: 16px; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th, td { padding: 17px 20px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); }
th { color: #75857d; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
td { color: #c6d0cb; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
.status-badge { padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.status-badge.active { color: #59e3a7; background: rgba(89,227,167,.1); }
.status-badge.expired { color: #ff9a9a; background: rgba(255,107,107,.1); }
.empty-state { padding: 70px 30px; color: #7f9087; text-align: center; }
.app-footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #617068; font-size: 13px; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: #8ea098; }
.loading-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #59e3a7; color: #07100c; font: 800 20px Manrope,sans-serif; }
#blazor-error-ui { display: none; position: fixed; inset: auto 20px 20px; padding: 14px 18px; background: #4b1717; color: white; border-radius: 10px; z-index: 1000; }
#blazor-error-ui .dismiss { float: right; margin-left: 18px; cursor: pointer; }

@media (max-width: 800px) {
  .upload-page { grid-template-columns: 1fr; padding-top: 50px; }
  .intro { text-align: center; }
  .intro .eyebrow { justify-content: center; }
  .intro .eyebrow::before { display: none; }
}
@media (max-width: 600px) {
  .app-header, .app-footer, .page-shell { width: min(100% - 28px,1120px); }
  .app-header { height: 76px; }
  .app-header nav a { padding: 8px; font-size: 12px; }
  .app-header nav a:first-child { display: none; }
  .upload-page { min-height: auto; padding: 48px 0 70px; gap: 40px; }
  .intro h1 { font-size: 54px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .app-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
}
