/* HTW Secure File Portal: layout and the portal's own components.

   Styles come from HTW-Infra/htw-style: htw/htw.css (vendored, version in .htw-style-version)
   loads first and gives the tokens, Arial, text colours, links, inputs, the focus ring and the
   .htw-btn buttons. This file only lays the page out and draws what htw.css has no class for
   (tabs, drop zone, callouts, progress, download list). Colours are --htw-* tokens, never a
   value of its own; radii follow the htw-style radius rule. To change the look, change
   htw-style and re-sync. Self-hosted only, so the CSP's style-src 'self' covers it. */
*{ box-sizing:border-box; }
body{ min-height:100vh; display:flex; align-items:flex-start; justify-content:center; padding:32px 16px; }
.hidden{ display:none !important; }

/* Card (.htw-card gives the white panel, border, radius and shadow) */
.card{ width:100%; max-width:640px; padding:32px; }
.card > * + *{ margin-top:22px; }

/* Header / brand lockup */
.brandbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ width:40px; height:40px; display:block; }
h1{ font-size:1.7rem; margin:0; }
h2{ font-size:1.25rem; margin:0; }
h3{ font-size:1.05rem; margin:0 0 6px; }
.subtitle{ color:var(--htw-slate); margin:6px 0 0; }
.center{ text-align:center; }

/* Tabs */
.tabs{ display:flex; border-bottom:1px solid var(--htw-neutral-200); }
.tab{ flex:1; padding:12px; text-align:center; font:inherit; font-weight:700; color:var(--htw-slate);
  background:none; border:none; border-bottom:2px solid transparent; cursor:pointer;
  transition:color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard); }
.tab:hover{ color:var(--htw-action-text-hover); }
.tab-active{ color:var(--htw-action-text); border-bottom-color:var(--htw-action); }

/* Forms (htw.css draws the fields; this sizes them for touch) */
input[type=text],input[type=password]{ display:block; width:100%; min-height:2.75rem; padding:.5rem .75rem; }
/* A select keeps htw.css's display (one line, a long label ends in "…") and its end padding,
   which holds the chevron; width:100% makes it full width, as the style guide asks. 9px top and
   bottom leaves exactly one 24px line inside the 44px box, so the clamped lines stay hidden. */
select{ width:100%; min-height:2.75rem; padding-block:.5625rem; padding-inline-start:.75rem; }
input[readonly]{ background:var(--htw-neutral-50); }

/* Buttons are .htw-btn; these only lay them out */
.btn-block{ width:100%; }
.btn-google svg{ width:22px; height:22px; }
.linkbtn{ background:none; border:none; color:var(--htw-action-text); font:inherit; font-weight:700;
  text-decoration:underline; text-underline-offset:2px; cursor:pointer; padding:0; }
.linkbtn:hover{ color:var(--htw-action-text-hover); }
.textlink{ background:none; border:none; padding:0; font:inherit; font-weight:700; color:var(--htw-action-text); cursor:pointer; }
.textlink:hover{ color:var(--htw-action-text-hover); text-decoration:underline; }

/* Drop zone. The portal keeps its own (files, a folder, Drive and drag-and-drop in one box);
   it takes the look of htw-style's .htw-drop: 10px radius, action border on hover. */
.dropzone{ display:block; padding:40px; background:#fff; border:2px dashed var(--htw-input-border);
  border-radius:var(--radius); text-align:center; cursor:pointer;
  transition:background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard); }
.dropzone:hover{ border-color:var(--htw-action); }
.dropzone.dragover{ border-color:var(--htw-action); border-style:solid; background:var(--htw-action-tint); }
.dropzone svg{ width:48px; height:48px; color:var(--htw-slate); margin:0 auto 12px; display:block; }
.dz-big{ font-size:1.1rem; font-weight:700; }
.dz-small{ display:block; margin-top:4px; font-size:.875rem; color:var(--htw-slate); }
#selection-name{ display:block; font-size:1.1rem; font-weight:700; color:var(--htw-action-text); }
#selection-details{ display:block; margin-top:4px; font-size:.875rem; color:var(--htw-slate); }
#selected-file-list{ margin:16px 0 0; padding:0; list-style:none; max-height:190px; overflow:auto;
  text-align:left; font-size:.8rem; }
