/* ==========================================================================
   Peaker File design system
   Vivid gradient brand, glass surfaces, motion on transform/opacity only.
   Bootstrap is kept for the grid/utilities used by the account pages; its
   components are re-skinned below.
   ========================================================================== */

@property --pf-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

:root {
    color-scheme: light;

    --pf-violet: #7c3aed;
    --pf-pink: #e11d74;
    --pf-orange: #f97316;
    --pf-cyan: #06b6d4;
    --pf-green: #10b981;
    --pf-red: #ef4444;
    --pf-amber: #f59e0b;

    --pf-grad: linear-gradient(120deg, #7c3aed 0%, #c026d3 38%, #e11d74 66%, #f97316 100%);
    --pf-grad-soft: linear-gradient(120deg, rgba(124, 58, 237, .12), rgba(225, 29, 116, .10), rgba(249, 115, 22, .10));

    --pf-bg: #f6f4ff;
    --pf-surface: rgba(255, 255, 255, .78);
    --pf-surface-solid: #ffffff;
    --pf-surface-2: #f1eefc;
    --pf-text: #17132b;
    --pf-muted: #6b6785;
    --pf-border: rgba(23, 19, 43, .09);
    --pf-ring: rgba(124, 58, 237, .35);

    --pf-radius-lg: 28px;
    --pf-radius: 16px;
    --pf-radius-sm: 11px;

    --pf-shadow: 0 1px 2px rgba(23, 19, 43, .04), 0 12px 40px -12px rgba(76, 29, 149, .22);
    --pf-shadow-lg: 0 2px 6px rgba(23, 19, 43, .05), 0 30px 80px -20px rgba(76, 29, 149, .35);

    --pf-ease: cubic-bezier(.22, 1, .36, 1);
    --pf-font: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system,
        "Helvetica Neue", Arial, sans-serif;

    /* Bootstrap hooks */
    --bs-body-font-family: var(--pf-font);
    --bs-body-color: var(--pf-text);
    --bs-body-bg: var(--pf-bg);
    --bs-secondary-color: var(--pf-muted);
    --bs-border-color: var(--pf-border);
    --bs-link-color-rgb: 124, 58, 237;
    --bs-link-hover-color-rgb: 225, 29, 116;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --pf-bg: #0c0a18;
        --pf-surface: rgba(24, 20, 44, .72);
        --pf-surface-solid: #17142b;
        --pf-surface-2: #221d3d;
        --pf-text: #f3f0ff;
        --pf-muted: #a19cbd;
        --pf-border: rgba(255, 255, 255, .09);
        --pf-ring: rgba(167, 139, 250, .45);
        --pf-grad-soft: linear-gradient(120deg, rgba(124, 58, 237, .22), rgba(225, 29, 116, .16), rgba(249, 115, 22, .14));
        --pf-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -12px rgba(0, 0, 0, .6);
        --pf-shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 80px -20px rgba(0, 0, 0, .75);
        --bs-link-color-rgb: 196, 160, 255;
        --bs-link-hover-color-rgb: 255, 128, 191;
    }
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: var(--pf-font);
    background: var(--pf-bg);
    color: var(--pf-text);
    -webkit-font-smoothing: antialiased;
}

body { background: transparent !important; min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow-x: hidden; }

a { color: rgb(var(--bs-link-color-rgb)); text-decoration: none; transition: color .2s; }
a:hover { color: rgb(var(--bs-link-hover-color-rgb)); }

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { font-weight: 700; letter-spacing: -.02em; color: var(--pf-text); }
h1:focus { outline: none; }

::selection { background: rgba(124, 58, 237, .25); }

:focus-visible { outline: 3px solid var(--pf-ring); outline-offset: 2px; border-radius: 6px; }

.text-muted, .text-secondary { color: var(--pf-muted) !important; }
hr { border-color: var(--pf-border); opacity: 1; }

/* ---------------------------------------------------------------- ambient background
   Three radial-gradient blobs drift slowly. No filters: only transforms are animated. */

.pf-ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.pf-ambient span {
    position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
    opacity: .9; will-change: transform;
    animation: pf-drift 28s var(--pf-ease) infinite alternate;
}
.pf-ambient span:nth-child(1) { top: -25vmax; left: -15vmax; background: radial-gradient(closest-side, rgba(124, 58, 237, .45), transparent); }
.pf-ambient span:nth-child(2) { top: -10vmax; right: -25vmax; background: radial-gradient(closest-side, rgba(225, 29, 116, .32), transparent); animation-duration: 34s; animation-delay: -8s; }
.pf-ambient span:nth-child(3) { bottom: -30vmax; left: 20vmax; background: radial-gradient(closest-side, rgba(6, 182, 212, .28), transparent); animation-duration: 40s; animation-delay: -16s; }
.pf-ambient::after {
    /* fine grid for depth */
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(124, 58, 237, .10) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
@keyframes pf-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
    100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.96); }
}

/* ---------------------------------------------------------------- header / footer */

