:root {
    --bg: #0a0a0f;
    --bg-elevated: #12121a;
    --card: rgba(22, 22, 32, 0.72);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #e8e8ef;
    --text-muted: #8b8b9e;
    --accent: #b84dff;
    --accent-dim: rgba(184, 77, 255, 0.15);
    --accent-glow: rgba(184, 77, 255, 0.35);
    --danger: #ff3b5c;
    --danger-dim: rgba(255, 59, 92, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    min-height: 100vh;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.bg-mesh {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(184, 77, 255, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99, 102, 241, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 59, 92, 0.05), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.app {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    flex: 1;
    margin: 0 auto;
    padding: 5.75rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.app-wide {
    max-width: 640px;
}

.app-admin {
    max-width: 960px;
}

.app-wide .card {
    max-width: 100%;
}

.hero {
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
    width: 100%;
    max-width: fit-content;
}

.hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(184, 77, 255, 0.25);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.hero-title-main { color: var(--text); }
.hero-title-accent {
    background: linear-gradient(135deg, var(--accent), #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.glass {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    padding: 1.5rem;
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card > * {
    width: 100%;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.busy { background: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.4); animation: pulse 0.8s ease-in-out infinite; }
.status-dot.error { background: var(--danger); box-shadow: 0 0 12px rgba(255, 59, 92, 0.4); animation: none; }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: var(--accent-dim);
    border: 1px solid rgba(184, 77, 255, 0.3);
    color: var(--accent);
}

.alert-error {
    background: var(--danger-dim);
    border: 1px solid rgba(255, 59, 92, 0.3);
    color: #ff8fa3;
}

.field { margin-bottom: 1rem; text-align: center; }

.field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-align: center;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.checkbox-custom input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.checkbox-custom::after {
    content: '';
    width: 0.35rem;
    height: 0.6rem;
    border: solid var(--accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
    margin-top: -2px;
}

.checkbox-custom:has(input:checked) {
    background: var(--accent-dim);
    border-color: rgba(184, 77, 255, 0.5);
    box-shadow: 0 0 12px var(--accent-glow);
}

.checkbox-custom:has(input:checked)::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-custom:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.select-wrap { position: relative; }

.select-wrap::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-muted);
    pointer-events: none;
}

select, input[type="text"], input[type="search"], input[type="password"], input[type="number"], textarea {
    width: 100%;
    appearance: none;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

select:focus, input[type="text"]:focus, input[type="search"]:focus, input[type="password"]:focus, input[type="number"]:focus, textarea:focus {
    outline: none;
    border-color: rgba(184, 77, 255, 0.4);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="search"]::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

select:disabled { opacity: 0.5; cursor: not-allowed; }

select option:disabled {
    color: var(--text-muted);
}

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 120px;
    padding: 1.25rem;
    border: 1px dashed rgba(184, 77, 255, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.25);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.dropzone-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.dropzone-wrap .dropzone {
    margin-bottom: 0;
}

.field-compact {
    margin-bottom: 0.75rem;
}

.upload-options {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.upload-option {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.upload-option:last-child {
    border-bottom: none;
}

.upload-options .checkbox-label {
    justify-content: flex-start;
    width: 100%;
}

.upload-option-field {
    margin-top: 0.7rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.28);
}

.upload-option-field[hidden] {
    display: none;
}

.upload-option-field > label:not(.upload-option-inline-label) {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
}

.upload-option-field--inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.upload-option-inline-label,
.upload-option-inline-suffix {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.upload-option-field--inline input[type="number"] {
    width: 4.5rem;
    min-width: 4.5rem;
    padding: 0.55rem 0.5rem;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 600;
}

.delete-after-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.delete-after-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
}

.delete-after-controls[hidden] {
    display: none;
}

.delete-after-label,
.delete-after-suffix {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.delete-after-controls input[type="number"] {
    width: 4.5rem;
    min-width: 4.5rem;
    padding: 0.55rem 0.5rem;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 600;
}

.dropzone:hover,
.dropzone:focus-visible {
    border-color: rgba(184, 77, 255, 0.55);
    background: rgba(184, 77, 255, 0.06);
    outline: none;
}

.dropzone--active {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.dropzone-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.dropzone-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dropzone--has-file .dropzone-limit {
    display: none;
}

.dropzone--has-file {
    border-style: solid;
    border-color: rgba(184, 77, 255, 0.45);
}

.dropzone--has-file .dropzone-label {
    color: var(--accent);
    word-break: break-word;
}

.dropzone--compact {
    min-height: 84px;
    padding: 0.85rem 1rem;
}

.pending-browser-panel {
    width: 100%;
    margin-top: 0.85rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.pending-browser-panel[hidden] {
    display: none;
}

.pending-file-browser {
    margin-bottom: 0.75rem;
}

.add-more-wrap {
    position: relative;
    margin-top: 0.25rem;
}

.add-more-wrap .upload-menu {
    position: static;
    margin-top: 0.35rem;
    box-shadow: none;
}

.dropzone-wrap[hidden],
.main-dropzone-wrap[hidden] {
    display: none;
}

#mainDropzoneWrap[hidden] {
    display: none;
}

.dropzone--add-more {
    min-height: 84px;
    padding: 0.85rem 1rem;
    margin-bottom: 0;
}

.actions-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.divider {
    height: 1px;
    background: var(--card-border);
    margin: 1.25rem 0;
}

.actions-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.btn[hidden] {
    display: none !important;
}

.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(0); }

.btn-ghost {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
}

.btn-ghost:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.btn-danger-ghost {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    background: transparent;
    color: #ff8fa3;
    border: 1px solid rgba(255, 59, 92, 0.25);
}

.btn-danger-ghost:not(:disabled):hover {
    background: var(--danger-dim);
}

.btn-secondary, .btn-danger {
    flex-direction: column;
    padding: 1rem;
    min-height: 72px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-secondary:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff3b5c, #dc2626);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-danger:not(:disabled):hover {
    box-shadow: 0 8px 32px rgba(255, 59, 92, 0.35);
}

.btn-primary {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--accent), #9333ea);
    color: #0a0a0f;
    font-weight: 700;
}

.btn-primary.btn-large {
    flex-direction: column;
}

.btn-label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.btn-hint {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0;
}

.stat-panel {
    text-align: center;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--accent-dim);
    border: 1px solid rgba(184, 77, 255, 0.2);
    border-radius: var(--radius-sm);
    animation: fadeIn 0.4s ease;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.stat-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.45rem;
}

.stat-meta-line {
    line-height: 1.35;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.terminal {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: #060608;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--card-border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

.terminal-body {
    padding: 0.85rem;
    max-height: 220px;
    overflow-y: auto;
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.log-line {
    color: var(--accent);
    word-break: break-word;
}

.log-line.error { color: #ff8fa3; }
.log-line.success { color: #d8b4fe; }

.footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding: 1.5rem 1.25rem 2rem;
    text-align: center;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.65rem;
}

.site-footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s;
}

.site-footer-nav a:hover {
    color: var(--accent);
}

.site-footer-sep {
    color: rgba(139, 139, 158, 0.45);
    font-size: 0.75rem;
    user-select: none;
}

.site-footer-copy {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(139, 139, 158, 0.75);
}

.app-legal {
    max-width: 720px;
    justify-content: flex-start;
    padding-top: 5.25rem;
    padding-bottom: 1rem;
}

.hero-compact {
    margin-bottom: 1rem;
}

.hero-title-sm {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.legal-document {
    width: 100%;
    text-align: left;
    padding: 1.5rem 1.35rem;
}

.legal-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.65;
}

.legal-section + .legal-section {
    margin-top: 1.35rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-section h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    color: var(--text);
}

.legal-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 0.65rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-back {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.legal-agreement-hint {
    margin-top: 1rem;
    font-size: 0.75rem;
    line-height: 1.55;
    color: var(--text-muted);
    text-align: center;
}

.legal-agreement-hint a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-agreement-hint a:hover {
    color: var(--accent);
}

.turnstile-field {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
}

.turnstile-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.turnstile-slot[hidden],
.upload-progress[hidden] {
    display: none !important;
}

.turnstile-wrap {
    min-height: 65px;
    display: flex;
    justify-content: center;
}

.turnstile-cancel {
    min-width: 6rem;
}

.upload-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.25);
}

.upload-spinner {
    display: inline-block;
    width: 2.25rem;
    height: 2.25rem;
    border: 3px solid rgba(184, 77, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: upload-spin 0.75s linear infinite;
    flex-shrink: 0;
}

.upload-spinner--inline {
    width: 1.15rem;
    height: 1.15rem;
    border-width: 2px;
}

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

.upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(8, 6, 12, 0.78);
    backdrop-filter: blur(6px);
}

.upload-overlay[hidden] {
    display: none;
}

body.upload-overlay-active {
    overflow: hidden;
}

.upload-overlay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: min(100%, 320px);
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.upload-overlay-label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.upload-overlay-detail {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.upload-overlay-detail[hidden] {
    display: none;
}

.upload-progress-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.upload-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.upload-modal[hidden] {
    display: none;
}

.upload-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.upload-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    padding: 1.35rem;
    text-align: left;
    animation: modalIn 0.25s ease;
}

.upload-modal-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.upload-modal-text {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.upload-url-row {
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
}

.upload-url-input {
    flex: 1;
    min-width: 0;
    cursor: text;
    user-select: all;
    box-sizing: border-box;
    text-align: left;
}

.upload-url-row .btn.btn-row.btn-sm {
    height: auto;
    min-height: unset;
    align-self: stretch;
    padding: 0 1.15rem !important;
    font-size: 0.95rem !important;
    box-sizing: border-box;
}

.upload-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.85rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.upload-modal-meta-line {
    word-break: break-word;
}

.upload-modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.1rem;
}

.upload-modal-error {
    color: #ff8fa3;
}

.btn-success {
    border-color: rgba(184, 77, 255, 0.45);
    color: #d8b4fe;
}

.modal {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 400px;
    width: calc(100% - 2rem);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    padding: 1.75rem;
    animation: modalIn 0.25s ease;
}

.modal-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 480px) {
    .app { padding: 5rem 1rem 1.5rem; }
    .actions-main { grid-template-columns: 1fr; }
}

.login-panel {
    text-align: center;
    padding: 1.5rem 0 1rem;
}

.login-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: #fff;
    color: #1f1f1f;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
}

.btn-google:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.btn-google:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    background: rgba(0,0,0,0.25);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    margin-bottom: 1.25rem;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.user-email {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8rem !important;
    flex-shrink: 0;
}

.btn-ghost.btn-sm {
    flex: none;
}

.btn-danger.btn-sm,
.btn-danger.btn-row {
    min-height: unset;
    flex-direction: row;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.8rem !important;
    font-weight: 700;
}

.btn-row {
    min-height: 2.125rem;
    height: 2.125rem;
    padding: 0 0.85rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
}

.dashboard-header .btn-row {
    min-height: 2.125rem;
    height: 2.125rem;
}

.actions-single {
    grid-template-columns: 1fr !important;
}

.dropzone-wrap .upload-menu {
    position: static;
    margin-top: 0.35rem;
    box-shadow: none;
}

.upload-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(18, 12, 28, 0.96);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}

.upload-menu[hidden] {
    display: none;
}

.upload-menu__item {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: none;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.upload-menu__item:hover,
.upload-menu__item:focus-visible {
    background: var(--accent-dim);
    color: var(--accent);
    outline: none;
}

.upload-menu__hint {
    margin: 0.15rem 0.35rem 0.25rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.btn-large {
    min-height: 88px;
    padding: 1.25rem;
}

.btn-large .btn-label {
    font-size: 1.15rem;
}

.terminal-body {
    margin-top: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: #060608;
    text-align: left;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.topbar-brand .hero-title-main,
.topbar-brand .hero-title-accent {
    font-size: 1rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-account {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.topbar-logout:hover {
    color: var(--danger);
    background: var(--danger-dim);
    border-color: rgba(255, 59, 92, 0.35);
}

.topbar-logout:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--danger-dim);
}

.topbar-page-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-right: 0.65rem;
    margin-right: 0.15rem;
    border-right: 1px solid var(--card-border);
}

.topbar-login {
    flex: none !important;
    text-decoration: none;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem 0.35rem 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s, border-color 0.2s;
}

.topbar-user:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(184, 77, 255, 0.3);
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.topbar-username {
    font-size: 0.85rem;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.retention-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.retention-row label {
    margin-bottom: 0;
}

.retention-hint {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
}

.retention-custom {
    margin-top: 0.65rem;
}

.retention-custom[hidden] {
    display: none;
}

.retention-custom-row {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}

.retention-custom-row input[type="number"] {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
}

.retention-custom-row input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.select-wrap--inline {
    flex: 0 0 auto;
    min-width: 7.5rem;
}

.select-wrap--inline select {
    width: 100%;
    min-width: 7.5rem;
    padding-right: 2rem;
}

.retention-custom-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.link-muted {
    color: var(--text-muted);
    text-decoration: none;
}

.link-muted:hover {
    color: var(--accent);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    text-align: left;
    flex-wrap: wrap;
}

.dashboard-tabs {
    margin-bottom: 1rem;
}

.dashboard-tab-panel[hidden] {
    display: none;
}

.dashboard-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.22);
}

.dashboard-filter-select-wrap {
    flex: 0 1 auto;
    min-width: 9.5rem;
    max-width: 11rem;
}

.dashboard-status-filter {
    min-height: 2.125rem;
    padding: 0.35rem 2rem 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-filter-empty {
    margin-top: 0;
}

.dashboard-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--card-border);
}

.dashboard-pagination-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-pagination-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dashboard-pagination-select-wrap {
    min-width: 4.75rem;
}

.dashboard-pagination-select-wrap select {
    min-height: 2.125rem;
    padding: 0.35rem 2rem 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-pagination-info {
    min-width: 9rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dashboard-list-wrap.is-filter-empty .dashboard-pagination {
    display: none;
}

.dashboard-list-wrap.is-filter-empty .file-list {
    display: none;
}

.dashboard-list-wrap.is-filter-empty .file-list,
.dashboard-list-wrap.is-filter-empty .screenshot-grid {
    display: none;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.screenshot-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.28);
}

.screenshot-card--inactive {
    border-color: rgba(255, 59, 92, 0.4);
    background: rgba(255, 59, 92, 0.08);
}

.screenshot-card-image-link {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid var(--card-border);
}

.screenshot-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.screenshot-card--inactive .screenshot-card-image {
    opacity: 0.55;
    filter: grayscale(0.25);
}

.screenshot-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem;
}

.screenshot-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.screenshot-card-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.screenshot-card--inactive .screenshot-card-title {
    color: #ff8fa3;
}

.screenshot-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin: 0;
}

.screenshot-card-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.screenshot-card-stat dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.screenshot-card-stat dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.screenshot-card--inactive .screenshot-card-stat dd {
    color: #ff8fa3;
}

.screenshot-card-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.screenshot-card-setting-tag {
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(184, 77, 255, 0.28);
    background: rgba(184, 77, 255, 0.1);
    color: #d8b4fe;
}

.screenshot-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.screenshot-card-clear-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(8, 6, 12, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.screenshot-card--clearable:hover .screenshot-card-clear-overlay,
.screenshot-card--clearable:focus-within .screenshot-card-clear-overlay {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 640px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-card-stats {
        grid-template-columns: 1fr;
    }
}

.dashboard-placeholder {
    padding: 2.5rem 1.25rem;
    text-align: center;
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
}

.dashboard-placeholder-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.dashboard-placeholder-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dashboard-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dashboard-modal-head .dashboard-modal-title {
    margin: 0;
}

.api-panel--modal {
    gap: 1rem;
}

.api-panel--modal .api-section-title {
    font-size: 0.95rem;
}

.screenshot-card-stats--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alert .link-muted.btn-open-sharex-setup {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.alert .link-muted.btn-open-sharex-setup:hover {
    color: var(--text);
}

.api-retention-field {
    margin-bottom: 0;
}

.api-retention-notice {
    margin-top: 0.65rem;
}

.screenshot-view-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screenshot-view-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.screenshot-view-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: auto;
}

.screenshot-view-actions .btn,
.screenshot-view-actions a.btn {
    padding: 0.6rem 1.15rem !important;
    font-size: 0.9rem;
    flex: none;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

.screenshot-view-actions a.btn:hover,
.screenshot-view-actions a.btn:focus,
.screenshot-view-actions a.btn:visited {
    text-decoration: none;
}

.screenshot-view-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    width: min(100%, 1400px);
    margin: 0 auto;
    min-height: calc(100vh - 5rem);
    padding: 5.75rem 1.25rem 2rem;
    box-sizing: border-box;
}

.screenshot-view-frame {
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.42);
    box-sizing: border-box;
}

.screenshot-view-image-link {
    display: block;
    width: 100%;
    line-height: 0;
    cursor: zoom-in;
    text-decoration: none;
}

.screenshot-view-image-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 6px;
}

.screenshot-view-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(80vh, 1200px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.screenshot-view-meta {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}

.screenshot-view-title {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.screenshot-view-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.screenshot-view-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.screenshot-view-stat dt {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.screenshot-view-stat dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

@media (max-width: 640px) {
    .screenshot-view-main {
        padding: 5rem 0.85rem 1.5rem;
    }

    .screenshot-view-frame {
        padding: 0.65rem;
    }

    .screenshot-view-image {
        max-height: 65vh;
    }

    .screenshot-view-stats {
        grid-template-columns: 1fr;
    }
}

.api-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.api-section {
    padding: 1.25rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.18);
}

.api-section-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.api-section-desc {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.api-key-display {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.28);
    border: 1px dashed var(--card-border);
}

.api-key-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.api-key-value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.95rem;
    color: var(--text);
    word-break: break-all;
}

.api-key-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.api-key-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.api-key-actions-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.api-key-actions .btn,
.api-key-actions a.btn {
    flex: none;
    flex-direction: row;
    min-height: 2.125rem;
    height: 2.125rem;
    text-decoration: none;
    white-space: nowrap;
}

.api-key-actions .btn-primary.btn-row {
    padding: 0 0.95rem !important;
}

.api-key-actions .btn-danger-ghost.btn-row {
    min-height: 2.125rem;
    height: 2.125rem;
    padding: 0 0.85rem !important;
    font-size: 0.8rem !important;
    font-weight: 700;
}

.api-key-notice {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--accent);
}

.api-guide-steps {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.api-guide-note {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.api-manual {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.api-manual summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 600;
}

.api-manual-list {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
    line-height: 1.7;
}

.api-manual-list code,
.api-guide-steps code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.82rem;
}

.api-security-warning {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 59, 92, 0.35);
    background: rgba(255, 59, 92, 0.08);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
}

.file-row-clear-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(8, 6, 12, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.file-row--clearable:hover .file-row-clear-overlay,
.file-row--clearable:focus-within .file-row-clear-overlay {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dashboard-modal[hidden] {
    display: none;
}

.dashboard-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.dashboard-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 380px);
    padding: 1.25rem;
    text-align: left;
}

.dashboard-modal-card.dashboard-modal-card--wide {
    width: min(calc(100% - 2rem), 920px);
    max-height: min(90vh, 760px);
    overflow-y: auto;
}

.dashboard-modal-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-modal-text {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.dashboard-modal-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dashboard-modal-input {
    width: 100%;
    margin-bottom: 0.75rem;
}

.dashboard-modal-error {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #ff8fa3;
}

.dashboard-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.25);
    text-align: left;
}

.file-row.is-filter-hidden,
.file-row.is-page-hidden,
.screenshot-card.is-filter-hidden,
.screenshot-card.is-page-hidden,
.admin-manage-shot-row.is-filter-hidden,
.admin-manage-shot-row.is-page-hidden,
.admin-file-row.is-filter-hidden,
.admin-file-row.is-page-hidden,
.admin-report-card.is-filter-hidden,
.admin-report-card.is-page-hidden {
    display: none !important;
}

.admin-list-wrap.is-filter-empty .dashboard-pagination {
    display: none;
}

.file-row.file-row--inactive {
    position: relative;
    border-color: rgba(255, 59, 92, 0.4);
    background: rgba(255, 59, 92, 0.08);
}

.file-row.file-row--inactive .file-name,
.file-row.file-row--inactive .file-meta {
    color: #ff8fa3;
}

.file-row.file-row--inactive .file-download-stat {
    border-color: rgba(255, 143, 163, 0.35);
    background: rgba(255, 59, 92, 0.1);
    color: #ff8fa3;
}

.auth-tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.3rem;
    margin-bottom: 1.25rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
}

