    /* .drop-zone is a native <button> (keyboard-accessible by default): the resets
       strip the UA button chrome so the dashed-frame look is fully owned here, and
       width/display keep it the same full-width block the markup always was. */
    .drop-zone { appearance: none; -webkit-appearance: none; font: inherit; color: inherit; width: 100%; display: block; border: 2px dashed var(--border); border-radius: var(--radius-control); padding: var(--sp-5); text-align: center; cursor: pointer; transition: var(--transition); background: var(--surface-sunken); }
    .drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: var(--accent-surface); }
    .drop-zone svg.drop-zone-icon { width: 48px; height: 48px; color: var(--text-muted); margin-bottom: var(--sp-4); }
    .drop-zone .drop-zone-title { display: block; font-weight: var(--fw-600); color: var(--text); }
    .file-item { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-control); }
    .file-item.uploading { border-color: var(--accent-surface); }
    .progress-container { flex: 1; margin: 0 var(--sp-4); height: 6px; background: var(--surface-raised); border-radius: var(--radius-control); overflow: hidden; display: none; } /* Changed from var(--border) */
    .inline-folder-container { display: none; margin-top: var(--sp-2); border: 1px dashed var(--border); padding: var(--sp-4); border-radius: var(--radius-control); }
    .inline-folder-row { display: flex; gap: var(--sp-2); }
    .inline-folder-input { flex: 1; font-size: var(--fs-2); padding: var(--sp-1) var(--sp-2); }
    .inline-folder-btn { font-size: var(--fs-1); padding: var(--sp-1) var(--sp-3); }
    .inline-folder-cancel { font-size: var(--fs-1); padding: var(--sp-1) var(--sp-2); }
    .collision-overlay { z-index: 1100 !important; }
    .collision-warning-icon { width: 32px; height: 32px; color: var(--warning); }
    .collision-title { color: var(--warning); }

    /* Premium Mode Selector styles */
    .bulk-mode-card { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--sp-4); background: var(--n-100); border-radius: var(--radius-control); margin-bottom: var(--sp-4); box-shadow: var(--sh-1); }
    .file-item-wrapper { padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-control); display: flex; flex-direction: column; gap: var(--sp-4); transition: var(--transition); }
    .file-item-wrapper:hover { border-color: var(--border-strong); }
    .file-item-header { display: flex; align-items: center; justify-content: space-between; }
    .file-item-name { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: var(--sp-2); }
    .upload-mode-selector { display: flex; flex-direction: column; gap: var(--sp-2); }
    .mode-options-row { display: flex; gap: var(--sp-4); }
    .mode-option-label { flex: 1; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-control); cursor: pointer; transition: var(--transition); background: var(--n-100); }
    .mode-option-label:hover:not(.disabled) { border-color: var(--border-strong); background: var(--n-100); }
    .mode-option-label.active.secure-label { 
        border-color: var(--success); 
        background: var(--surface-raised); 
        color: var(--success-text); 
    }
    .mode-option-label.active.raw-label { 
        border-color: var(--warning); 
        background: var(--surface-raised); 
        color: var(--warning-text); 
    }
    .mode-option-label.disabled { opacity: 0.55; cursor: not-allowed; }
    .mode-option-label input[type="radio"] { margin: 0; cursor: pointer; }
    .mode-title { font-size: var(--fs-2); font-weight: var(--fw-600); display: flex; align-items: center; gap: var(--sp-1); }
    .recommended-badge { font-size: var(--fs-0); background: var(--surface-raised); color: var(--success-text); padding: var(--sp-1) var(--sp-1); border-radius: var(--radius-control); font-weight: var(--fw-500); }
    .disabled-badge { font-size: var(--fs-0); background: var(--surface-raised); color: var(--text-muted); padding: var(--sp-1) var(--sp-1); border-radius: var(--radius-control); font-weight: var(--fw-500); }
    .mode-disclosure { padding: var(--sp-4) var(--sp-4); border-radius: var(--radius-control); border: none; font-size: var(--fs-1); line-height: 1.4; transition: all 0.25s ease-in-out; }
    .disclosure-secure { 
        background: var(--surface-raised); 
        color: var(--success-text); 
        box-shadow: var(--sh-success-card); 
    }
    .disclosure-raw { 
        background: var(--surface-raised); 
        color: var(--warning-text); 
        box-shadow: var(--sh-warning-card); 
    }
    .keep-original-container { display: flex; align-items: center; margin-top: var(--sp-1); }
    .checkbox-label-premium { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-1); font-weight: var(--fw-500); color: var(--text); cursor: pointer; }
    .checkbox-label-premium input[type="checkbox"] { cursor: pointer; }
    .checkbox-text { user-select: none; }
    
    /* Zero-Local-Styles Rule Compliance */
    .disabled-badge.is-too-large { background-color: var(--surface-raised); color: var(--danger); border: none; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-control); font-size: var(--fs-0); box-shadow: var(--sh-danger-card); }
    .disclosure-warning { background-color: var(--surface-raised); color: var(--warning-text); border: none; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-control); box-shadow: var(--sh-warning-card); }
    .text-small-tight { font-size: var(--fs-0); line-height: 1.4; }
    .spinner-inline {
        display: inline-block;
        width: 12px;
        height: 12px;
        border: 2px solid rgba(0, 0, 0, 0.1);
        border-top-color: var(--accent, var(--blue-500));
        border-radius: 50%;
        animation: spin-upload 0.8s linear infinite;
        margin-right: var(--sp-1);
        vertical-align: middle;
    }
    @keyframes spin-upload {
        to { transform: rotate(360deg); }
    }
    .size-cap-warning-box {
        background: var(--surface-raised);
        color: var(--danger-text);
        box-shadow: var(--sh-danger-card);
        border: none;
        border-radius: var(--radius-control);
        padding: var(--sp-4) var(--sp-4);
        font-size: var(--fs-1);
        font-weight: var(--fw-600);
        margin-top: var(--sp-2);
        display: flex;
        align-items: center;
        gap: var(--sp-2);
    }

    /* === Compact upload row layout === */

    .upload-file-list {
        display: flex;
        flex-direction: column;
        gap: var(--sp-1);
        max-height: 50vh;
        overflow-y: auto;
        padding-right: var(--sp-1);
    }

    .upload-file-name {
        flex: 1 1 auto;
        min-width: 0;
        font-size: var(--fs-2);
        font-weight: var(--fw-500);
        color: var(--text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* === ZIP group: archive row + its inner files (per-file watermark) === */
    .upload-zip-group {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-2);
    }
    .upload-zip-head {
        display: flex;
        align-items: center;
        gap: var(--sp-4);
    }
    .upload-zip-count {
        font-weight: var(--fw-400);
        font-size: var(--fs-1);
        color: var(--text-muted);
    }
    .upload-zip-inner {
        display: flex;
        flex-direction: column;
        gap: var(--sp-1);
        margin-left: var(--sp-2);
        padding-left: var(--sp-3);
        border-left: 2px solid var(--border);
    }
    .upload-zip-inner-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--sp-3);
        padding: var(--sp-1) var(--sp-2);
        background: var(--surface-sunken);
        border-radius: var(--radius-control);
    }
    .upload-zip-inner-name {
        flex: 1 1 auto;
        min-width: 0;
        font-size: var(--fs-1);
        color: var(--text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .upload-zip-inner-row .upload-mode-check { flex: 0 0 auto; }

    /* Compact Secure/Raw segmented toggle, narrower than the default 280px track but
       at the STANDARD control height so it lines up with every other control in the row. */
    .segmented-control-track.segmented-compact {
        width: 132px;
        height: var(--field-h);
        padding: var(--sp-1);
        flex: 0 0 auto;
    }
    .segmented-control-track.segmented-compact .segmented-control-segment {
        font-size: var(--fs-1);
        padding: 0;
    }

    /* Non-securable files can't offer Secure — show a static Raw chip instead of
       a fake-disabled toggle, so the control vocabulary stays honest. */
    .upload-mode-fixed {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        height: var(--field-h);
        padding: 0 var(--sp-3);
        border-radius: var(--radius-control);
        background: var(--surface-raised);
        color: var(--warning-text);
        font-size: var(--fs-1);
        font-weight: var(--fw-600);
    }

    .upload-remove-btn {
        flex: 0 0 auto;
        width: var(--field-h);
        height: var(--field-h);
    }
    .upload-remove-btn:hover { color: var(--danger); }

    /* Per-row upload progress: the controls (mode toggle + remove) are swapped
       for a live status readout + fill bar while the file is in flight. */
    .upload-row-progress-wrap .upload-row-progress { flex: 0 0 96px; height: 6px; }
    .upload-row-progress-wrap.upload-row-failed .progress-bar { background: var(--danger); }
    .upload-row-progress-wrap.upload-row-failed .upload-row-status { color: var(--danger-text); }

    /* === Bulk "Apply to all" + Secure/Raw result explainer === */

    .bulk-mode-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--sp-4);
    }

    .bulk-mode-explainer {
        display: flex;
        flex-direction: column;
        gap: var(--sp-1);
        font-size: var(--fs-1);
        line-height: 1.4;
        color: var(--text-muted);
    }

    .text-success { color: var(--success-text); }
    .text-warning { color: var(--warning-text); }

    /* === Inline uploader panel (replaces modal_upload) ====================== */
    /* The "+" create row toggles .upload-open to reveal a stack of distinct
       full-width rows (toolbar · drop zone · file rows) inside the table cell. */
    .create-shortcut-row .upload-panel { display: none; }
    .create-shortcut-row.upload-open .upload-panel { display: block; }
    .create-shortcut-row.upload-open .plus-row-state-a { display: none; }

    /* Every uploader block is its own full-bleed row, separated by the same
       hairline as table rows so they read as distinct rows. */
    .upload-row { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); text-align: left; }
    /* Toolbar row = the same inline create-bar metrics as the folders create row
       (.plus-row-state-b): standard --row-h with sp-2 gaps, so the "+" upload action
       reads like every other create bar. */
    .upload-toolbar { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); min-height: var(--row-h); }
    .upload-toolbar-spacer { flex: 1 1 auto; }
    .upload-toolbar .dropdown { min-width: 180px; flex: 0 0 auto; }
    .upload-wm-all { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-2); white-space: nowrap; cursor: pointer; }
    .upload-wm-all input:disabled { cursor: not-allowed; }
    .upload-wm-all input:disabled + span { color: var(--text-muted); }
    .upload-toolbar .plus-row-actions { display: inline-flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }
    /* Upload/Link are the standard .btn (field-h tall) — drop the 4×field-h min-width so they're content-sized inline. */
    .upload-toolbar .btn { min-width: 0; flex: 0 0 auto; }

    /* Drop zone = its own distinct, visually-different row (sunken dashed area). No
       bottom hairline: the dashed box is self-separating, and when the drop row is the
       last visible panel row (no files yet) an inherited border would double against the
       card's bottom edge. */
    .upload-drop-row { padding: var(--sp-3) var(--sp-4); border-bottom: none; }
    .upload-drop { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); margin: 0; }
    .upload-drop svg.drop-zone-icon { margin-bottom: 0; }

    /* File rows = standard interaction-row metrics (match table rows). */
    .upload-file-row { display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-4); border: none; border-bottom: 1px solid var(--border); border-radius: 0; background: var(--surface); min-height: var(--field-h); }
    .upload-file-row:last-child { border-bottom: none; }
    /* Zip group stacks its header row over the inner-file list. */
    .upload-file-row.upload-zip-group { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
    .upload-file-row.upload-zip-group .upload-zip-head { display: flex; align-items: center; gap: var(--sp-3); }
    .upload-rename-input { flex: 1 1 auto; min-width: 0; height: var(--field-h); font-size: var(--fs-2); }
    .upload-row-controls { display: inline-flex; align-items: center; gap: var(--sp-3); flex: 0 0 auto; }
    .upload-row-controls.is-hidden, .upload-row-prompt.is-hidden, .upload-row-progress-wrap.is-hidden { display: none; }
    /* Watermark checkbox + label: standard checkbox-label spacing (was cramped). */
    .upload-mode-check { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-2); flex: 0 0 auto; }
    .upload-replace-tag { font-size: var(--fs-1); color: var(--text-muted); white-space: nowrap; }

    /* In-row same-name collision prompt (Replace · Rename · cancel-morph). */
    .upload-row-prompt { display: inline-flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }
    .upload-prompt-label { font-size: var(--fs-1); color: var(--warning-text); white-space: nowrap; }
    /* Standard .btn (field-h tall) but content-sized for the inline prompt. */
    .upload-row-prompt .btn { min-width: 0; padding: 0 var(--sp-3); }

    /* Per-row progress (controls swap for status + bar while uploading). */
    .upload-row-progress-wrap { display: inline-flex; align-items: center; gap: var(--sp-3); flex: 0 0 auto; }
    .upload-row-progress { flex: 0 0 96px; height: 6px; margin: 0; }
    .upload-row-status { font-size: var(--fs-1); color: var(--text-muted); white-space: nowrap; min-width: 88px; text-align: right; font-variant-numeric: tabular-nums; }