.pf-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--pf-bg) 70%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--pf-border);
}
.pf-header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.pf-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: var(--pf-text); letter-spacing: -.02em; }
.pf-brand:hover { color: var(--pf-text); }
.pf-brand img { transition: transform .5s var(--pf-ease); }
.pf-brand:hover img { transform: rotate(-8deg) scale(1.08); }
.pf-brand b { background: var(--pf-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }

.pf-nav { display: flex; align-items: center; gap: .5rem; }
.pf-nav a:not(.btn), .pf-nav .btn-link {
    color: var(--pf-muted); font-weight: 600; font-size: .92rem; padding: .45rem .8rem; border-radius: 999px;
    text-decoration: none; border: 0; background: transparent; transition: background .2s, color .2s;
}
.pf-nav a:not(.btn):hover, .pf-nav .btn-link:hover { color: var(--pf-text); background: var(--pf-surface-2); }
.pf-user {
    display: inline-flex; align-items: center; gap: .5rem;
}
.pf-avatar {
    width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center;
    background: var(--pf-grad); color: #fff; font-size: .8rem; font-weight: 800; text-transform: uppercase;
}

.pf-main { flex: 1; padding-top: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: 4rem; }

.pf-footer { color: var(--pf-muted); font-size: .85rem; padding: 1.75rem 0; border-top: 1px solid var(--pf-border); }
.pf-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pf-footer span:last-child { display: inline-flex; align-items: center; gap: .4rem; }
.pf-footer-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.pf-footer-links a { color: var(--pf-muted); text-decoration: none; }
.pf-footer-links a:hover { color: var(--pf-violet); text-decoration: underline; }
.pf-terms { font-size: .75rem; color: var(--pf-muted); text-align: center; margin: .6rem 0 0; }
.pf-terms a { color: inherit; text-decoration: underline; }

.pf-cookie {
    position: fixed; z-index: 1050; left: 50%; bottom: 16px; transform: translateX(-50%);
    width: min(680px, calc(100% - 32px)); display: flex; align-items: center; gap: 1rem;
    padding: .75rem .9rem .75rem 1.1rem; border-radius: var(--pf-radius);
    background: var(--pf-surface-solid); color: var(--pf-text); border: 1px solid var(--pf-border);
    box-shadow: var(--pf-shadow-lg); font-size: .85rem; line-height: 1.4;
}
.pf-cookie[hidden] { display: none; }
.pf-cookie span { flex: 1; }
.pf-cookie .btn { flex: none; }
.pf-cookie-actions { display: flex; gap: .5rem; flex: none; }
.pf-cookie-actions .btn { flex: 1; }
.pf-linkbtn { background: none; border: 0; padding: 0; color: var(--pf-muted); font: inherit; cursor: pointer; }
.pf-linkbtn:hover { color: var(--pf-violet); text-decoration: underline; }
@media (max-width: 480px) { .pf-cookie { flex-direction: column; align-items: stretch; text-align: center; } }

.pf-legal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; max-width: 1060px; margin: 0 auto; }
.pf-legal-nav { position: sticky; top: 1.25rem; display: flex; flex-direction: column; gap: .25rem; }
.pf-legal-nav a { padding: .55rem .85rem; border-radius: var(--pf-radius-sm); color: var(--pf-muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.pf-legal-nav a:hover { background: var(--pf-surface-2); color: var(--pf-text); }
.pf-legal-nav a.active { background: var(--pf-grad); color: #fff; }
.pf-legal-doc { padding: clamp(1.25rem, 3vw, 2.5rem); }
.pf-legal-doc h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: .25rem; }
.pf-legal-meta { color: var(--pf-muted); font-size: .85rem; margin-bottom: 1.5rem; }
.pf-legal-lead { font-size: 1.02rem; line-height: 1.65; }
.pf-legal-doc h2 { font-size: 1.12rem; font-weight: 800; margin: 1.75rem 0 .6rem; }
.pf-legal-doc p, .pf-legal-doc li { line-height: 1.65; color: var(--pf-text); }
.pf-legal-doc li { margin-bottom: .35rem; }
.pf-legal-table { font-size: .88rem; color: var(--pf-text); --bs-table-bg: transparent; --bs-table-color: var(--pf-text); }
.pf-legal-table code { white-space: nowrap; }
.pf-legal-contact { padding: 1rem 1.1rem; border-radius: var(--pf-radius-sm); background: var(--pf-surface-2); }
@media (max-width: 860px) {
    .pf-legal { grid-template-columns: 1fr; }
    .pf-legal-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: .25rem; }
    .pf-legal-nav a { white-space: nowrap; }
}

.pf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pf-green); box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }

/* ---------------------------------------------------------------- buttons */

.btn {
    --pf-btn-y: 0;
    font-weight: 650; border-radius: 999px; padding: .62rem 1.25rem;
    transition: transform .25s var(--pf-ease), box-shadow .25s var(--pf-ease), background-color .2s, color .2s, border-color .2s;
    transform: translateY(var(--pf-btn-y));
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.05rem; }
.btn-sm { padding: .38rem .85rem; font-size: .85rem; }

.btn-primary, .pf-btn-grad {
    position: relative; overflow: hidden; isolation: isolate;
    color: #fff !important; border: 0 !important;
    background: var(--pf-grad) !important; background-size: 160% 100% !important;
    box-shadow: 0 10px 28px -10px rgba(192, 38, 211, .65);
}
.btn-primary::after, .pf-btn-grad::after {
    /* shine sweep */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .8s var(--pf-ease);
}
.btn-primary:hover:not(:disabled), .pf-btn-grad:hover:not(:disabled) {
    --pf-btn-y: -2px;
    box-shadow: 0 16px 36px -10px rgba(192, 38, 211, .75);
}
.btn-primary:hover:not(:disabled)::after, .pf-btn-grad:hover:not(:disabled)::after { transform: translateX(120%); }
.btn-primary:disabled, .btn-primary.disabled { opacity: .45; box-shadow: none; filter: saturate(.6); }

