:root {
    --orange: #f69304;
    --orange-dark: #e08600;
    --cream: #fdf1e3;
    --bg: #f7f4ef;
    --card: #ffffff;
    --fg: #1a2230;
    --muted: #6b7686;
    --line: #e6e0d6;
    --input-line: #d6cfc4;
    --error-bg: #fdecea;
    --error-fg: #9b2c1f;
    --ok-fg: #24804f;
    color-scheme: light;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--fg);
    font: 15px/1.55 "Quicksand", "Segoe UI", Arial, sans-serif;
}
header {
    background: var(--orange);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
header .brand { display: flex; align-items: center; gap: 12px; }
header img { height: 34px; display: block; }
header .wordmark { color: var(--cream); font-size: 20px; font-weight: 700; letter-spacing: 0.3px; }
main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
}
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 24px; }
h1 { font-size: 21px; margin: 0 0 6px; }
p { margin: 0 0 18px; }
a { color: #b56a00; font-weight: 600; }
.note { color: var(--muted); font-size: 14px; }
.dim { color: var(--muted); }
.error {
    background: var(--error-bg);
    color: var(--error-fg);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    margin: 0 0 16px;
}
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type="email"], input[type="text"], select, textarea {
    width: 100%;
    font: inherit;
    padding: 11px 12px;
    border: 1px solid var(--input-line);
    border-radius: 8px;
    background: #fff;
    color: var(--fg);
    margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(246, 147, 4, 0.2); }
#code { font-size: 22px; letter-spacing: 8px; text-align: center; font-weight: 600; }
button {
    font: inherit;
    font-weight: 700;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    background: var(--orange);
    color: var(--fg);
    cursor: pointer;
}
button:hover { background: var(--orange-dark); }
button:disabled { opacity: 0.55; cursor: default; }
.secondary-button { background: #fff; border: 1px solid var(--input-line); }
.secondary-button:hover { background: var(--cream); }
.link-button { background: none; padding: 0; color: #b56a00; font-weight: 600; }
.link-button:hover { background: none; text-decoration: underline; }
.secondary { display: block; text-align: center; margin-top: 16px; font-size: 14px; }
[hidden] { display: none !important; }

/* the client's card */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(26, 34, 48, 0.07);
    width: 100%;
    max-width: 460px;
    padding: 28px 26px 26px;
}
.card button[type="submit"], .card .upload-button { width: 100%; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffaf3;
    margin-bottom: 24px;
}
.file svg { flex: none; }
.file-name { font-weight: 700; word-break: break-word; }
.file-size { color: var(--muted); font-size: 13px; }

/* the client's upload step */
.drop-zone {
    display: block;
    border: 2px dashed var(--input-line);
    border-radius: 10px;
    padding: 22px 12px;
    text-align: center;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    margin-bottom: 14px;
}
.drop-zone b { color: #b56a00; }
.drop-zone.dragging, .drop-zone:hover { border-color: var(--orange); background: #fffaf3; }
.drop-zone input { display: none; }
.chosen-files, .uploaded-files { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; }
.chosen-files li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.chosen-row { display: flex; align-items: center; gap: 8px; }
.chosen-name { flex: 1; word-break: break-word; }
.chosen-size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.remove, .unshare {
    background: none;
    padding: 0 4px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
}
.remove:hover, .unshare:hover { background: none; color: var(--error-fg); }
.is-uploading .remove, .is-uploading .drop-zone { display: none; }
.uploaded-files li { padding: 4px 0; }
.uploaded-files li::before { content: "\2713  "; color: var(--ok-fg); font-weight: 700; }
.progress {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: var(--line);
    margin-top: 6px;
    overflow: hidden;
}
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--orange); transition: width 0.2s; }
.share-form .progress { height: auto; background: none; overflow: visible; }
.share-form .progress-bar { position: static; height: 6px; border-radius: 3px; }
.progress-text { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* the staff page */
body.staff header { justify-content: space-between; }
.signed-in { color: var(--cream); font-size: 14px; font-weight: 600; display: flex; gap: 12px; align-items: center; }
.signed-in .link-button { color: var(--fg); }
body.staff main { padding-top: 32px; }
.staff-page { width: 100%; max-width: 980px; }
.staff-page .project-select { max-width: 320px; }
.status { font-size: 14px; color: var(--ok-fg); margin: -6px 0 12px; min-height: 1.2em; }
.status.is-error { color: var(--error-fg); }
.shares-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.shares-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.shares-buttons button { padding: 9px 14px; }
.share-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    margin: 0 0 14px;
}
.share-card .share-form { margin: 12px 0 0; }
.field { display: block; max-width: 420px; }
.field-title { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input[type="file"] { margin-bottom: 16px; font: inherit; font-size: 14px; }
.share-form textarea { height: 64px; font-size: 14px; }
.picker-emails { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; font-size: 14px; }
.picker-email { display: flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; cursor: pointer; }
.send-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.send-buttons button { padding: 9px 14px; }
.picker-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.share-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--orange);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    font-size: 14px;
}
.kind { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.share-name { font-size: 17px; font-weight: 700; word-break: break-word; }
.meta { font-size: 13px; color: var(--muted); }
.meta .deleted, .files .deleted { color: var(--error-fg); }
.share-link-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.share-link-row .share-link { margin: 0; padding: 7px 10px; font-size: 13px; }
.share-link-row button { padding: 7px 12px; white-space: nowrap; }
.recipients, .files { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; }
.recipients th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 8px 4px 0; white-space: nowrap; }
.recipients td, .files td { padding: 5px 8px 5px 0; border-bottom: 1px solid #f0ebe3; vertical-align: top; }
.received-delivered { color: var(--ok-fg); }
.received-not_delivered { color: var(--error-fg); }
.files-title { margin-top: 10px; }
.share-actions { display: flex; gap: 18px; margin-top: 8px; }
.share-actions .delete-share { color: var(--error-fg); }
.no-shares { padding: 12px 0; }

@media (max-width: 640px) {
    .shares-header { flex-direction: column; align-items: flex-start; }
    .recipients, .files { display: block; overflow-x: auto; }
}