.auth-tab {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.auth-tab:hover {
    color: var(--text);
}

.auth-tab.is-active {
    background: var(--accent-dim);
    color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.file-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.file-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-word;
}

.file-download-stat {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.125rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(184, 77, 255, 0.35);
    background: rgba(184, 77, 255, 0.1);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.file-download-stat--open {
    border-color: rgba(125, 211, 252, 0.35);
    background: rgba(125, 211, 252, 0.1);
    color: #7dd3fc;
}

.file-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-row-actions {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 0.35rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.file-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.125rem;
    height: 2.125rem;
    padding: 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-sizing: border-box;
    align-self: center;
}

.file-status-badge--inactive {
    color: #ff8fa3;
    border: 1px solid rgba(255, 59, 92, 0.35);
    background: rgba(255, 59, 92, 0.12);
    border-radius: 999px;
}

.unlock-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.unlock-form label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.unlock-error {
    font-size: 0.8rem;
    color: #ff8fa3;
}

.file-expired-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ff8fa3;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.file-browser {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 1rem;
    text-align: left;
}

.file-browser-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.file-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
    font-size: 0.78rem;
}

.file-breadcrumb-link {
    border: none;
    background: none;
    padding: 0.15rem 0.25rem;
    color: var(--accent);
    font-family: var(--font);
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
}

.file-breadcrumb-link:hover,
.file-breadcrumb-link:focus-visible {
    background: var(--accent-dim);
    outline: none;
}

.file-breadcrumb-sep {
    color: var(--text-muted);
    user-select: none;
}

.file-breadcrumb-current {
    color: var(--text);
    font-weight: 600;
    padding: 0.15rem 0.25rem;
    word-break: break-all;
}

.file-download-folder {
    flex-shrink: 0;
    white-space: nowrap;
}

.file-browser-empty {
    padding: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-sm);
}

