:root {
    --brand: #223152;
    --brand-dark: #cc2418;
    --brand-soft: #fff1ee;
    --orange: #ff9f13;
    --yellow: #ffc92d;
    --ink: #18181b;
    --muted: #6b7280;
    --muted-2: #9ca3af;
    --line: #e7dfc8;
    --surface: #ffffff;
    --surface-2: #fafafa;
    --page: #f7f7f8;
    --success: #15803d;
    --success-soft: #ecfdf3;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --shadow: 0 24px 80px rgba(24, 24, 27, 0.09);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 5%, rgba(255, 159, 19, 0.09), transparent 24rem),
        radial-gradient(circle at 88% 12%, rgba(234, 51, 35, 0.08), transparent 28rem),
        var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
select,
input {
    font: inherit;
}

button,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

.site-header {
    width: min(1180px, calc(100% - 40px));
    height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.header-badge {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.page-shell {
    width: min(1000px, calc(100% - 40px));
    margin: 54px auto 0;
}

.hero {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.eyebrow,
.section-kicker {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.hero h1 {
    margin: 14px 0 14px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-copy {
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
}

.send-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.card-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-kicker {
    margin: 0 0 5px;
}

.card-heading h2 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -0.04em;
}

.limit-note {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.drop-zone {
    width: 100%;
    min-height: 245px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed #d7d9df;
    border-radius: var(--radius-lg);
    color: inherit;
    background: linear-gradient(180deg, #fff 0%, #fdfdfd 100%);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.drop-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 6px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--brand), #ff6b43);
    box-shadow: 0 12px 30px rgba(234, 51, 35, 0.22);
}

.drop-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: white;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.drop-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.drop-subtitle {
    color: var(--muted);
    font-size: 14px;
}

.file-section {
    margin-top: 18px;
}

.file-section-top {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.file-list {
    display: grid;
    gap: 8px;
}

.file-item {
    min-height: 68px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.file-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand);
    background: var(--brand-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.file-main {
    min-width: 0;
}

.file-name {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.file-progress-inline {
    color: var(--brand);
    font-weight: 800;
}

.remove-file {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.remove-file:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.send-options {
    margin-top: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.field-group {
    display: grid;
    gap: 7px;
}

.field-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

select {
    min-width: 170px;
    height: 44px;
    padding: 0 40px 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: white;
}

select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(234, 51, 35, 0.08);
}

.privacy-note {
    padding-bottom: 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.privacy-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.08);
}

.primary-button,
.secondary-button,
.danger-button {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.primary-button {
    width: 100%;
    margin-top: 20px;
    color: white;
    background: var(--brand);
    box-shadow: 0 10px 24px rgba(234, 51, 35, 0.18);
}

.primary-button:hover:not(:disabled) {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    box-shadow: none;
}

.secondary-button {
    color: var(--ink);
    border: 1px solid var(--line);
    background: white;
}

.secondary-button:hover {
    background: #f5f5f6;
}

.danger-button {
    color: var(--danger);
    background: var(--danger-soft);
}

.text-button {
    padding: 4px;
    color: var(--brand);
    background: transparent;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.upload-panel,
.complete-panel,
.error-panel {
    margin-top: 20px;
    border-radius: var(--radius-md);
}

.upload-panel {
    padding: 16px;
    border: 1px solid var(--line);
    background: #fbfbfc;
}

.progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.progress-title {
    font-size: 14px;
    font-weight: 850;
}

.progress-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.progress-percent {
    color: var(--brand);
    font-size: 18px;
    font-weight: 900;
}

.progress-track {
    height: 9px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #ececef;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--orange), var(--yellow));
    transition: width 120ms linear;
}

.upload-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

.upload-actions > button {
    flex: 1;
}

.complete-panel {
    padding: 18px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
    border: 1px solid #bbefcc;
    background: var(--success-soft);
}

.complete-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--success);
    font-weight: 950;
}

.complete-panel h3 {
    margin: 2px 0 5px;
    font-size: 18px;
}

.complete-panel p {
    margin: 0;
    color: #476351;
    font-size: 13px;
    line-height: 1.5;
}

.transfer-info,
.next-step-note,
.full-width {
    grid-column: 1 / -1;
}

.transfer-info {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.transfer-info-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.transfer-info code {
    word-break: break-all;
    font-size: 13px;
}

.next-step-note {
    padding: 11px 12px;
    border-radius: 11px;
    color: #785d00;
    background: #fff8d7;
    font-size: 12px;
    line-height: 1.45;
}

.compact {
    min-height: 38px;
    padding: 0 13px;
    flex: 0 0 auto;
}

.full-width {
    width: 100%;
}

.error-panel {
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--danger);
    border: 1px solid #f3b7b2;
    background: var(--danger-soft);
    font-size: 13px;
}

.how-it-works {
    max-width: 760px;
    margin: 26px auto 0;
    padding: 0 4px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-step {
    padding: 14px;
    display: flex;
    gap: 10px;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.58);
    font-size: 12px;
}

.mini-step-no {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--brand);
    background: var(--brand-soft);
    font-weight: 900;
}

.mini-step div {
    display: grid;
    gap: 3px;
}

.mini-step strong {
    color: var(--ink);
    font-size: 13px;
}

.site-footer {
    width: min(1000px, calc(100% - 40px));
    margin: 54px auto 0;
    padding: 25px 0 32px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted-2);
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    font-size: 12px;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.uploading .drop-zone,
body.uploading .send-options,
body.uploading .file-section-top,
body.uploading .remove-file {
    pointer-events: none;
    opacity: 0.65;
}

@media (max-width: 720px) {
    .site-header,
    .page-shell,
    .site-footer {
        width: min(100% - 24px, 1000px);
    }

    .site-header {
        height: 70px;
    }

    .page-shell {
        margin-top: 34px;
    }

    .hero {
        margin-bottom: 25px;
    }

    .hero h1 {
        font-size: clamp(40px, 13vw, 62px);
    }

    .send-card {
        padding: 18px;
        border-radius: 22px;
    }

    .card-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .drop-zone {
        min-height: 210px;
        padding: 24px 18px;
    }

    .send-options {
        align-items: stretch;
        flex-direction: column;
    }

    select {
        width: 100%;
    }

    .privacy-note {
        padding-bottom: 0;
    }

    .how-it-works {
        grid-template-columns: 1fr;
    }

    .site-footer {
        flex-direction: column;
        gap: 6px;
    }
}


/* =========================================================
   SHARED / COMPLETE SHARE LINK
========================================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}

.header-link:hover {
    color: var(--ink);
}

.share-box,
.complete-actions,
.transfer-id-note {
    grid-column: 1 / -1;
}

.share-box {
    padding: 13px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.84);
}

.share-link-row {
    margin-top: 7px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.share-link-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    color: var(--ink);
    background: white;
    font-size: 13px;
}

.share-link-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(234, 51, 35, 0.08);
}

.complete-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.transfer-id-note {
    color: #5d7464;
    font-size: 11px;
}

.transfer-id-note code {
    word-break: break-all;
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.no-top-margin {
    margin-top: 0 !important;
}


/* =========================================================
   RECEIVER
========================================================= */

.receiver-shell {
    width: min(860px, calc(100% - 40px));
    margin: 72px auto 0;
}

.receiver-hero {
    max-width: 680px;
    margin: 0 auto 30px;
    text-align: center;
}

.receiver-hero h1 {
    margin: 13px 0 10px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.receiver-hero p {
    max-width: 590px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.receiver-card {
    padding: 28px;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.receiver-state {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: left;
}

.receiver-state h2 {
    margin: 0 0 5px;
    font-size: 19px;
}

.receiver-state p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.receiver-spinner {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 4px solid #ececef;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: receiver-spin 0.9s linear infinite;
}

@keyframes receiver-spin {
    to {
        transform: rotate(360deg);
    }
}

.receiver-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.receiver-summary h2 {
    margin: 4px 0 0;
    font-size: 27px;
    letter-spacing: -0.04em;
}

.expiry-badge {
    padding: 7px 10px;
    border-radius: 999px;
    color: #8a4f00;
    background: #fff4d8;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.receiver-meta-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.receiver-meta-item {
    padding: 13px;
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-2);
}

.receiver-meta-item span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.receiver-meta-item strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.receiver-file-list {
    margin-top: 16px;
    display: grid;
    gap: 9px;
}

.receiver-file {
    min-height: 72px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
}

.receiver-file-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand);
    background: var(--brand-soft);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.receiver-file-main {
    min-width: 0;
}

.receiver-file-name {
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.receiver-file-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.download-button {
    min-width: 112px;
}

.download-button[disabled] {
    opacity: 0.55;
    cursor: wait;
}

.receiver-security-note {
    margin-top: 15px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 12px;
}

.receiver-error {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.receiver-error-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 22px;
    font-weight: 900;
}

.receiver-error h2 {
    margin: 0 0 7px;
    font-size: 23px;
}

.receiver-error p {
    max-width: 470px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.receiver-cta {
    margin-top: 16px;
    padding: 15px 17px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.receiver-cta img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.receiver-cta > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.receiver-cta strong {
    font-size: 13px;
}

.receiver-cta span {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 720px) {
    .receiver-shell {
        width: min(100% - 24px, 860px);
        margin-top: 38px;
    }

    .receiver-card {
        padding: 18px;
        border-radius: 22px;
    }

    .receiver-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .receiver-meta-grid {
        grid-template-columns: 1fr;
    }

    .receiver-file {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .receiver-file .download-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .receiver-cta {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .receiver-cta > .link-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .share-link-row,
    .complete-actions {
        grid-template-columns: 1fr;
    }

    .share-link-row .primary-button {
        width: 100%;
    }
}


/* =========================================================
   ACCOUNT / AUTH
========================================================= */

.header-button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.header-account-button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: white;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.header-account-button:hover {
    border-color: #d1d5db;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.06);
}

.account-user-label {
    max-width: 180px;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-policy-note {
    margin-top: 13px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 12px;
    line-height: 1.45;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 20px;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(17, 24, 39, 0.48);
    backdrop-filter: blur(7px);
}

.account-modal,
.transfers-modal {
    position: relative;
    width: min(100%, 470px);
    padding: 25px;
    border: 1px solid rgba(229, 231, 235, 0.94);
    border-radius: 24px;
    background: white;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
}

.transfers-modal {
    width: min(100%, 760px);
    max-height: min(760px, calc(100vh - 40px));
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.modal-close.static {
    position: static;
    flex: 0 0 auto;
}

.account-modal-brand {
    padding-right: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-modal-brand img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.account-modal-brand h2,
.modal-heading h2 {
    margin: 4px 0 0;
    font-size: 25px;
    letter-spacing: -0.04em;
}

.auth-tabs {
    margin-top: 23px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    border-radius: 12px;
    background: var(--surface-2);
}

.auth-tab {
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.auth-tab.active {
    color: var(--ink);
    background: white;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.auth-form {
    margin-top: 17px;
    display: grid;
    gap: 13px;
}

.auth-form label {
    display: grid;
    gap: 6px;
}

.auth-form label > span {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.auth-form small {
    color: var(--muted);
    font-weight: 650;
}

.auth-form input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    color: var(--ink);
    background: white;
    font: inherit;
    font-size: 13px;
}

.auth-form input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(234, 51, 35, 0.08);
}

.form-error {
    padding: 10px 11px;
    border-radius: 10px;
    color: #a61b1b;
    background: var(--danger-soft);
    font-size: 12px;
    line-height: 1.45;
}

.account-modal-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.account-loading,
.account-empty {
    margin-top: 18px;
    padding: 30px 15px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.account-transfer-list {
    margin-top: 17px;
    display: grid;
    gap: 10px;
}

.account-transfer-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: white;
}

.account-transfer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.account-transfer-main {
    min-width: 0;
}

.account-transfer-main strong {
    display: block;
    font-size: 13px;
}

.account-transfer-meta {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--muted);
    font-size: 11px;
}

.account-status {
    padding: 5px 8px;
    border-radius: 999px;
    color: #5d7464;
    background: #eef7f0;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.account-status.expired,
.account-status.deleted,
.account-status.failed {
    color: #8a5353;
    background: #fff0f0;
}

.account-transfer-actions {
    margin-top: 11px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.account-transfer-actions button,
.account-transfer-actions a {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    background: white;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 720px) {
    .header-actions {
        gap: 7px;
    }

    .account-user-label {
        display: none !important;
    }

    .header-badge {
        display: none;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .account-modal,
    .transfers-modal {
        padding: 20px;
        border-radius: 20px;
    }

    .account-transfer-top {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   TOSSSPACE BRAND REFRESH
   Primary: #223152
   Accent:  #f8d176
   Single logo asset: /Logo.png
========================================================= */

:root {
    --brand: #223152;
    --brand-dark: #17213a;
    --brand-soft: #f8d176;
    --brand-accent: #f8d176;
    --brand-accent-soft: #fff7db;

    --ink: #223152;
    --muted: #6f7788;
    --surface: #ffffff;
    --surface-2: #fbf7ec;
    --line: #e7dfc8;

    --shadow:
        0 24px 70px rgba(34, 49, 82, 0.12);
}

/* Page atmosphere */
body {
    color: var(--ink);
    background:
        radial-gradient(
            circle at 18% 10%,
            rgba(248, 209, 118, 0.20),
            transparent 32%
        ),
        radial-gradient(
            circle at 82% 18%,
            rgba(34, 49, 82, 0.08),
            transparent 34%
        ),
        #fffdf8;
}

/* Header / brand */
.brand {
    color: #223152;
}

.brand-logo {
    width: 44px;
    height: 44px;
    padding: 3px;
    border: 1px solid rgba(34, 49, 82, 0.12);
    border-radius: 13px;
    background:
        linear-gradient(
            145deg,
            #fff8df,
            #f8d176
        );
    box-shadow:
        0 8px 22px rgba(34, 49, 82, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    object-fit: contain;
}

.brand-name {
    color: #223152;
}

/* Main CTA */
.primary-button {
    color: #223152;
    background: #f8d176;
    box-shadow:
        0 12px 30px rgba(34, 49, 82, 0.14);
}

.primary-button:hover:not(:disabled) {
    background: #f3c85e;
}

.primary-button:focus-visible {
    outline: 3px solid rgba(34, 49, 82, 0.18);
    outline-offset: 2px;
}

/* Secondary actions */
.secondary-button,
.header-link {
    color: #223152;
}

.secondary-button:hover,
.header-link:hover {
    border-color: rgba(34, 49, 82, 0.28);
    color: #17213a;
}

/* Eyebrow / kicker */
.eyebrow,
.section-kicker {
    color: #223152;
}

/* Drop zone / upload */
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #223152;
    background: rgba(248, 209, 118, 0.12);
}

.drop-icon {
    color: #223152;
    background: #f8d176;
}

.progress-fill {
    background:
        linear-gradient(
            90deg,
            #223152,
            #f8d176
        );
}

/* Privacy dot / subtle accents */
.privacy-dot {
    background: #f8d176;
    box-shadow: 0 0 0 4px rgba(248, 209, 118, 0.22);
}

/* Account modal */
.account-modal-brand img {
    width: 50px;
    height: 50px;
    padding: 4px;
    border: 1px solid rgba(34, 49, 82, 0.12);
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #fff8df,
            #f8d176
        );
    box-shadow:
        0 9px 24px rgba(34, 49, 82, 0.11);
    object-fit: contain;
}

.account-modal .primary-button,
.account-auth-submit {
    color: #223152;
    background: #f8d176;
}

.account-tabs button.is-active,
.account-tabs button.active {
    color: #223152;
    background: #fff;
    box-shadow:
        0 5px 14px rgba(34, 49, 82, 0.08);
}

/* Receiver */
.receiver-file-icon {
    color: #223152;
    background: #fff3c9;
}

.expiry-badge {
    color: #223152;
    background: #f8d176;
}

.receiver-cta img {
    width: 46px;
    height: 46px;
    padding: 4px;
    border: 1px solid rgba(34, 49, 82, 0.12);
    border-radius: 13px;
    background:
        linear-gradient(
            145deg,
            #fff8df,
            #f8d176
        );
    box-shadow:
        0 8px 22px rgba(34, 49, 82, 0.10);
    object-fit: contain;
}

/* Cards */
.send-card,
.receiver-card,
.account-modal {
    border-color: rgba(34, 49, 82, 0.10);
    box-shadow:
        0 24px 70px rgba(34, 49, 82, 0.12);
}

/* Inputs */
input:focus,
select:focus,
.share-link-input:focus {
    border-color: #223152;
    box-shadow:
        0 0 0 4px rgba(34, 49, 82, 0.08);
}

/* Complete state */
.complete-icon {
    color: #223152;
    background: #f8d176;
}


/* =========================================================
   AUTH METHODS — PASSWORD + EMAIL OTP + GOOGLE + APPLE
========================================================= */

.auth-alternatives {
    margin-top: 22px;
}

.auth-provider-stack {
    display: grid;
    gap: 9px;
}

.auth-provider-button {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    display: grid;
    grid-template-columns: 26px 1fr 26px;
    align-items: center;
    border: 1px solid rgba(34, 49, 82, 0.16);
    border-radius: 12px;
    color: #223152;
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease,
        background 140ms ease;
}

.auth-provider-button::after {
    content: "";
    width: 26px;
}

.auth-provider-button:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 49, 82, 0.32);
    box-shadow: 0 8px 20px rgba(34, 49, 82, 0.08);
}

.auth-provider-button.apple {
    margin-top: 9px;
    color: #ffffff;
    border-color: #223152;
    background: #223152;
}

.auth-provider-button.apple:hover {
    background: #17213a;
}

.auth-provider-button.email-code {
    margin-top: 9px;
    color: #223152;
    border-color: rgba(248, 209, 118, 0.90);
    background: #fff9e9;
}

.auth-provider-button.email-code:hover {
    background: #fff3cc;
}

.auth-provider-mark {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
}

.google-mark {
    color: #223152;
    background: #f8d176;
}

.apple-mark {
    color: #223152;
    background: #f8d176;
    font-size: 18px;
    line-height: 1;
}

.email-mark {
    color: #223152;
    background: #f8d176;
}

.auth-divider {
    margin: 17px 0 2px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    color: #8a91a0;
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: #e7dfc8;
}

.auth-method-note {
    margin-top: 9px;
    padding: 9px 10px;
    border-radius: 10px;
    color: #6f7788;
    background: #fbf7ec;
    font-size: 11px;
    line-height: 1.45;
}

.otp-form {
    margin-top: 18px;
}

.otp-stage {
    display: grid;
    gap: 13px;
}

.otp-intro {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    background: #fbf7ec;
}

.otp-intro strong {
    color: #223152;
    font-size: 13px;
}

.otp-intro span {
    color: #6f7788;
    font-size: 11px;
    line-height: 1.45;
}

.auth-back-button,
.auth-text-button {
    width: fit-content;
    padding: 0;
    border: 0;
    color: #223152;
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.auth-back-button:hover,
.auth-text-button:hover {
    text-decoration: underline;
}

.auth-text-button {
    justify-self: center;
}

.otp-code-input {
    height: 52px !important;
    text-align: center;
    font-size: 24px !important;
    font-weight: 800;
    letter-spacing: 0.28em;
}

@media (max-width: 520px) {
    .account-modal {
        padding: 21px;
    }

    .auth-provider-button {
        min-height: 48px;
    }
}


/* =========================================================
   ROOM ACCOUNT MANAGEMENT
========================================================= */

.account-modal-subcopy {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.account-room-name {
    color: #223152;
    font-size: 14px !important;
}

.account-transfer-actions button:disabled,
.account-transfer-actions a.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.account-transfer-actions .room-danger-action {
    color: #9b3030;
    border-color: rgba(155, 48, 48, 0.20);
    background: #fff7f7;
}

.account-transfer-actions .room-danger-action:hover {
    border-color: rgba(155, 48, 48, 0.38);
    background: #fff0f0;
}


/* =========================================================
   ROOM LOCAL QR
========================================================= */

.room-qr-modal {
    width: min(460px, calc(100vw - 32px));
    max-height: min(92vh, 760px);
    overflow: auto;
    padding: 26px;
    border: 1px solid rgba(34, 49, 82, 0.10);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(34, 49, 82, 0.18);
}

.room-qr-subtitle {
    margin: 8px 0 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.room-qr-card {
    padding: 18px;
    border: 1px solid rgba(34, 49, 82, 0.10);
    border-radius: 20px;
    background:
        linear-gradient(
            145deg,
            rgba(248, 209, 118, 0.22),
            rgba(255, 255, 255, 0.96) 42%
        );
}

.room-qr-canvas-shell {
    display: grid;
    place-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow:
        inset 0 0 0 1px rgba(34, 49, 82, 0.06),
        0 12px 28px rgba(34, 49, 82, 0.08);
}

#roomQrCanvas {
    display: block;
    width: min(292px, 100%);
    height: auto;
    max-width: 100%;
    border-radius: 8px;
}

.room-qr-brand {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #223152;
}

.room-qr-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.room-qr-brand div {
    display: grid;
    gap: 1px;
}

.room-qr-brand strong {
    font-size: 13px;
}

.room-qr-brand span {
    color: #6f7788;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.room-qr-link-field {
    margin-top: 16px;
    display: grid;
    gap: 7px;
}

.room-qr-link-field > span {
    color: #223152;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.room-qr-link-field input {
    width: 100%;
    height: 43px;
    padding: 0 12px;
    border: 1px solid #e7dfc8;
    border-radius: 11px;
    color: #223152;
    background: #fbf7ec;
    font: inherit;
    font-size: 11px;
}

.room-qr-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.room-qr-actions .primary-button,
.room-qr-actions .secondary-button {
    width: 100%;
    min-height: 43px;
}

.room-qr-privacy {
    margin: 13px 0 0;
    color: #7b8290;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 520px) {
    .room-qr-modal {
        padding: 20px;
        border-radius: 20px;
    }

    .room-qr-card {
        padding: 13px;
    }

    .room-qr-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   DOWNLOAD ALL ZIP
========================================================= */

.receiver-download-all-button {
    margin-top: 16px;
}

.receiver-download-all-button i {
    margin-right: 7px;
}

/* =========================================================
   SEND DELIVERY METHOD
========================================================= */

.delivery-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.delivery-section-heading,
.delivery-field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.delivery-helper,
.delivery-optional {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.delivery-method-grid {
    margin-top: 9px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.delivery-method-button {
    min-width: 0;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--ink);
    background: white;
    cursor: pointer;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.delivery-method-button:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 49, 82, 0.32);
    box-shadow: 0 8px 22px rgba(34, 49, 82, 0.08);
}

.delivery-method-button.active {
    border-color: #d7b85e;
    background: linear-gradient(145deg, rgba(248, 209, 118, 0.24), rgba(255, 255, 255, 0.98));
    box-shadow: 0 0 0 3px rgba(248, 209, 118, 0.13);
}

.delivery-method-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand);
    background: var(--surface-2);
}

.delivery-method-button.active .delivery-method-icon {
    color: #223152;
    background: #f8d176;
}

.delivery-method-button strong,
.delivery-method-button small {
    display: block;
}

.delivery-method-button strong {
    font-size: 13px;
}

.delivery-method-button small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.email-delivery-panel {
    margin-top: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.72);
}

.email-verification-gate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.email-verification-gate strong {
    display: block;
    font-size: 13px;
}

.email-verification-gate p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.email-delivery-fields {
    display: grid;
    gap: 14px;
}

.delivery-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.delivery-input,
.delivery-textarea,
.delivery-readonly {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: white;
    font: inherit;
}

.delivery-input,
.delivery-readonly {
    min-height: 44px;
    padding: 0 12px;
}

.delivery-input {
    outline: none;
}

.delivery-textarea {
    min-height: 98px;
    padding: 11px 12px;
    resize: vertical;
    outline: none;
    line-height: 1.45;
}

.delivery-input:focus,
.delivery-textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(34, 49, 82, 0.07);
}

.delivery-readonly {
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-recipient-group {
    gap: 8px;
}

.email-recipient-list {
    display: grid;
    gap: 8px;
}

.email-recipient-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px;
}

.email-recipient-remove {
    width: 38px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: white;
    cursor: pointer;
}

.email-recipient-remove:hover:not(:disabled) {
    color: var(--danger);
    border-color: rgba(185, 28, 28, 0.24);
    background: var(--danger-soft);
}

.email-recipient-remove:disabled {
    opacity: 0.38;
    cursor: default;
}

.delivery-add-recipient {
    justify-self: start;
}

.email-delivery-status {
    grid-column: 1 / -1;
    padding: 12px 13px;
    display: grid;
    gap: 3px;
    border: 1px solid rgba(34, 49, 82, 0.12);
    border-radius: 12px;
    color: #223152;
    background: rgba(255, 255, 255, 0.8);
}

.email-delivery-status strong {
    font-size: 12px;
}

.email-delivery-status span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.email-delivery-status.warning {
    border-color: rgba(180, 83, 9, 0.2);
    background: #fff7ed;
}

.email-delivery-status.error {
    border-color: rgba(185, 28, 28, 0.18);
    background: #fff1f2;
}

body.uploading .delivery-section {
    pointer-events: none;
    opacity: 0.65;
}

@media (max-width: 720px) {
    .delivery-section-heading,
    .delivery-field-heading,
    .email-verification-gate {
        align-items: flex-start;
        flex-direction: column;
    }

    .delivery-method-grid,
    .delivery-form-grid {
        grid-template-columns: 1fr;
    }

    .email-verification-gate .secondary-button {
        width: 100%;
    }
}