.btn-outline-primary, .btn-outline-secondary {
    color: var(--pf-text); background: var(--pf-surface-solid); border: 1px solid var(--pf-border);
}
.btn-outline-primary:hover, .btn-outline-secondary:hover {
    color: var(--pf-violet); background: var(--pf-surface-solid); border-color: var(--pf-ring); --pf-btn-y: -1px;
}
.btn-outline-danger { color: var(--pf-red); border-color: rgba(239, 68, 68, .35); background: transparent; }
.btn-outline-danger:hover { background: var(--pf-red); border-color: var(--pf-red); color: #fff; }
.btn-link { color: rgb(var(--bs-link-color-rgb)); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: rgb(var(--bs-link-hover-color-rgb)); }

/* ---------------------------------------------------------------- forms */

.form-control, .form-select {
    background-color: var(--pf-surface-solid); color: var(--pf-text);
    border: 1.5px solid var(--pf-border); border-radius: var(--pf-radius-sm);
    padding: .72rem .95rem; font-size: .95rem;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-control::placeholder { color: color-mix(in srgb, var(--pf-muted) 80%, transparent); }
.form-control:focus, .form-select:focus {
    background-color: var(--pf-surface-solid); color: var(--pf-text);
    border-color: var(--pf-violet); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14);
}
.form-control-sm, .form-select-sm { padding: .5rem .8rem; font-size: .88rem; border-radius: 10px; }
.form-floating > .form-control, .form-floating > .form-select { height: calc(3.6rem + 2px); }
.form-floating > label { color: var(--pf-muted); padding-left: 1rem; }
.form-label { font-weight: 600; font-size: .85rem; color: var(--pf-muted); }
.form-check-input { border-color: var(--pf-border); background-color: var(--pf-surface-solid); width: 1.15em; height: 1.15em; }
.form-check-input:checked { background-color: var(--pf-violet); border-color: var(--pf-violet); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); border-color: var(--pf-violet); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.input-group > .form-control { border-radius: var(--pf-radius-sm) 0 0 var(--pf-radius-sm); }
.input-group > .btn { border-radius: 0 var(--pf-radius-sm) var(--pf-radius-sm) 0; }

.alert { border-radius: var(--pf-radius-sm); border: 0; font-size: .92rem; }
.alert-danger { background: rgba(239, 68, 68, .12); color: #b91c1c; }
.alert-warning { background: rgba(245, 158, 11, .14); color: #92400e; }
.alert-success { background: rgba(16, 185, 129, .14); color: #047857; }
@media (prefers-color-scheme: dark) {
    .alert-danger { color: #fca5a5; }
    .alert-warning { color: #fcd34d; }
    .alert-success { color: #6ee7b7; }
}
.text-danger { color: var(--pf-red) !important; }

/* ---------------------------------------------------------------- surfaces */

.pf-card {
    position: relative;
    background: var(--pf-surface);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    box-shadow: var(--pf-shadow-lg);
    padding: clamp(1.25rem, 3vw, 2rem);
    max-width: 520px;
    margin: 0 auto;
    animation: pf-rise .7s var(--pf-ease) both;
}
.pf-card::before {
    /* thin gradient rim on top */
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(160deg, rgba(255, 255, 255, .9), transparent 40%, transparent 70%, rgba(225, 29, 116, .35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
@media (prefers-color-scheme: dark) {
    .pf-card::before { background: linear-gradient(160deg, rgba(255, 255, 255, .18), transparent 40%, transparent 70%, rgba(225, 29, 116, .4)); }
}
.pf-card-wide { max-width: 640px; }

@keyframes pf-rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pf-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- home: hero */

.pf-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 992px) { .pf-home { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }

.pf-hero { animation: pf-rise .7s var(--pf-ease) both; }
.pf-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem .35rem .4rem; border-radius: 999px;
    background: var(--pf-surface); border: 1px solid var(--pf-border); font-size: .82rem; font-weight: 650; color: var(--pf-muted);
    box-shadow: var(--pf-shadow);
}
.pf-eyebrow b { background: var(--pf-grad); color: #fff; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; letter-spacing: .04em; }
.pf-hero h1 {
    font-size: clamp(2.3rem, 5.6vw, 4.1rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 800;
    margin: 1.1rem 0 1rem;
}
.pf-grad-text {
    background: var(--pf-grad); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: pf-hue 8s ease-in-out infinite alternate;
}
@keyframes pf-hue { to { background-position: 100% 0; } }
.pf-lead { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--pf-muted); max-width: 34rem; line-height: 1.6; }

.pf-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 2rem; max-width: 30rem; }
.pf-feature {
    display: flex; gap: .7rem; align-items: center; padding: .8rem .9rem; border-radius: var(--pf-radius);
    background: var(--pf-surface); border: 1px solid var(--pf-border); font-size: .88rem; font-weight: 600;
    transition: transform .35s var(--pf-ease), box-shadow .35s var(--pf-ease);
    animation: pf-rise .7s var(--pf-ease) both;
}
.pf-feature:nth-child(2) { animation-delay: .06s; }
.pf-feature:nth-child(3) { animation-delay: .12s; }
.pf-feature:nth-child(4) { animation-delay: .18s; }
.pf-feature:hover { transform: translateY(-3px); box-shadow: var(--pf-shadow); }
.pf-feature i {
    flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff;
}
.pf-feature i svg { width: 18px; height: 18px; }
.pf-feature:nth-child(1) i { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.pf-feature:nth-child(2) i { background: linear-gradient(135deg, #10b981, #06b6d4); }
.pf-feature:nth-child(3) i { background: linear-gradient(135deg, #e11d74, #f43f5e); }
.pf-feature:nth-child(4) i { background: linear-gradient(135deg, #f97316, #f59e0b); }

/* ---------------------------------------------------------------- uploader */

.pf-uploader { max-width: 500px; width: 100%; }
@media (min-width: 992px) { .pf-uploader { margin-right: 0; } }

[data-step] { animation: pf-step .45s var(--pf-ease) both; }
@keyframes pf-step { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.pf-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    min-height: 190px; padding: 1.5rem 1rem; margin-bottom: .5rem; cursor: pointer; text-align: center;
    border-radius: 22px; border: 2px dashed color-mix(in srgb, var(--pf-violet) 30%, var(--pf-border));
    background: var(--pf-grad-soft);
    transition: border-color .3s, transform .35s var(--pf-ease), background .3s;
}
.pf-drop strong { font-size: 1.05rem; }
.pf-drop:hover { border-color: color-mix(in srgb, var(--pf-violet) 60%, transparent); }
.pf-drop.over {
    /* animated gradient border while dragging */
    border: 2px solid transparent;
    background:
        linear-gradient(var(--pf-surface-solid), var(--pf-surface-solid)) padding-box,
        conic-gradient(from var(--pf-angle), #7c3aed, #e11d74, #f97316, #06b6d4, #7c3aed) border-box;
    animation: pf-spin-angle 2.2s linear infinite;
    transform: scale(1.015);
}
@keyframes pf-spin-angle { to { --pf-angle: 360deg; } }

.pf-drop-icon {
    position: relative; width: 64px; height: 64px; border-radius: 20px; margin-bottom: .5rem;
    display: grid; place-items: center; color: #fff; background: var(--pf-grad);
    box-shadow: 0 14px 30px -10px rgba(192, 38, 211, .7);
    transition: transform .45s var(--pf-ease);
}
.pf-drop-icon svg { width: 28px; height: 28px; }
.pf-drop-icon::after {
    /* pulse ring */
    content: ""; position: absolute; inset: -6px; border-radius: 24px; border: 2px solid rgba(192, 38, 211, .35);
    animation: pf-pulse 2.4s var(--pf-ease) infinite;
}
@keyframes pf-pulse { 0% { opacity: .9; transform: scale(.9); } 80%, 100% { opacity: 0; transform: scale(1.25); } }
.pf-drop:hover .pf-drop-icon { transform: translateY(-4px) rotate(-6deg); }
.pf-drop.over .pf-drop-icon { transform: translateY(-8px) scale(1.1); }

.pf-drop-folder { margin-bottom: .5rem; }
.pf-drop-folder .btn-link { font-size: .85rem; padding: .2rem .6rem; }

.pf-filelist { list-style: none; padding: 0; margin: 0 0 .5rem; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.pf-filelist li {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 13px;
    animation: pf-item .4s var(--pf-ease) both;
    transition: background .2s;
}
.pf-filelist li:hover { background: var(--pf-surface-2); }
.pf-filelist li.removing { animation: pf-item-out .25s ease-in forwards; }
@keyframes pf-item { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes pf-item-out { to { opacity: 0; transform: translateX(16px); } }

.pf-ext {
    flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    font-size: .62rem; font-weight: 800; letter-spacing: .03em; color: #fff;
    background: linear-gradient(135deg, #64748b, #94a3b8);
}
.pf-ext[data-kind="image"] { background: linear-gradient(135deg, #e11d74, #f97316); }
.pf-ext[data-kind="video"] { background: linear-gradient(135deg, #7c3aed, #e11d74); }
.pf-ext[data-kind="audio"] { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.pf-ext[data-kind="archive"] { background: linear-gradient(135deg, #f59e0b, #f97316); }
.pf-ext[data-kind="doc"] { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.pf-ext[data-kind="sheet"] { background: linear-gradient(135deg, #059669, #10b981); }
.pf-ext[data-kind="code"] { background: linear-gradient(135deg, #0f172a, #475569); }

.pf-fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pf-fname { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-fsize { font-size: .78rem; color: var(--pf-muted); }
.pf-remove {
    flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--pf-muted);
    display: grid; place-items: center; transition: background .2s, color .2s, transform .3s var(--pf-ease);
}
.pf-remove:hover { background: rgba(239, 68, 68, .12); color: var(--pf-red); transform: rotate(90deg); }
.pf-remove svg { width: 14px; height: 14px; }

.pf-total { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; font-size: .8rem; color: var(--pf-muted); }
.pf-total:empty { display: none; }
.pf-meter { flex: 1; height: 6px; border-radius: 99px; background: var(--pf-surface-2); overflow: hidden; }
.pf-meter i { display: block; height: 100%; width: 0; background: var(--pf-grad); border-radius: inherit; transition: width .5s var(--pf-ease); }
.pf-meter.over i { background: var(--pf-red); }

/* segmented control with a sliding pill */
.pf-tabs {
    position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: .9rem;
    background: var(--pf-surface-2); border-radius: 999px;
}
.pf-tabs::before {
    content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
    background: var(--pf-surface-solid); box-shadow: 0 4px 14px -4px rgba(76, 29, 149, .3);
    transition: transform .45s var(--pf-ease);
}
.pf-tabs[data-active="link"]::before { transform: translateX(100%); }
.pf-tabs button {
    position: relative; z-index: 1; border: 0; background: transparent; border-radius: 999px; padding: .55rem;
    font-size: .88rem; font-weight: 650; color: var(--pf-muted); transition: color .25s;
}
.pf-tabs button.active { color: var(--pf-text); }

.pf-options { margin-bottom: 1rem; border-radius: var(--pf-radius); border: 1px solid var(--pf-border); background: var(--pf-surface-solid); }
.pf-options summary {
    list-style: none; cursor: pointer; padding: .7rem .95rem; font-size: .88rem; font-weight: 650;
    display: flex; align-items: center; justify-content: space-between; color: var(--pf-muted);
}
.pf-options summary::-webkit-details-marker { display: none; }
.pf-options summary::after {
    content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px); transition: transform .35s var(--pf-ease);
}
.pf-options[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.pf-options[open] summary { color: var(--pf-text); }
.pf-options > div { padding: 0 .95rem .95rem; animation: pf-step .35s var(--pf-ease) both; }

/* progress */
.pf-progress { text-align: center; padding: .5rem 0; }
.pf-orbit { position: relative; width: 168px; height: 168px; margin: .25rem auto 1.25rem; }
.pf-orbit svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pf-orbit .track { stroke: var(--pf-surface-2); }
.pf-orbit .bar { stroke: url(#pf-ring-grad); stroke-linecap: round; transition: stroke-dashoffset .45s var(--pf-ease); }
.pf-orbit::before {
    /* soft rotating glow behind the ring */
    content: ""; position: absolute; inset: 14px; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(124, 58, 237, .0), rgba(225, 29, 116, .35), rgba(249, 115, 22, 0));
    animation: pf-rotate 2.4s linear infinite; will-change: transform;
}
.pf-orbit::after {
    content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--pf-surface-solid);
}
.pf-orbit-label {
    position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pf-orbit-label b { font-size: 2.1rem; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pf-orbit-label small { font-size: .72rem; color: var(--pf-muted); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
@keyframes pf-rotate { to { transform: rotate(360deg); } }

.pf-bar { height: 8px; border-radius: 99px; background: var(--pf-surface-2); overflow: hidden; margin: 1rem 0 1.25rem; }
.pf-bar > i {
    display: block; height: 100%; width: 0; border-radius: inherit; background: var(--pf-grad); position: relative;
    transition: width .45s var(--pf-ease);
}
.pf-bar > i::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: translateX(-100%); animation: pf-shimmer 1.4s ease-in-out infinite;
}
@keyframes pf-shimmer { to { transform: translateX(100%); } }

.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pf-stats div { background: var(--pf-surface-2); border-radius: 13px; padding: .55rem .4rem; }
.pf-stats b { display: block; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pf-stats small { font-size: .7rem; color: var(--pf-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }

/* done */
.pf-done { text-align: center; }
.pf-check { width: 92px; height: 92px; margin: .25rem auto 1rem; position: relative; }
.pf-check svg { width: 100%; height: 100%; }
.pf-check circle { fill: none; stroke: url(#pf-check-grad); stroke-width: 5; stroke-dasharray: 260; stroke-dashoffset: 260; animation: pf-draw .8s var(--pf-ease) forwards; }
.pf-check path { fill: none; stroke: url(#pf-check-grad); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: pf-draw .45s .55s var(--pf-ease) forwards; }
.pf-check.scan circle { stroke-dasharray: 40 220; animation: pf-rotate 1.4s linear infinite; transform-origin: center; stroke-dashoffset: 0; }
.pf-check.scan path { animation: none; stroke-dashoffset: 0; opacity: .35; }
@keyframes pf-draw { to { stroke-dashoffset: 0; } }

.pf-linkbox {
    display: flex; align-items: center; gap: .4rem; padding: .35rem .35rem .35rem .9rem; margin: 1.1rem 0 .75rem;
    border-radius: 999px; background: var(--pf-surface-solid); border: 1.5px solid var(--pf-border);
}
.pf-linkbox input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--pf-text); font-size: .9rem; font-weight: 600; outline: none; }
.pf-linkbox .btn { flex: none; }
.pf-copied { background: var(--pf-green) !important; }

/* confetti burst (spawned by site.js, removed after the animation) */
.pf-burst { position: absolute; left: 50%; top: 110px; width: 0; height: 0; pointer-events: none; z-index: 5; }
.pf-burst i {
    position: absolute; width: 8px; height: 12px; border-radius: 2px; background: var(--c);
    animation: pf-confetti 1.1s var(--pf-ease) forwards; will-change: transform, opacity;
}
@keyframes pf-confetti {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}

/* ---------------------------------------------------------------- transfer (download) page */

.pf-transfer { max-width: 560px; }
.pf-state { text-align: center; padding: .5rem 0; }
.pf-state-icon {
    width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 1.1rem; display: grid; place-items: center; color: #fff;
    background: var(--pf-grad); box-shadow: 0 16px 34px -12px rgba(192, 38, 211, .6);
}
.pf-state-icon svg { width: 34px; height: 34px; }
.pf-state-icon.danger { background: linear-gradient(135deg, #ef4444, #e11d74); box-shadow: 0 16px 34px -12px rgba(239, 68, 68, .6); }
.pf-state-icon.muted { background: linear-gradient(135deg, #64748b, #94a3b8); box-shadow: none; }
.pf-state-icon.scan { position: relative; overflow: hidden; }
.pf-state-icon.scan::after {
    content: ""; position: absolute; left: 0; right: 0; height: 40%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .6), transparent);
    animation: pf-scan 1.6s ease-in-out infinite;
}
@keyframes pf-scan { from { transform: translateY(-120%); } to { transform: translateY(260%); } }

.pf-tx-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.pf-tx-head .pf-state-icon { margin: 0; width: 56px; height: 56px; border-radius: 18px; flex: none; }
.pf-tx-head .pf-state-icon svg { width: 26px; height: 26px; }
.pf-tx-head h1 { font-size: 1.35rem; margin: 0 0 .15rem; }
.pf-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.pf-chip {
    display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px;
    background: var(--pf-surface-2); font-size: .78rem; font-weight: 650; color: var(--pf-muted);
}
.pf-chip svg { width: 13px; height: 13px; }
.pf-message {
    background: var(--pf-surface-2); border-radius: var(--pf-radius); padding: .9rem 1.05rem; white-space: pre-wrap;
    border-left: 3px solid var(--pf-violet); font-size: .95rem;
}

.pf-lock { max-width: 340px; margin: 0 auto; }

/* ---------------------------------------------------------------- generic pages (account, errors) */

.pf-page { max-width: 1040px; margin: 0 auto; animation: pf-rise .6s var(--pf-ease) both; }
.pf-page > h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.pf-page h2 { font-size: 1.1rem; color: var(--pf-muted); font-weight: 600; }
.pf-page .nav-pills .nav-link { border-radius: 999px; color: var(--pf-muted); font-weight: 600; }
.pf-page .nav-pills .nav-link.active { background: var(--pf-grad); color: #fff; }

.pf-auth { max-width: 430px; }
.pf-auth h1 { font-size: 1.6rem; margin-bottom: .25rem; }
.pf-auth .pf-sub { color: var(--pf-muted); margin-bottom: 1.5rem; font-size: .95rem; }
.pf-auth .pf-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .85rem; margin-top: 1.25rem; }
.pf-divider { display: flex; align-items: center; gap: .75rem; color: var(--pf-muted); font-size: .78rem; font-weight: 650; margin: 1.1rem 0 .4rem; }
.pf-divider::before, .pf-divider::after { content: ""; flex: 1; height: 1px; background: var(--pf-border); }

.pf-big-code {
    font-size: clamp(4rem, 12vw, 6.5rem); font-weight: 800; letter-spacing: -.06em; line-height: 1;
    background: var(--pf-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------- blazor */

#blazor-error-ui {
    display: none; position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 1000;
    background: var(--pf-surface-solid); color: var(--pf-text); border: 1px solid var(--pf-border);
    box-shadow: var(--pf-shadow-lg); border-radius: 999px; padding: .7rem 1.25rem; font-size: .9rem;
}
#blazor-error-ui .dismiss { cursor: pointer; margin-left: .75rem; }
.blazor-error-boundary { background: var(--pf-red); padding: 1rem; color: white; border-radius: var(--pf-radius); }
.blazor-error-boundary::after { content: "Bir hata oluştu."; }

.darker-border-checkbox.form-check-input { border-color: var(--pf-muted); }

/* ---------------------------------------------------------------- motion preferences */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important; animation-iteration-count: 1 !important;
        transition-duration: .001ms !important; scroll-behavior: auto !important;
    }
    .pf-ambient span, .pf-burst { display: none; }
}

/* inline icons inside text controls */
.btn svg, .pf-linkbox > svg, .pf-drop-folder svg { width: 1.1em; height: 1.1em; vertical-align: -.17em; }
.flex-none { flex: none; }
.min-w-0 { min-width: 0; }
.pf-filelist .btn-sm { padding: .4rem .55rem; }

/* done screen: link exists but is not live during the scan; red ring when blocked */
.pf-linkbox.pending { opacity: .6; border-style: dashed; }
.pf-check.bad circle, .pf-check.bad path { stroke: var(--pf-red); }

/* ==========================================================================
   Admin panel
   ========================================================================== */

.pf-admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; animation: pf-fade .4s ease both; }
@media (min-width: 992px) { .pf-admin { grid-template-columns: 230px minmax(0, 1fr); align-items: start; } }

.pf-admin-nav {
    background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: 22px; padding: .9rem;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--pf-shadow);
}
@media (min-width: 992px) { .pf-admin-nav { position: sticky; top: 88px; } }
.pf-admin-title { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pf-muted); padding: .3rem .6rem .6rem; }
.pf-admin-nav nav { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 991.98px) { .pf-admin-nav nav { flex-direction: row; overflow-x: auto; } .pf-admin-back { display: none !important; } }
.pf-admin-nav a {
    display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: 13px; white-space: nowrap;
    color: var(--pf-muted); font-weight: 600; font-size: .92rem; transition: background .2s, color .2s;
}
.pf-admin-nav a svg { width: 17px; height: 17px; flex: none; }
.pf-admin-nav a:hover { background: var(--pf-surface-2); color: var(--pf-text); }
.pf-admin-nav a.active { background: var(--pf-grad); color: #fff; box-shadow: 0 8px 20px -10px rgba(192, 38, 211, .7); }
.pf-admin-back { margin-top: .75rem; border-top: 1px solid var(--pf-border); border-radius: 0 0 13px 13px !important; padding-top: .9rem !important; }

.pf-admin-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.pf-admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.pf-admin-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: .1rem 0 .35rem; }
.pf-admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.pf-panel {
    background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: 22px; padding: 1.25rem;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--pf-shadow); min-width: 0;
    animation: pf-rise .5s var(--pf-ease) both;
}
.pf-panel.p-0 { padding: 0; overflow: hidden; }
.pf-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.pf-panel-head h2 { font-size: 1.02rem; margin: 0; }

.pf-admin-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 1200px) {
    .pf-admin-cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
    .pf-admin-cols.pf-cols-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
}
.pf-sticky { position: sticky; top: 88px; }

/* stat tiles */
.pf-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 1200px) { .pf-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-stat {
    position: relative; overflow: hidden; padding: 1.1rem 1.2rem; border-radius: 22px;
    background: var(--pf-surface); border: 1px solid var(--pf-border); box-shadow: var(--pf-shadow);
    animation: pf-rise .5s var(--pf-ease) both;
}
.pf-stat:nth-child(2) { animation-delay: .05s; } .pf-stat:nth-child(3) { animation-delay: .1s; } .pf-stat:nth-child(4) { animation-delay: .15s; }
.pf-stat::after {
    content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
    background: var(--pf-grad); opacity: .12;
}
.pf-stat small { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--pf-muted); }
.pf-stat b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; margin: .2rem 0; font-variant-numeric: tabular-nums; }
.pf-stat span { font-size: .82rem; color: var(--pf-muted); }
.pf-num-bad { color: var(--pf-red); }

/* bar chart: single series, thin rounded bars anchored to the baseline */
.pf-chart { position: relative; height: 210px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .5rem; }
.pf-chart-grid { display: flex; flex-direction: column; justify-content: space-between; font-size: .7rem; color: var(--pf-muted); text-align: right; padding-bottom: 20px; font-variant-numeric: tabular-nums; }
.pf-chart-bars {
    display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; align-items: end; padding-bottom: 20px; position: relative;
    background: linear-gradient(var(--pf-border), var(--pf-border)) 0 0 / 100% 1px no-repeat,
                linear-gradient(var(--pf-border), var(--pf-border)) 0 calc(50% - 10px) / 100% 1px no-repeat,
                linear-gradient(var(--pf-border), var(--pf-border)) 0 calc(100% - 20px) / 100% 1px no-repeat;
}
.pf-chart-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; }
.pf-chart-col i {
    display: block; width: min(22px, 70%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--pf-violet);
    transform-origin: bottom; animation: pf-grow .7s var(--pf-ease) both; transition: background .2s;
}
.pf-chart-col:hover i { background: var(--pf-pink); }
.pf-chart-col small { position: absolute; bottom: -20px; font-size: .68rem; color: var(--pf-muted); font-variant-numeric: tabular-nums; }
@keyframes pf-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.pf-table-toggle { margin-top: 1.1rem; }
.pf-table-toggle summary { font-size: .8rem; color: var(--pf-muted); cursor: pointer; font-weight: 600; }

/* storage gauges */
.pf-gauge-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; margin-bottom: .45rem; }
.pf-gauge-row b { font-variant-numeric: tabular-nums; }
.pf-gauge .pf-meter { height: 10px; }
.pf-mini-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.pf-mini-list div { background: var(--pf-surface-2); border-radius: 13px; padding: .6rem .3rem; }
.pf-mini-list span { display: block; font-size: .72rem; color: var(--pf-muted); font-weight: 650; }
.pf-mini-list b { font-size: 1.2rem; }

/* tables */
.pf-table-wrap { overflow-x: auto; }
.pf-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.pf-table th {
    text-align: left; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em;
    color: var(--pf-muted); padding: .75rem 1rem; border-bottom: 1px solid var(--pf-border); white-space: nowrap;
}
.pf-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--pf-border); vertical-align: middle; }
.pf-table tbody tr { transition: background .15s; }
.pf-table tbody tr:hover { background: color-mix(in srgb, var(--pf-surface-2) 70%, transparent); }
.pf-table tbody tr:last-child td { border-bottom: 0; }
.pf-panel:not(.p-0) .pf-table th:first-child, .pf-panel:not(.p-0) .pf-table td:first-child { padding-left: .25rem; }
.pf-table code, .pf-dl code { font-size: .8rem; color: var(--pf-muted); background: var(--pf-surface-2); padding: .1rem .4rem; border-radius: 6px; }
.pf-strong { font-weight: 650; color: var(--pf-text); }
a.pf-strong:hover { color: var(--pf-violet); }
.pf-ua { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* badges */
.pf-badge {
    display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px;
    font-size: .72rem; font-weight: 700; white-space: nowrap; background: var(--pf-surface-2); color: var(--pf-muted);
}
.pf-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pf-badge.ok { background: rgba(16, 185, 129, .14); color: #047857; }
.pf-badge.info { background: rgba(6, 182, 212, .14); color: #0e7490; }
.pf-badge.warn { background: rgba(245, 158, 11, .16); color: #b45309; }
.pf-badge.bad { background: rgba(239, 68, 68, .14); color: #b91c1c; }
.pf-badge.grad { background: var(--pf-grad); color: #fff; }
.pf-badge.grad::before { background: #fff; }
@media (prefers-color-scheme: dark) {
    .pf-badge.ok { color: #6ee7b7; } .pf-badge.info { color: #67e8f9; } .pf-badge.warn { color: #fcd34d; } .pf-badge.bad { color: #fca5a5; }
}

/* flash message */
.pf-flash {
    display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: 16px; font-size: .92rem; font-weight: 600;
    animation: pf-rise .45s var(--pf-ease) both;
}
.pf-flash svg { width: 18px; height: 18px; flex: none; }
.pf-flash.ok { background: rgba(16, 185, 129, .14); color: #047857; }
.pf-flash.err { background: rgba(239, 68, 68, .12); color: #b91c1c; }
@media (prefers-color-scheme: dark) { .pf-flash.ok { color: #6ee7b7; } .pf-flash.err { color: #fca5a5; } }

/* toolbar + pager */
.pf-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; }
.pf-toolbar .form-control { flex: 1 1 240px; }
.pf-toolbar .form-select { flex: 0 1 190px; }
.pf-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; }

/* definition list */
.pf-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .55rem 1.25rem; margin: 0; font-size: .9rem; }
.pf-dl dt { color: var(--pf-muted); font-weight: 600; }
.pf-dl dd { margin: 0; overflow-wrap: anywhere; }
.pf-pre {
    margin: .75rem 0 0; padding: .8rem 1rem; border-radius: 13px; background: var(--pf-surface-2); font-size: .78rem;
    white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; color: var(--pf-text);
}

/* users */
.pf-user-list { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.pf-user-card { padding: 1rem 1.1rem; }
.pf-user-top { display: flex; align-items: center; gap: .9rem; }
.pf-user-top .pf-avatar { width: 40px; height: 40px; font-size: 1rem; flex: none; }
.pf-user-edit { margin-top: .75rem; }
.pf-user-edit summary { font-size: .82rem; font-weight: 650; color: var(--pf-violet); cursor: pointer; list-style: none; }
.pf-user-edit summary::-webkit-details-marker { display: none; }
.pf-user-actions { display: flex; flex-direction: column; gap: .8rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--pf-border); animation: pf-step .3s var(--pf-ease) both; }

/* settings */
.pf-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.pf-field { display: flex; flex-direction: column; gap: .3rem; margin: 0; }
.pf-field-label { font-size: .8rem; font-weight: 650; color: var(--pf-muted); }
.pf-field-input { position: relative; display: block; }
.pf-field-input .form-control { padding-right: 3.6rem; font-variant-numeric: tabular-nums; }
.pf-field-input em { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .78rem; color: var(--pf-muted); pointer-events: none; }
.pf-field-hint { font-size: .74rem; color: var(--pf-muted); }
.pf-savebar {
    position: sticky; bottom: 1rem; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    flex-wrap: wrap; padding: .8rem .9rem .8rem 1.2rem; margin-top: 1.25rem; border-radius: 999px;
    background: var(--pf-surface); border: 1px solid var(--pf-border); box-shadow: var(--pf-shadow-lg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.pf-admin-main form > .pf-admin-cols + .pf-panel { margin-top: 1.25rem; }
.pf-admin-main form > .pf-admin-cols { margin-bottom: 0; }

/* ==========================================================================
   Dosyalarım (personal storage) + viewer
   ========================================================================== */

.pf-lib, .pf-viewer { display: flex; flex-direction: column; gap: 1.1rem; animation: pf-fade .4s ease both; }
.pf-lib-head, .pf-viewer-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem; flex-wrap: wrap; }
.pf-lib-head h1, .pf-viewer-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: .25rem 0 0; }
.pf-crumbs { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .85rem; color: var(--pf-muted); }
.pf-crumbs a { color: var(--pf-muted); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.pf-crumbs a:hover { color: var(--pf-violet); }
.pf-crumbs svg { width: 15px; height: 15px; }
.pf-crumbs b { color: var(--pf-text); }

.pf-quota { width: min(280px, 100%); display: flex; flex-direction: column; gap: .35rem; }
.pf-quota .pf-meter { height: 8px; }

.pf-lib-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pf-lib-hint { margin-left: auto; }

/* popover menus built on <details> */
.pf-pop { position: relative; }
.pf-pop > summary { list-style: none; cursor: pointer; }
.pf-pop > summary::-webkit-details-marker { display: none; }
.pf-pop-body {
    position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; min-width: 300px; padding: .9rem;
    display: flex; flex-direction: column; gap: .85rem;
    background: var(--pf-surface-solid); border: 1px solid var(--pf-border); border-radius: 18px; box-shadow: var(--pf-shadow-lg);
    animation: pf-pop .22s var(--pf-ease) both; transform-origin: top left;
}
.pf-pop-right { left: auto; right: 0; transform-origin: top right; }
@keyframes pf-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.pf-menu-btn {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--pf-muted);
    transition: background .2s, color .2s;
}
.pf-menu-btn:hover, .pf-menu[open] .pf-menu-btn { background: var(--pf-surface-2); color: var(--pf-text); }
.pf-menu-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* list */
.pf-lib-list { list-style: none; margin: 0; padding: .4rem; }
.pf-lib-row {
    display: flex; align-items: center; gap: .5rem; padding: .35rem .4rem; border-radius: 15px;
    transition: background .15s; animation: pf-item .35s var(--pf-ease) both;
}
.pf-lib-row:hover { background: color-mix(in srgb, var(--pf-surface-2) 75%, transparent); }
.pf-lib-row.pf-dim .pf-lib-main { opacity: .7; }
.pf-lib-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .8rem; color: var(--pf-text); padding: .25rem; border-radius: 12px; }
.pf-lib-main:hover { color: var(--pf-text); }
.pf-lib-main:hover .pf-fname { color: var(--pf-violet); }
.pf-folder-ico {
    flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}
.pf-folder-ico svg { width: 19px; height: 19px; }
.pf-thumb { flex: none; width: 38px; height: 38px; border-radius: 11px; object-fit: cover; background: var(--pf-surface-2); }
.pf-lib-dl { padding: .38rem .55rem; }

.pf-empty { text-align: center; padding: 3rem 1.5rem; }

/* upload queue */
.pf-lib-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.pf-lib-queue:empty { display: none; }
.pf-lib-queue li {
    display: flex; align-items: center; gap: .75rem; padding: .55rem .8rem; border-radius: 15px;
    background: var(--pf-surface); border: 1px solid var(--pf-border); animation: pf-item .35s var(--pf-ease) both;
}
.pf-lib-queue .pf-meter { width: 140px; flex: none; }
.pf-lib-queue li.done .pf-meter i { background: var(--pf-green); }
.pf-lib-queue li.failed .pf-meter i { background: var(--pf-red); width: 100% !important; }
.pf-lib-queue li.failed .pf-fsize { color: var(--pf-red); }

/* full-page drop overlay */
.pf-lib-drop {
    position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; opacity: 0;
    background: color-mix(in srgb, var(--pf-bg) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: opacity .2s;
}
.pf-lib-drop.show { opacity: 1; }
.pf-lib-drop > div {
    display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 2.5rem 3rem; border-radius: 28px;
    border: 2px solid transparent;
    background: linear-gradient(var(--pf-surface-solid), var(--pf-surface-solid)) padding-box,
                conic-gradient(from var(--pf-angle), #7c3aed, #e11d74, #f97316, #06b6d4, #7c3aed) border-box;
    animation: pf-spin-angle 2.2s linear infinite; box-shadow: var(--pf-shadow-lg);
    transform: scale(.96); transition: transform .3s var(--pf-ease);
}
.pf-lib-drop.show > div { transform: scale(1); }

/* viewer */
.pf-stage {
    position: relative; min-height: 320px; display: grid; place-items: center; padding: 1rem; border-radius: 26px;
    background: var(--pf-surface); border: 1px solid var(--pf-border); box-shadow: var(--pf-shadow-lg); overflow: hidden;
    animation: pf-rise .5s var(--pf-ease) both;
}
.pf-stage-media { max-width: 100%; max-height: 74vh; border-radius: 16px; display: block; background: #000; }
img.pf-stage-media { background: transparent; }
.pf-audio { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 2.5rem 1rem; width: min(520px, 100%); }
.pf-audio audio { width: 100%; }
.pf-text {
    width: 100%; max-height: 74vh; overflow: auto; margin: 0; padding: 1rem 1.15rem; border-radius: 16px; background: var(--pf-surface-2);
    font-size: .82rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; color: var(--pf-text);
}
.pf-stage:has(> .pf-text) { place-items: start stretch; }

/* share list */
.pf-share-list { display: flex; flex-direction: column; gap: .8rem; }
.pf-share { padding: 1rem 1.1rem; }
.pf-share-top { display: flex; align-items: center; gap: .85rem; margin-bottom: .2rem; }
.pf-share .pf-linkbox { margin-top: .75rem; }
.pf-share.pf-dim { opacity: .65; }
.pf-note { display: flex; gap: .45rem; align-items: flex-start; font-size: .78rem; color: var(--pf-muted); margin: .1rem .2rem .5rem; line-height: 1.4; }
.pf-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--pf-green); }

/* Quick send (anonymous) banner: first thing in the guest form */
.pf-quick {
    position: relative; display: flex; gap: .85rem; align-items: center;
    padding: .9rem 1rem; margin-bottom: 1rem; border-radius: var(--pf-radius);
    background: var(--pf-grad-soft), var(--pf-surface-solid);
    border: 1px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 10px 30px -14px rgba(225, 29, 116, .45);
    animation: pf-quick-in .6s var(--pf-ease) both;
}
.pf-quick::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
    background: var(--pf-grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.pf-quick-icon {
    flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
    background: var(--pf-grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(225, 29, 116, .7);
    animation: pf-quick-pulse 2.4s ease-in-out infinite;
}
.pf-quick-icon svg { width: 24px; height: 24px; }
.pf-quick-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.pf-quick-title { font-size: 1.08rem; line-height: 1.25; font-weight: 800; color: var(--pf-text); }
.pf-quick-sub { font-size: .9rem; color: var(--pf-text); opacity: .85; line-height: 1.35; }
.pf-quick-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.pf-quick-chips span {
    font-size: .75rem; font-weight: 700; padding: .18rem .6rem; border-radius: 999px;
    background: var(--pf-surface-solid); color: var(--pf-text); border: 1px solid var(--pf-border);
}
.pf-quick-more { text-align: center; font-size: .85rem; color: var(--pf-muted); margin: .55rem 0 .2rem; }
.pf-quick-more a { font-weight: 700; }
.pf-upsell {
    display: inline-flex; align-items: center; gap: .8rem; margin: .2rem 0 1.4rem; padding: .7rem 1.1rem .7rem .7rem;
    border-radius: 999px; text-decoration: none; color: var(--pf-text);
    background: var(--pf-surface-solid); border: 1px solid var(--pf-border); box-shadow: var(--pf-shadow);
    transition: transform .25s var(--pf-ease), box-shadow .25s var(--pf-ease), border-color .25s;
}
.pf-upsell:hover { transform: translateY(-2px); border-color: var(--pf-ring); box-shadow: var(--pf-shadow-lg); color: var(--pf-text); }
.pf-upsell-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--pf-grad); color: #fff; }
.pf-upsell-icon svg { width: 19px; height: 19px; }
.pf-upsell b { display: block; font-size: 1rem; line-height: 1.25; }
.pf-upsell small { display: block; font-size: .8rem; color: var(--pf-muted); }
.pf-upsell-arrow { font-size: 1.2rem; font-weight: 700; color: var(--pf-pink); transition: transform .25s var(--pf-ease); }
.pf-upsell:hover .pf-upsell-arrow { transform: translateX(3px); }
@media (max-width: 420px) { .pf-upsell { border-radius: var(--pf-radius); } }
@keyframes pf-quick-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pf-quick-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .pf-quick, .pf-quick-icon { animation: none; } }
@media (max-width: 420px) { .pf-quick { align-items: flex-start; } .pf-quick-icon { width: 40px; height: 40px; } }

/* Defender status card */
.pf-def-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.pf-def-grid > div { background: var(--pf-surface-2); border-radius: 14px; padding: .7rem .85rem; display: flex; flex-direction: column; gap: .15rem; }
.pf-def-grid span { font-size: .74rem; color: var(--pf-muted); font-weight: 650; }
.pf-def-grid b { font-size: 1rem; }
.pf-def-grid b.ok { color: #059669; } .pf-def-grid b.warn { color: #d97706; } .pf-def-grid b.bad { color: var(--pf-red); }
.pf-def-grid small { font-size: .72rem; color: var(--pf-muted); }
@media (prefers-color-scheme: dark) { .pf-def-grid b.ok { color: #6ee7b7; } .pf-def-grid b.warn { color: #fcd34d; } }

/* resume + offline notices */
.pf-resume {
    border-radius: 18px; padding: .9rem 1rem; margin-bottom: .9rem;
    background: linear-gradient(120deg, rgba(124, 58, 237, .10), rgba(249, 115, 22, .10)); border: 1px solid rgba(124, 58, 237, .25);
    animation: pf-rise .45s var(--pf-ease) both;
}
.pf-resume-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.pf-resume-head svg { width: 18px; height: 18px; color: var(--pf-violet); }
.pf-wait {
    display: flex; align-items: center; gap: .55rem; justify-content: center; margin-top: .9rem; padding: .55rem .8rem;
    border-radius: 12px; background: rgba(245, 158, 11, .14); color: #b45309; font-size: .82rem; font-weight: 600;
}
@media (prefers-color-scheme: dark) { .pf-wait { color: #fcd34d; } }
.pf-wait-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pf-pulse-dot 1.2s ease-in-out infinite; flex: none; }
@keyframes pf-pulse-dot { 50% { opacity: .25; transform: scale(.7); } }
.pf-lib-queue li.waiting .pf-fsize { color: #b45309; font-weight: 600; }

/* file type chips / labels */
.pf-types { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.pf-type {
    display: inline-flex; align-items: center; padding: .08rem .42rem; border-radius: 6px; font-size: .66rem; font-weight: 800;
    letter-spacing: .03em; color: #fff; background: linear-gradient(135deg, #64748b, #94a3b8);
}
.pf-type[data-kind="image"] { background: linear-gradient(135deg, #e11d74, #f97316); }
.pf-type[data-kind="video"] { background: linear-gradient(135deg, #7c3aed, #e11d74); }
.pf-type[data-kind="audio"] { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.pf-type[data-kind="archive"] { background: linear-gradient(135deg, #f59e0b, #f97316); }
.pf-type[data-kind="doc"] { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.pf-type[data-kind="sheet"] { background: linear-gradient(135deg, #059669, #10b981); }
.pf-type-label { font-weight: 650; color: var(--pf-text); }
.pf-thumb-wrap { position: relative; flex: none; display: inline-block; }
.pf-thumb-ext {
    position: absolute; right: -4px; bottom: -4px; padding: 0 .3rem; border-radius: 5px; font-size: .55rem; font-weight: 800;
    color: #fff; background: rgba(23, 19, 43, .85); line-height: 1.5;
}
.form-control[readonly] { background-color: var(--pf-surface-2); color: var(--pf-muted); cursor: default; }