.file-browser-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.25);
}

.file-browser-item--folder {
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.file-browser-item--folder:hover {
    border-color: rgba(184, 77, 255, 0.45);
    background: rgba(184, 77, 255, 0.06);
}

.file-browser-main {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    border-radius: 6px;
}

.file-icon-svg {
    width: 1.25rem;
    height: 1.25rem;
}

.file-icon--folder {
    color: #e8b84a;
    background: rgba(232, 184, 74, 0.12);
}

.file-icon--image {
    color: #7dd3fc;
    background: rgba(125, 211, 252, 0.12);
}

.file-icon--document {
    color: #c4b5fd;
    background: rgba(196, 181, 253, 0.12);
}

.file-browser-info {
    flex: 1;
    min-width: 0;
}

.file-browser-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    word-break: break-word;
    margin-bottom: 0.2rem;
}

.file-browser-size {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.file-browser-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.file-browser-actions .btn-row,
.file-browser-actions .btn-sm {
    min-width: 5.25rem;
}

.file-browser-download {
    white-space: nowrap;
}

.btn-icon,
.btn.btn-icon,
.btn-primary.btn-sm.btn-icon,
.btn-danger.btn-sm.btn-icon,
.btn-ghost.btn-sm.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0 !important;
    box-sizing: border-box;
    flex-shrink: 0;
}