#selected-file-list li{ background:#fff; border:1px solid var(--htw-neutral-200); padding:6px 10px;
  border-radius:var(--radius-sm); margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Callout boxes: htw-style's banner look (status tint, 4px left rule, 8px radius). Not
   .htw-banner itself, which is a flex row; these hold stacked fields. */
.box{ padding:14px 16px; border-radius:var(--radius-sm); border-left:4px solid; }
.box-warning{ background:var(--htw-warning-tint); border-left-color:var(--htw-warning); }
.box-warning .box-title{ font-weight:700; font-size:.9rem; }
.box-warning .box-sub{ display:block; font-weight:400; font-size:.8rem; color:var(--htw-slate); margin-top:2px; }
.checkrow{ display:flex; align-items:flex-start; gap:12px; }
.checkrow input{ width:18px; height:18px; margin-top:2px; flex:none; }
.box-success{ background:var(--htw-success-tint); border-left-color:var(--htw-success-rule); }
.box-success h3, .box-success .label-cap{ color:var(--htw-success-text); }
.box-info{ background:var(--htw-info-tint); border-left-color:var(--htw-logo-cyan); }
.label-cap{ display:block; font-size:.75rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.05em; margin-bottom:6px; }
.expiry-note{ font-size:.8rem; line-height:1.4; margin:0; padding-top:10px;
  border-top:1px solid color-mix(in srgb, currentColor 20%, transparent); }
.form-hint{ font-size:.8rem; line-height:1.4; color:var(--htw-slate); margin:0; text-align:center; }
.info-panel .info-title{ font-weight:700; margin:0 0 6px; font-size:.9rem; }
.info-list{ margin:0; padding-left:18px; font-size:.85rem; line-height:1.5; }
.info-list li{ margin:3px 0; }
.inline{ display:flex; gap:8px; }

/* Progress */
.progress-head{ display:flex; justify-content:space-between; font-size:.875rem; font-weight:700; }
#progress-percentage{ color:var(--htw-action-text); font-variant-numeric:tabular-nums; }
.progress-track{ width:100%; height:12px; background:var(--htw-neutral-200); border-radius:var(--radius-full);
  overflow:hidden; margin-top:6px; }
#progress-bar{ height:100%; width:0; background:var(--htw-action); border-radius:var(--radius-full); transition:width .3s ease; }

/* Download list */
#download-links-list{ list-style:none; margin:0; padding:0; }
#download-links-list li{ display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:12px 16px; background:var(--htw-neutral-50); border:1px solid var(--htw-neutral-200);
  border-radius:var(--radius-sm); margin-bottom:12px; }
#download-links-list .fname{ font-size:.875rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Badges / notices (the burn badge is .htw-badge-warning) */
.badge-burn{ margin-top:12px; }
.notice-burn{ margin-top:12px; padding:14px 16px; border-left:4px solid var(--htw-warning); border-radius:var(--radius-sm); font-size:.875rem;
  background:var(--htw-warning-tint); }
.summary-panel{ text-align:center; padding:22px; background:var(--htw-neutral-50); border:1px solid var(--htw-neutral-200);
  border-radius:var(--radius-md); }
.summary-panel .name{ font-size:1.2rem; font-weight:700; }
.summary-panel .sum{ color:var(--htw-slate); margin-top:4px; }

/* Message box */
.msg{ padding:14px; border-radius:var(--radius-sm); font-size:.9rem; text-align:center; font-weight:700; }
.msg.error{ color:var(--htw-destructive-text); background:var(--htw-destructive-tint); }
.msg.success{ color:var(--htw-success-text); background:var(--htw-success-tint); }

/* Spinner, drawn in the button's own label colour */
.loader{ width:20px; height:20px; border:3px solid transparent; border-color:color-mix(in srgb, currentColor 40%, transparent);
  border-top-color:currentColor; border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* spacing utilities (avoid inline style="" so CSP style-src can stay 'self') */
.mt-8{ margin-top:8px; } .mt-12{ margin-top:12px; } .mt-14{ margin-top:14px; } .mt-16{ margin-top:16px; }
.mt-20{ margin-top:20px; } .mt-22{ margin-top:22px; } .mt-24{ margin-top:24px; }
.brand-center{ justify-content:center; }

@media (max-width:560px){
  .card{ padding:22px; }
  h1{ font-size:1.4rem; }
  #download-links-list li{ flex-direction:column; align-items:stretch; }
}