.btn-icon svg,
.btn.btn-icon svg {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
    flex-shrink: 0;
}

.btn-icon-disabled-wrap {
    position: relative;
    display: inline-flex;
    cursor: not-allowed;
}

.btn-icon--disabled,
.btn.btn-icon--disabled,
.btn-ghost.btn-sm.btn-icon.btn-icon--disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.35);
}

.btn-icon-disabled-wrap:hover .btn-icon--disabled {
    opacity: 0.55;
}

.action-hover-tooltip {
    position: fixed;
    z-index: 1000;
    min-width: 11rem;
    max-width: 15rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    background: rgba(12, 12, 18, 0.97);
    border: 1px solid rgba(184, 77, 255, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.action-hover-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.file-browser-actions .btn-icon,
.file-row-actions .btn-icon {
    min-width: 2.5rem;
}

.preview-panel {
    margin-top: 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    text-align: left;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
}

.preview-title {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    word-break: break-all;
    min-width: 0;
}

.preview-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-body {
    padding: 0.85rem;
    max-height: 360px;
    overflow: auto;
}

.preview-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

.preview-text {
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
    margin: 0;
}

.file-preview-modal {
    z-index: 110;
}

.file-preview-modal .file-preview-card {
    width: min(92vw, 760px);
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.file-preview-header {
    display: block;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
}

.file-preview-meta {
    min-width: 0;
    width: 100%;
}

.file-preview-title {
    margin: 0;
    word-break: break-all;
}

.file-preview-size {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-preview-body {
    padding: 1rem 1.25rem;
    overflow: auto;
    flex: 1;
    min-height: 180px;
    max-height: min(68vh, 640px);
}

.file-preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.file-browser-toolbar--single {
    justify-content: center;
}

.file-browser-toolbar--single .file-browser-toolbar-actions {
    justify-content: center;
    width: 100%;
}

.view-single-download-btn {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1.25rem !important;
    font-size: 0.95rem !important;
    font-weight: 700;
}

.view-single-preview {
    margin-top: 0.25rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.view-single-preview-head {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
}

.view-single-preview-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    word-break: break-all;
}

.view-single-preview-size {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.view-single-preview-body {
    padding: 1rem 1.25rem;
    min-height: 220px;
    max-height: min(72vh, 760px);
    overflow: auto;
}

.view-single-preview-body > .preview-text,
.view-single-preview-body > .preview-image,
.view-single-preview-body > .preview-embed,
.view-single-preview-body > .media-player,
.view-single-preview-body > .preview-fallback,
.view-single-preview-body > .view-single-restricted,
.view-single-preview-body > .log-line {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.view-single-preview-body > .preview-text {
    padding: 1rem 1.15rem;
    margin: 0;
    max-height: min(60vh, 640px);
    overflow: auto;
}

.view-single-preview-body > .preview-image {
    padding: 0.85rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.view-single-preview-body > .preview-embed--iframe {
    min-height: 480px;
    height: min(65vh, 600px);
    display: block;
    width: 100%;
}

.view-single-preview-body > .media-player--video,
.view-single-preview-body > .media-player--audio {
    overflow: hidden;
}

.view-single-preview-body:has(> .preview-fallback) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.view-single-preview-body > .preview-fallback {
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 1.35rem 1.5rem;
    text-align: center;
}

.view-single-preview-body > .view-single-restricted,
.view-single-preview-body > .log-line {
    padding: 1.35rem 1rem;
    text-align: center;
}

.view-single-preview-body > .preview-fallback .dashboard-modal-text,
.view-single-preview-body > .view-single-restricted .dashboard-modal-text {
    margin: 0 0 0.75rem;
}

.view-single-restricted {
    padding: 0;
}

.preview-embed {
    display: block;
    width: 100%;
    border: 0;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
}

.preview-embed--iframe {
    min-height: 420px;
    height: min(60vh, 520px);
}

.preview-embed--video {
    max-height: min(60vh, 520px);
    background: #000;
}

.preview-embed--audio {
    width: 100%;
}

.media-player {
    width: 100%;
}

.media-player--video {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #050508;
    border: 1px solid rgba(184, 77, 255, 0.28);
    box-shadow: 0 0 24px rgba(184, 77, 255, 0.1);
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.media-video-stage {
    position: relative;
    background: #000;
    cursor: pointer;
    user-select: none;
}

.media-player--video video {
    display: block;
    width: 100%;
    max-height: min(58vh, 480px);
    background: #000;
    pointer-events: none;
}

.media-video-bigplay {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 4rem;
    height: 4rem;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #9333ea);
    box-shadow: 0 0 28px var(--accent-glow);
    z-index: 2;
    pointer-events: auto;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.media-video-bigplay:hover {
    transform: scale(1.05);
}

.media-video-bigplay svg {
    width: 1.45rem;
    height: 1.45rem;
    margin-left: 0.15rem;
}

.media-player--video.is-playing .media-video-bigplay {
    opacity: 0;
    pointer-events: none;
}

.media-video-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    background:
        linear-gradient(135deg, rgba(184, 77, 255, 0.16), rgba(0, 0, 0, 0.45)),
        rgba(12, 12, 18, 0.95);
    border-top: 1px solid rgba(184, 77, 255, 0.22);
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.media-video-play {
    width: 2.35rem;
    height: 2.35rem;
}

.media-video-track {
    touch-action: none;
}

.media-video-fullscreen {
    flex-shrink: 0;
}

.media-player--video.is-fullscreen {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #000;
}

.media-player--video.is-fullscreen .media-video-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.media-player--video.is-fullscreen video {
    max-height: none;
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.media-player--video.is-fullscreen .media-video-bar {
    flex-shrink: 0;
}

.media-player--audio {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1rem 0.9rem;
    border-radius: var(--radius-sm);
    background:
        linear-gradient(160deg, rgba(184, 77, 255, 0.14), rgba(0, 0, 0, 0.4) 45%),
        rgba(12, 12, 18, 0.92);
    border: 1px solid rgba(184, 77, 255, 0.28);
    box-shadow: 0 0 24px rgba(184, 77, 255, 0.12);
}

.media-player--audio audio {
    display: none;
}

.media-vinyl {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 9.5rem;
    padding: 0.35rem 0 0.15rem;
}

.media-vinyl-disc {
    position: relative;
    width: 8.5rem;
    height: 8.5rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #1a1a22 0 14%, transparent 15%),
        repeating-radial-gradient(
            circle at center,
            #121218 0 1px,
            #1c1c26 1px 3px
        );
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.55),
        0 0 28px rgba(184, 77, 255, 0.22),
        inset 0 0 18px rgba(0, 0, 0, 0.65);
    animation: vinylSpin 3.2s linear infinite;
    animation-play-state: paused;
}

.media-player--audio.is-playing .media-vinyl-disc {
    animation-play-state: running;
}

.media-vinyl-grooves {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0 2px,
        rgba(255, 255, 255, 0.035) 2px 3px
    );
    pointer-events: none;
}

.media-vinyl-label {
    position: absolute;
    inset: 32%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(145deg, #c77dff, #7c2bd6 55%, #5b1fa8);
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.12),
        0 0 16px rgba(184, 77, 255, 0.35);
}

.media-vinyl-label-text {
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.92);
}

.media-vinyl-spindle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #0b0b10;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.media-vinyl-arm {
    position: absolute;
    top: 0.55rem;
    right: calc(50% - 5.4rem);
    width: 0.18rem;
    height: 3.6rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #d0d0d8, #8a8a96);
    transform-origin: top center;
    transform: rotate(18deg);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s ease;
}

.media-vinyl-arm::before {
    content: '';
    position: absolute;
    top: -0.35rem;
    left: 50%;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    transform: translateX(-50%);
    background: #b8b8c4;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.media-vinyl-arm::after {
    content: '';
    position: absolute;
    bottom: -0.15rem;
    left: 50%;
    width: 0.55rem;
    height: 0.7rem;
    border-radius: 0.15rem;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #9a9aa8, #5c5c68);
}

.media-player--audio.is-playing .media-vinyl-arm {
    transform: rotate(28deg);
}

@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.media-audio-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
}

.media-audio-play {
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #9333ea);
    box-shadow: 0 0 16px var(--accent-glow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.media-audio-play:hover {
    transform: scale(1.04);
    box-shadow: 0 0 22px var(--accent-glow);
}

.media-audio-play:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.media-audio-play svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}

.media-player--audio.is-playing .media-audio-play {
    box-shadow: 0 0 28px var(--accent-glow);
}

.media-audio-track {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
}

.media-audio-track:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.media-audio-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #d8a6ff);
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 0.08s linear;
}

.media-audio-time {
    flex-shrink: 0;
    min-width: 5.5rem;
    text-align: right;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.media-audio-volume {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    min-width: 6.5rem;
}

.media-audio-mute {
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease, color 0.15s ease;
}

.media-audio-mute:hover {
    color: #fff;
    background: var(--accent-dim);
}

.media-audio-mute:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.media-audio-mute svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.media-audio-volume-track {
    position: relative;
    width: 4.25rem;
    height: 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
    touch-action: none;
}

.media-audio-volume-track:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.media-audio-volume-fill {
    height: 100%;
    width: 85%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #d8a6ff);
    box-shadow: 0 0 10px var(--accent-glow);
}

@media (max-width: 560px) {
    .media-audio-bar {
        flex-wrap: wrap;
    }

    .media-audio-bar .media-audio-track {
        order: 3;
        flex-basis: 100%;
    }

    .media-audio-bar .media-audio-volume {
        margin-left: auto;
    }
}

.preview-fallback {
    text-align: center;
    padding: 2rem 1rem;
}

.preview-fallback-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.preview-fallback-actions .btn {
    flex: none;
    min-width: 9rem;
}

@media (max-width: 480px) {
    .file-row {
        flex-direction: column;
        align-items: stretch;
    }

    .file-download-stat {
        align-self: flex-start;
    }

    .file-row-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .file-browser-item {
        flex-direction: column;
        align-items: stretch;
    }

    .file-browser-main {
        width: 100%;
    }

    .file-browser-actions {
        flex-direction: row;
        width: 100%;
    }

    .topbar-username {
        max-width: 80px;
    }
}

.file-browser-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.view-report-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: center;
}

.report-select {
    cursor: pointer;
}

.report-textarea {
    min-height: 5.5rem;
    resize: vertical;
    line-height: 1.45;
}

.report-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

.dashboard-modal-success {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #7ee8a8;
}

.topbar-admin {
    margin-right: 0.25rem;
}

.admin-report-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-report-card {
    padding: 1rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
}

.admin-report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.admin-report-reason {
    font-weight: 700;
    color: var(--text);
}

.admin-report-upload {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
}

.admin-report-token {
    display: block;
    margin-top: 0.15rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
}

.admin-report-details-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.35rem;
}

.admin-report-field-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.admin-report-details {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.admin-report-uploader {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
}

.admin-report-uploader-value {
    color: var(--text);
}

.admin-report-uploader-hidden-note,
.admin-file-meta-lines {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.25rem;
}

.admin-file-meta-line {
    display: block;
    line-height: 1.35;
}

.admin-screenshot-thumb {
    display: block;
    width: 112px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.admin-screenshot-thumb img,
.admin-screenshot-thumb video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.admin-upload-thumb--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.admin-upload-thumb--folder {
    color: #f0b429;
}

.admin-upload-thumb--document {
    color: var(--accent);
}

.admin-upload-thumb--video {
    color: #7dd3fc;
}

.admin-upload-thumb-svg {
    width: 34px;
    height: 34px;
    display: block;
}

.admin-screenshot-row {
    align-items: center;
}

.admin-hidden-public-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.admin-report-meta,
.admin-report-note {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-report-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-report-actions-status,
.admin-report-actions-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.admin-report-actions .btn-icon,
.admin-report-actions .btn.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0 !important;
}

.admin-report-status--open {
    border-color: rgba(255, 180, 80, 0.5);
    color: #ffc966;
}

.admin-report-status--reviewed {
    border-color: rgba(80, 200, 120, 0.5);
    color: #7ee8a8;
}

.admin-report-deleted-wrap {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.admin-report-deleted-notice {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 59, 92, 0.35);
    background: var(--danger-dim);
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.admin-report-status--dismissed {
    border-color: rgba(140, 140, 160, 0.5);
    color: var(--text-muted);
}

.admin-role-badge--admin {
    border-color: rgba(160, 120, 255, 0.5);
    color: #c4a8ff;
}

.admin-ban-badge {
    border-color: rgba(255, 59, 92, 0.5);
    color: #ff8fa3;
}

.admin-panel-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.admin-reports-toolbar {
    align-items: center;
}

.admin-filter-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.admin-report-filter-wrap {
    min-width: 8.5rem;
}

.admin-reports-toolbar .admin-search-hint {
    margin: 0 0 0 auto;
}

.admin-search-input {
    flex: 1;
    min-width: 12rem;
    margin-bottom: 0;
}

.admin-search-hint {
    margin: -0.35rem 0 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-user-row {
    flex-wrap: wrap;
}

.admin-manage-modal .dashboard-modal-card {
    width: 75vw;
    height: 75vh;
    max-width: none;
    max-height: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.admin-manage-card {
    text-align: left;
}

.admin-manage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}

.admin-manage-header-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.admin-manage-header .dashboard-modal-title {
    margin: 0;
}

.admin-manage-badges {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-manage-body {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.admin-manage-sidebar {
    padding: 1rem 1.25rem;
    border-right: 1px solid var(--card-border);
    overflow-y: auto;
    min-height: 0;
}

.admin-manage-files {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 1rem 1.25rem;
    container-type: inline-size;
    container-name: admin-manage-files;
}

.admin-manage-section-title {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.admin-manage-meta {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.admin-manage-section + .admin-manage-section {
    margin-top: 0.25rem;
}

.admin-manage-action-block {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-manage-action-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-manage-btn {
    width: 100%;
    margin-top: 0.35rem;
}

.admin-manage-action-row .admin-manage-btn {
    margin-top: 0;
}

.admin-manage-self-note {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-manage-files-title {
    margin-bottom: 0.65rem;
}

.admin-manage-files-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-manage-files-toolbar-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.admin-manage-files-toolbar .admin-search-input {
    flex: 1 1 12rem;
    width: auto;
    min-width: 10rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-height: 2.125rem;
}

.admin-manage-files-toolbar .admin-report-filter-wrap select {
    min-height: 2.125rem;
    padding: 0.35rem 2rem 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.admin-manage-files-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.admin-manage-files-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0.75rem;
}

.admin-manage-files-wrap .dashboard-pagination {
    flex-shrink: 0;
}

.admin-manage-files-list.screenshot-grid,
.admin-manage-shot-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-content: stretch;
    width: 100%;
    min-height: 0;
}

.admin-manage-shot-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.25);
    min-width: 0;
}

.admin-manage-shot-row--deleted,
.admin-manage-shot-row--expired {
    border-color: rgba(255, 59, 92, 0.4);
    background: rgba(255, 59, 92, 0.08);
}

.admin-manage-shot-thumb {
    display: block;
    width: 96px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    text-decoration: none;
}

.admin-manage-shot-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.admin-manage-shot-thumb--inactive img {
    opacity: 0.55;
    filter: grayscale(0.25);
}

.admin-manage-shot-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.admin-manage-shot-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.admin-manage-shot-row--deleted .admin-manage-shot-name,
.admin-manage-shot-row--expired .admin-manage-shot-name {
    color: #ff8fa3;
}

.admin-manage-shot-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.admin-manage-shot-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

@container admin-manage-files (max-width: 480px) {
    .admin-manage-shot-row {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-areas:
            "thumb main"
            "thumb actions";
    }

    .admin-manage-shot-thumb {
        width: 72px;
        height: 48px;
        grid-area: thumb;
    }

    .admin-manage-shot-main {
        grid-area: main;
    }

    .admin-manage-shot-actions {
        grid-area: actions;
        justify-content: flex-start;
    }
}

.admin-manage-empty,
.admin-manage-loading {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .admin-manage-modal .dashboard-modal-card {
        width: 95vw;
        height: 90vh;
    }

    .admin-manage-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
    }

    .admin-manage-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        max-height: 42vh;
        flex-shrink: 0;
    }

    .admin-manage-files {
        min-height: 0;
        flex: 1;
    }
}

.admin-user-badges {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.admin-user-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-modal-card {
    width: min(100%, 400px);
}

.admin-modal-card--wide {
    width: min(100%, 560px);
    max-height: min(85vh, 640px);
    overflow: auto;
}

.admin-user-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 50vh;
    overflow: auto;
    margin-bottom: 0.75rem;
}

.admin-user-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
}

.admin-user-file-main {
    min-width: 0;
    flex: 1;
}

.admin-report-upload-name {
    display: block;
    font-weight: 600;
    color: var(--text);
}
