:root {
    color-scheme: dark;
    --bg: #07101d;
    --bg-soft: #0b1728;
    --panel: rgba(13, 27, 45, .82);
    --panel-strong: rgba(12, 25, 42, .96);
    --line: rgba(157, 183, 214, .16);
    --line-strong: rgba(157, 183, 214, .28);
    --text: #f6f9ff;
    --muted: #9fb1c8;
    --green: #45e5b5;
    --green-strong: #20c997;
    --blue: #5c91ff;
    --violet: #8f73ff;
    --danger: #ff7387;
    --shadow: 0 30px 90px rgba(0, 0, 0, .38);
    --radius: 26px;
    --radius-small: 16px;
    --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 10%, rgba(69, 229, 181, .10), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(92, 145, 255, .14), transparent 34%),
        linear-gradient(150deg, #07101d 0%, #091322 45%, #07101b 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
body::selection { background: rgba(69, 229, 181, .32); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
svg { display: block; width: 1.25em; height: 1.25em; fill: currentColor; }
.shell { width: var(--shell); margin-inline: auto; }

.ambient {
    position: fixed;
    z-index: -3;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .16;
    pointer-events: none;
    animation: drift 18s ease-in-out infinite alternate;
}
.ambient-one { top: -220px; left: -160px; background: var(--green); }
.ambient-two { right: -180px; top: 180px; background: var(--blue); animation-delay: -7s; }
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}
@keyframes drift { to { transform: translate3d(90px, 45px, 0) scale(1.1); } }

.site-header, .app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(7, 16, 29, .72);
    backdrop-filter: blur(22px);
}
.header-inner, .app-header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(69,229,181,.30);
    border-radius: 15px;
    color: var(--green);
    background: linear-gradient(145deg, rgba(69,229,181,.15), rgba(92,145,255,.10));
    box-shadow: inset 0 1px rgba(255,255,255,.12), 0 10px 35px rgba(28,190,145,.14);
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { letter-spacing: .04em; font-size: 1.05rem; }
.brand-copy small { color: var(--muted); margin-top: 5px; font-size: .72rem; letter-spacing: .08em; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
    padding: 9px 12px;
    color: var(--muted);
    border-radius: 12px;
    font-size: .93rem;
    transition: .2s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.06); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.user-chip {
    max-width: 180px;
    padding: 8px 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    background: rgba(255,255,255,.045);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .82rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 760;
    letter-spacing: -.01em;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
    color: #03130f;
    background: linear-gradient(135deg, #53edbd, #4aa4ff);
    box-shadow: 0 15px 35px rgba(54, 197, 174, .24);
}
.button-primary:hover { box-shadow: 0 19px 44px rgba(54, 197, 174, .34); }
.button-ghost { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.button-ghost:hover { border-color: rgba(69,229,181,.44); background: rgba(69,229,181,.08); }
.button-small { min-height: 40px; padding: 8px 14px; font-size: .87rem; }

.hero {
    min-height: 700px;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: center;
    gap: clamp(36px, 7vw, 90px);
    padding-block: 88px 100px;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--green);
    font-weight: 800;
    font-size: .76rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1, .section-heading h2, .security-panel h2, .cta-section h2, .app-intro h1 {
    margin: 22px 0 18px;
    font-weight: 850;
    letter-spacing: -.052em;
    line-height: 1.02;
}
.hero h1 { font-size: clamp(3.35rem, 7vw, 6.45rem); }
.hero h1 span { color: transparent; background: linear-gradient(90deg, var(--green), #75b9ff 65%, #a68aff); -webkit-background-clip: text; background-clip: text; }
.hero-lead { max-width: 640px; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.22rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 31px; }
.access-notice {
    margin-top: 18px;
    padding: 12px 15px;
    color: #ffd8df;
    border: 1px solid rgba(255,115,135,.3);
    background: rgba(255,115,135,.08);
    border-radius: 12px;
    font-size: .9rem;
}
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.trust-row span {
    padding: 7px 10px;
    color: #b8c7d8;
    border: 1px solid var(--line);
    border-radius: 9px;
    font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .08em;
}

.hero-preview { position: relative; min-width: 0; perspective: 1100px; }
.preview-glow { position: absolute; inset: 12% 8%; background: linear-gradient(130deg, var(--green), var(--blue)); filter: blur(70px); opacity: .18; }
.preview-window {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(157,183,214,.23);
    border-radius: 25px;
    background: rgba(8,18,31,.93);
    box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.08);
    transform: rotateY(-5deg) rotateX(2deg);
}
.preview-topbar { min-height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.preview-topbar strong { justify-self: end; color: var(--green); font-size: .68rem; }
.traffic { display: flex; gap: 6px; }
.traffic i { width: 8px; height: 8px; border-radius: 50%; background: #ff7387; }
.traffic i:nth-child(2) { background: #ffc968; }
.traffic i:nth-child(3) { background: #50dfaa; }
.preview-body { display: grid; grid-template-columns: 63px 1fr; min-height: 410px; }
.preview-sidebar { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 0; border-right: 1px solid var(--line); background: rgba(255,255,255,.018); }
.preview-logo { color: var(--green); }
.preview-sidebar span { width: 19px; height: 19px; border-radius: 6px; background: rgba(255,255,255,.08); }
.preview-sidebar span.active { background: linear-gradient(135deg, var(--green), var(--blue)); box-shadow: 0 0 20px rgba(69,229,181,.25); }
.preview-files { position: relative; padding: 18px; overflow: hidden; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.preview-toolbar b { font-size: .82rem; }
.preview-toolbar em { padding: 7px 10px; color: #07121e; background: var(--green); border-radius: 8px; font: 800 .65rem/1 sans-serif; font-style: normal; }
.file-row { display: grid; grid-template-columns: minmax(0,1fr) 70px 70px; gap: 8px; align-items: center; min-height: 48px; padding: 0 9px; border-bottom: 1px solid rgba(255,255,255,.055); color: #c8d3df; font-size: .72rem; }
.file-row.heading { min-height: 34px; color: #73869e; text-transform: uppercase; letter-spacing: .09em; font-size: .56rem; }
.file-row > span:first-child { display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-row svg { width: 15px; color: #6fa7ff; }
.file-dot { width: 14px; height: 17px; border-radius: 3px; background: #8058c9; }
.file-dot.css { background: #3b78d8; }
.transfer-card { position: absolute; left: 18px; right: 18px; bottom: 18px; padding: 14px; border: 1px solid rgba(69,229,181,.24); border-radius: 14px; background: rgba(11,28,42,.96); box-shadow: 0 15px 40px rgba(0,0,0,.28); }
.transfer-card > div:first-child { display: flex; flex-direction: column; }
.transfer-card strong { font-size: .72rem; }
.transfer-card small { color: var(--muted); font-size: .58rem; }
.transfer-card > span { position: absolute; right: 14px; top: 14px; color: var(--green); font-size: .68rem; font-weight: 800; }
.progress { height: 4px; margin-top: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress i { display: block; width: 76%; height: 100%; background: linear-gradient(90deg, var(--green), var(--blue)); }

.section { padding-block: 96px; }
.section-heading { max-width: 720px; margin-bottom: 42px; }
.section-heading h2, .security-panel h2, .cta-section h2 { font-size: clamp(2.2rem, 4vw, 3.7rem); }
.section-heading p, .security-panel p { color: var(--muted); font-size: 1.04rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card, .connect-card, .status-card, .empty-browser {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(18,35,57,.82), rgba(9,21,36,.82));
    box-shadow: inset 0 1px rgba(255,255,255,.05);
}
.feature-card { min-height: 255px; padding: 25px; border-radius: 22px; transition: transform .25s ease, border-color .25s ease; }
.feature-card:hover { transform: translateY(-6px); border-color: rgba(69,229,181,.30); }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--green); border: 1px solid rgba(69,229,181,.2); border-radius: 16px; background: rgba(69,229,181,.08); }
.feature-icon svg { width: 25px; height: 25px; }
.feature-card h3 { margin: 25px 0 8px; font-size: 1.1rem; }
.feature-card p { color: var(--muted); margin: 0; font-size: .93rem; }
.feature-card code { color: var(--green); }

.security-panel { display: grid; grid-template-columns: 1.15fr .85fr; gap: 55px; align-items: center; padding: clamp(30px, 6vw, 70px); border: 1px solid rgba(92,145,255,.20); border-radius: 30px; background: linear-gradient(120deg, rgba(92,145,255,.10), rgba(69,229,181,.07), rgba(11,24,41,.88)); box-shadow: var(--shadow); }
.security-list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.security-list li { display: flex; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); font-weight: 700; }
.security-list span { color: var(--green); font: 800 .73rem/1 ui-monospace, monospace; }
.cta-section { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-block: 24px 110px; padding: 35px 40px; border: 1px solid rgba(69,229,181,.22); border-radius: 24px; background: linear-gradient(110deg, rgba(69,229,181,.09), rgba(92,145,255,.08)); }
.cta-section h2 { margin-bottom: 0; }

.site-footer { border-top: 1px solid var(--line); background: rgba(4,11,20,.55); }
.footer-inner { display: flex; justify-content: space-between; gap: 25px; padding-block: 30px; color: #8294ab; font-size: .78rem; }
.footer-inner p { margin: 0; }
.footer-inner a:hover { color: var(--green); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay { transition-delay: .12s; }

/* App */
.app-user { display: flex; align-items: center; gap: 15px; }
.app-user > span { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.app-user small { color: var(--muted); font-size: .68rem; }
.app-user strong { font-size: .88rem; }
.app-main { padding-block: 58px 90px; }
.app-intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.app-intro h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 12px; }
.app-intro p { max-width: 720px; color: var(--muted); margin: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 12px; border: 1px solid rgba(69,229,181,.25); border-radius: 999px; color: #baf6e5; background: rgba(69,229,181,.08); font-size: .78rem; font-weight: 750; }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.status-pill.muted { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,.035); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; }
.connect-card { padding: 28px; border-radius: 24px; }
.card-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.card-heading h2, .card-heading p { margin: 0; }
.card-heading h2 { font-size: 1.18rem; }
.card-heading p { color: var(--muted); font-size: .82rem; }
.connection-form { display: grid; grid-template-columns: 170px 1fr 130px; gap: 16px; }
.connection-form label { display: flex; flex-direction: column; gap: 8px; }
.connection-form label > span { color: #b5c3d3; font-size: .76rem; font-weight: 760; }
.field-wide { grid-column: span 2; }
.connection-form input, .connection-form select {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    color: var(--text);
    border: 1px solid var(--line-strong);
    outline: none;
    border-radius: 12px;
    background: rgba(4,13,24,.72);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.connection-form input:focus, .connection-form select:focus { border-color: rgba(69,229,181,.55); box-shadow: 0 0 0 4px rgba(69,229,181,.08); }
.connection-form select { color-scheme: dark; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.check { flex-direction: row !important; align-items: center; color: var(--muted); font-size: .8rem; }
.check input { width: 18px; min-height: 18px; accent-color: var(--green); }
.foundation-message { margin: 0; padding: 12px 14px; border: 1px solid rgba(92,145,255,.28); border-radius: 12px; color: #cddcff; background: rgba(92,145,255,.08); font-size: .83rem; }
.status-stack { display: grid; gap: 14px; }
.status-card { display: flex; flex-direction: column; padding: 20px; border-radius: 20px; }
.status-card small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.status-card strong { margin-top: 12px; font-size: 1.08rem; }
.status-card span { color: var(--muted); margin-top: 4px; font-size: .78rem; }
.status-card.accent { border-color: rgba(69,229,181,.23); background: linear-gradient(145deg, rgba(69,229,181,.11), rgba(9,21,36,.86)); }
.empty-browser { margin-top: 18px; overflow: hidden; border-radius: 24px; }
.browser-toolbar { min-height: 68px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); }
.browser-toolbar > div { display: flex; align-items: center; gap: 11px; }
.browser-icon { color: var(--blue); }
.empty-state { min-height: 300px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; text-align: center; }
.empty-icon { width: 62px; height: 62px; color: #6688b6; opacity: .7; }
.empty-state h2 { margin: 20px 0 7px; font-size: 1.2rem; }
.empty-state p { max-width: 580px; margin: 0; color: var(--muted); }

@media (max-width: 980px) {
    .main-nav { display: none; }
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-copy { max-width: 760px; }
    .hero-preview { max-width: 690px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .security-panel { grid-template-columns: 1fr; }
    .workspace-grid { grid-template-columns: 1fr; }
    .status-stack { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    :root { --shell: min(100% - 24px, 1180px); }
    .header-inner, .app-header-inner { min-height: 68px; }
    .header-actions .user-chip, .brand-copy small { display: none; }
    .header-actions .button { padding-inline: 12px; }
    .hero { padding-block: 65px 75px; }
    .hero h1 { font-size: clamp(2.8rem, 15vw, 4.2rem); }
    .preview-window { transform: none; }
    .preview-body { min-height: 330px; grid-template-columns: 48px 1fr; }
    .preview-files { padding: 12px; }
    .file-row { grid-template-columns: minmax(0,1fr) 54px; }
    .file-row > span:last-child { display: none; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: auto; }
    .section { padding-block: 70px; }
    .security-panel { padding: 25px; }
    .cta-section, .footer-inner, .app-intro { flex-direction: column; align-items: flex-start; }
    .cta-section { margin-bottom: 70px; padding: 28px; }
    .footer-inner { padding-block: 25px; }
    .connection-form { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .form-footer { align-items: stretch; flex-direction: column; }
    .status-stack { grid-template-columns: 1fr; }
    .app-user > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}


/* SOFON FTP PHASE 04 */
.security-note { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.foundation-message.is-loading { color: var(--blue); border-color: rgba(92,145,255,.28); background: rgba(92,145,255,.08); }
.foundation-message.is-success { color: var(--green); border-color: rgba(69,229,181,.30); background: rgba(69,229,181,.08); }
.foundation-message.is-error { color: #ffd7dd; border-color: rgba(255,115,135,.32); background: rgba(255,115,135,.10); }
.button[disabled] { opacity: .58; cursor: wait; transform: none; }
.connection-summary { padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.connection-summary strong { color: var(--text); }
.file-list-wrap { overflow-x: auto; }
.file-list { width: 100%; border-collapse: collapse; }
.file-list th, .file-list td { padding: 14px 22px; text-align: left; border-bottom: 1px solid var(--line); }
.file-list th { color: var(--muted); font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; }
.file-list td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.file-list tbody tr:hover { background: rgba(255,255,255,.025); }
.file-kind { display: inline-flex; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .72rem; }
.trust-dialog { width: min(650px, calc(100% - 32px)); border: 1px solid var(--line-strong); border-radius: 24px; padding: 0; color: var(--text); background: var(--panel-strong); box-shadow: var(--shadow); }
.trust-dialog::backdrop { background: rgba(2,8,16,.78); backdrop-filter: blur(8px); }
.trust-dialog-card { padding: 28px; }
.trust-dialog-heading { display: flex; gap: 16px; align-items: center; }
.trust-dialog h2 { margin: 0; }
.trust-dialog p { color: var(--muted); }
.trust-target { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.trust-target dt { color: var(--muted); }
.trust-target dd { margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.fingerprint-list { display: grid; gap: 10px; margin-block: 16px; }
.fingerprint { padding: 13px; border: 1px solid rgba(69,229,181,.22); border-radius: 13px; background: rgba(69,229,181,.055); }
.fingerprint strong { display: block; color: var(--green); font-size: .78rem; }
.fingerprint code { display: block; margin-top: 5px; overflow-wrap: anywhere; color: var(--text); }
.trust-warning { color: #ffd7a8 !important; }
.trust-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 640px) {
    .file-list th, .file-list td { padding-inline: 14px; }
    .trust-dialog-card { padding: 21px; }
    .trust-actions { flex-direction: column-reverse; }
    .trust-actions .button { width: 100%; }
}


/* SOFON FTP PHASE 05A */
.browser-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.connection-expiry { color: var(--muted); font: 700 .73rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.breadcrumbs { display: flex; align-items: center; gap: 7px; padding: 12px 22px; overflow-x: auto; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.018); }
.breadcrumbs button { flex: 0 0 auto; border: 0; padding: 6px 9px; color: var(--muted); background: transparent; border-radius: 9px; cursor: pointer; }
.breadcrumbs button:hover, .breadcrumbs button[aria-current="page"] { color: var(--text); background: rgba(69,229,181,.08); }
.breadcrumbs span { color: #60748f; }
.browser-message { margin: 14px 22px 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.025); }
.browser-message.is-error { color: #ffd7dd; border-color: rgba(255,115,135,.32); background: rgba(255,115,135,.08); }
.browser-message.is-loading { color: #bdd2ff; border-color: rgba(92,145,255,.28); background: rgba(92,145,255,.07); }
.file-name-button { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; border: 0; padding: 0; color: var(--text); background: transparent; cursor: pointer; text-align: left; font: inherit; }
.file-name-button:hover { color: var(--green); }
.file-name-button[disabled] { cursor: default; color: var(--muted); }
.file-symbol { width: 28px; height: 28px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; color: var(--blue); background: rgba(92,145,255,.07); font-family: ui-sans-serif, sans-serif; font-size: .82rem; }
.file-symbol.is-directory { color: #7fb0ff; }
.file-symbol.is-file { color: var(--green); }
.file-size, .file-modified { white-space: nowrap; color: var(--muted); font-size: .8rem; }
.file-action { white-space: nowrap; }
.file-action .button { min-height: 36px; padding: 7px 11px; font-size: .76rem; }
.file-list th:nth-child(1) { min-width: 270px; }
.file-list th:last-child, .file-list td:last-child { text-align: right; }
@media (max-width: 760px) {
    .browser-toolbar { align-items: flex-start; gap: 12px; padding-block: 14px; }
    .browser-actions { justify-content: flex-start; }
    .file-list th:nth-child(3), .file-list td:nth-child(3), .file-list th:nth-child(4), .file-list td:nth-child(4) { display: none; }
}

/* SOFON FTP PHASE 05B */
.file-action-group { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.button-danger { color: #ffd9df; border-color: rgba(255,115,135,.34); background: rgba(255,115,135,.10); }
.button-danger:hover { border-color: rgba(255,115,135,.58); background: rgba(255,115,135,.17); }
.upload-progress { display: flex; align-items: center; gap: 12px; margin: 14px 22px 0; color: var(--muted); font-size: .78rem; }
.upload-progress-track { min-width: 160px; height: 8px; flex: 1 1 280px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035); }
.upload-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .15s linear; }
.dialog-field { display: grid; gap: 8px; margin-top: 18px; }
.dialog-field span { color: var(--muted); font-size: .76rem; font-weight: 760; }
.dialog-field input { width: 100%; min-height: 48px; padding: 10px 13px; color: var(--text); border: 1px solid var(--line-strong); outline: none; border-radius: 12px; background: rgba(4,13,24,.72); }
.dialog-field input:focus { border-color: rgba(69,229,181,.55); box-shadow: 0 0 0 4px rgba(69,229,181,.08); }
.dialog-message { margin: 15px 0 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.025); }
.dialog-message.is-loading { color: #bdd2ff; border-color: rgba(92,145,255,.28); background: rgba(92,145,255,.07); }
.dialog-message.is-error { color: #ffd7dd; border-color: rgba(255,115,135,.32); background: rgba(255,115,135,.08); }
.danger-icon { color: #ffd7dd; border-color: rgba(255,115,135,.30); background: rgba(255,115,135,.10); font-weight: 900; }
.delete-path { display: block; padding: 13px; overflow-wrap: anywhere; border: 1px solid rgba(255,115,135,.22); border-radius: 12px; color: #ffd7dd; background: rgba(255,115,135,.055); }
@media (max-width: 800px) {
    .browser-toolbar { align-items: flex-start; gap: 12px; padding-block: 14px; }
    .browser-actions { justify-content: flex-start; }
    .file-action-group { min-width: 250px; justify-content: flex-start; }
    .upload-progress { align-items: flex-start; flex-direction: column; }
    .upload-progress-track { width: 100%; min-width: 0; flex-basis: auto; }
}


/* SOFON FTP PHASE 05C */
.upload-drop-zone {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 22px 0;
    padding: 16px 18px;
    border: 1px dashed rgba(92,145,255,.38);
    border-radius: 15px;
    color: var(--muted);
    background: linear-gradient(135deg, rgba(92,145,255,.055), rgba(69,229,181,.035));
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.upload-drop-zone:hover, .upload-drop-zone:focus-visible, .upload-drop-zone.is-dragover {
    outline: none;
    border-color: rgba(69,229,181,.68);
    background: linear-gradient(135deg, rgba(92,145,255,.10), rgba(69,229,181,.09));
    transform: translateY(-1px);
}
.upload-drop-zone strong, .upload-drop-zone small { display: block; }
.upload-drop-zone strong { color: var(--text); }
.upload-drop-zone small { margin-top: 4px; font-size: .76rem; line-height: 1.45; }
.upload-drop-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(69,229,181,.28);
    border-radius: 13px;
    color: var(--green);
    background: rgba(69,229,181,.07);
    font-size: 1.2rem;
    font-weight: 900;
}
.transfer-queue { margin: 14px 22px 18px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(4,13,24,.48); }
.transfer-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.transfer-queue-heading > div:first-child { display: grid; gap: 3px; }
.transfer-queue-heading span { color: var(--muted); font-size: .75rem; }
.transfer-queue-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.transfer-queue-list { display: grid; }
.transfer-item { display: grid; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.transfer-item:last-child { border-bottom: 0; }
.transfer-item.is-failed { background: rgba(255,115,135,.035); }
.transfer-item.is-done { background: rgba(69,229,181,.025); }
.transfer-item-heading, .transfer-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.transfer-item-heading > div { min-width: 0; }
.transfer-item-heading strong, .transfer-item-heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-item-heading small { margin-top: 3px; color: var(--muted); font-size: .72rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.transfer-state { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.is-uploading .transfer-state { color: #bdd2ff; border-color: rgba(92,145,255,.28); background: rgba(92,145,255,.07); }
.is-done .transfer-state { color: #bff5df; border-color: rgba(69,229,181,.28); background: rgba(69,229,181,.07); }
.is-failed .transfer-state { color: #ffd7dd; border-color: rgba(255,115,135,.30); background: rgba(255,115,135,.07); }
.transfer-progress-track { height: 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035); }
.transfer-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .12s linear; }
.is-failed .transfer-progress-track span, .is-cancelled .transfer-progress-track span { background: rgba(255,115,135,.65); }
.transfer-item-footer > span { min-width: 0; color: var(--muted); font-size: .73rem; overflow-wrap: anywhere; }
.transfer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
@media (max-width: 760px) {
    .upload-drop-zone { margin-inline: 14px; align-items: flex-start; }
    .transfer-queue { margin-inline: 14px; }
    .transfer-queue-heading, .transfer-item-heading, .transfer-item-footer { align-items: flex-start; flex-direction: column; }
    .transfer-actions { justify-content: flex-start; }
}


/* SOFON FTP 0.6.0 – branding and appearance */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.brand-mark img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 9px;
}
.preview-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 8px;
}
.theme-toggle {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: rgba(255,255,255,.045);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.theme-toggle:hover {
    transform: translateY(-2px);
    color: var(--green);
    border-color: rgba(69,229,181,.44);
    background: rgba(69,229,181,.08);
}
.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(69,229,181,.12);
}
.theme-toggle-icon { display: none; width: 20px; height: 20px; }
html[data-theme-mode="auto"] .theme-icon-auto,
html[data-theme-mode="light"] .theme-icon-light,
html[data-theme-mode="dark"] .theme-icon-dark { display: block; }
.ecosystem-link { transition: color .2s ease; }
.ecosystem-link:hover { color: var(--green); }

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f1f6fb;
    --bg-soft: #e7eef7;
    --panel: rgba(255, 255, 255, .86);
    --panel-strong: rgba(255, 255, 255, .98);
    --line: rgba(44, 66, 94, .14);
    --line-strong: rgba(44, 66, 94, .25);
    --text: #122236;
    --muted: #5d7087;
    --green: #0a9a73;
    --green-strong: #087a5d;
    --blue: #356fce;
    --violet: #7356d2;
    --danger: #cf4057;
    --shadow: 0 28px 80px rgba(54, 77, 107, .18);
}
html[data-theme="light"] body {
    background:
        radial-gradient(circle at 12% 10%, rgba(14, 171, 128, .12), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(68, 121, 218, .13), transparent 34%),
        linear-gradient(150deg, #f7fbff 0%, #edf4fb 45%, #f4f9fd 100%);
}
html[data-theme="light"] .grid-overlay {
    opacity: .32;
    background-image:
        linear-gradient(rgba(34,62,93,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,62,93,.055) 1px, transparent 1px);
}
html[data-theme="light"] .site-header,
html[data-theme="light"] .app-header {
    border-bottom-color: rgba(41,64,92,.10);
    background: rgba(247,251,255,.82);
}
html[data-theme="light"] .brand-mark {
    border-color: rgba(10,154,115,.24);
    background: linear-gradient(145deg, rgba(10,154,115,.11), rgba(53,111,206,.08));
    box-shadow: inset 0 1px rgba(255,255,255,.8), 0 10px 28px rgba(43,107,117,.10);
}
html[data-theme="light"] .main-nav a:hover,
html[data-theme="light"] .main-nav a[aria-current="page"],
html[data-theme="light"] .user-chip,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .button-ghost {
    background: rgba(31,62,96,.055);
}
html[data-theme="light"] .button-primary { color: #041712; }
html[data-theme="light"] .preview-window {
    border-color: rgba(52,82,119,.20);
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.9);
}
html[data-theme="light"] .preview-sidebar { background: rgba(43,72,105,.025); }
html[data-theme="light"] .preview-sidebar span { background: rgba(42,70,103,.10); }
html[data-theme="light"] .file-row { border-bottom-color: rgba(44,66,94,.08); color: #3c5068; }
html[data-theme="light"] .file-row.heading { color: #718398; }
html[data-theme="light"] .transfer-card {
    border-color: rgba(10,154,115,.22);
    background: rgba(255,255,255,.97);
    box-shadow: 0 15px 36px rgba(48,75,105,.14);
}
html[data-theme="light"] .progress,
html[data-theme="light"] .upload-progress-track,
html[data-theme="light"] .transfer-progress-track { background: rgba(42,70,103,.08); }
html[data-theme="light"] .feature-card {
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(239,246,252,.92));
    box-shadow: inset 0 1px rgba(255,255,255,.92);
}
html[data-theme="light"] .security-panel {
    background: linear-gradient(120deg, rgba(53,111,206,.08), rgba(10,154,115,.06), rgba(255,255,255,.88));
}
html[data-theme="light"] .security-list li,
html[data-theme="light"] .status-pill.muted,
html[data-theme="light"] .breadcrumbs,
html[data-theme="light"] .browser-message,
html[data-theme="light"] .dialog-message,
html[data-theme="light"] .trust-target {
    background: rgba(42,70,103,.035);
}
html[data-theme="light"] .cta-section {
    background: linear-gradient(110deg, rgba(10,154,115,.08), rgba(53,111,206,.07));
}
html[data-theme="light"] .site-footer { background: rgba(236,244,251,.82); }
html[data-theme="light"] .footer-inner { color: #63758a; }
html[data-theme="light"] .status-pill { color: #087a5d; }
html[data-theme="light"] .connection-form label > span { color: #52667e; }
html[data-theme="light"] .connection-form input,
html[data-theme="light"] .connection-form select,
html[data-theme="light"] .dialog-field input {
    color: var(--text);
    background: rgba(255,255,255,.92);
    color-scheme: light;
}
html[data-theme="light"] .foundation-message { color: #355987; }
html[data-theme="light"] .status-card.accent {
    background: linear-gradient(145deg, rgba(10,154,115,.09), rgba(255,255,255,.90));
}
html[data-theme="light"] .empty-browser,
html[data-theme="light"] .connect-card,
html[data-theme="light"] .status-card,
html[data-theme="light"] .trust-dialog-card { background: var(--panel); }
html[data-theme="light"] .file-list tbody tr:hover { background: rgba(42,70,103,.035); }
html[data-theme="light"] .trust-dialog::backdrop { background: rgba(25,42,62,.46); }
html[data-theme="light"] .breadcrumbs span { color: #7b8da2; }
html[data-theme="light"] .file-symbol { background: rgba(53,111,206,.07); }
html[data-theme="light"] .upload-drop-zone {
    background: linear-gradient(135deg, rgba(53,111,206,.055), rgba(10,154,115,.04));
}
html[data-theme="light"] .transfer-queue { background: rgba(255,255,255,.68); }
html[data-theme="light"] .transfer-item.is-failed { background: rgba(207,64,87,.04); }
html[data-theme="light"] .transfer-item.is-done { background: rgba(10,154,115,.035); }

@media (max-width: 640px) {
    .theme-toggle { width: 40px; height: 40px; flex-basis: 40px; }
    .app-user { gap: 8px; }
}

/* Phase 06B: browser-side connection memory, search and sorting */
.connection-memory {
    display: grid;
    grid-template-columns: minmax(190px, .9fr) minmax(260px, 1.35fr) auto auto;
    gap: 10px;
    align-items: center;
    margin: -5px 0 20px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.025);
}
.connection-memory-copy { display: flex; flex-direction: column; min-width: 0; }
.connection-memory-copy strong { font-size: .83rem; }
.connection-memory-copy small { color: var(--muted); font-size: .7rem; line-height: 1.35; }
.connection-memory select,
.file-tools input,
.file-tools select {
    min-height: 40px;
    padding: 8px 11px;
    color: var(--text);
    border: 1px solid var(--line-strong);
    outline: none;
    border-radius: 11px;
    background: rgba(4,13,24,.68);
    color-scheme: dark;
}
.connection-memory select:focus,
.file-tools input:focus,
.file-tools select:focus {
    border-color: rgba(69,229,181,.52);
    box-shadow: 0 0 0 4px rgba(69,229,181,.08);
}
.recent-connections { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 20px; }
.recent-connection-chip {
    max-width: 260px;
    padding: 7px 10px;
    overflow: hidden;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    font: 700 .69rem/1.2 inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.recent-connection-chip:hover,
.recent-connection-chip:focus-visible {
    color: var(--green);
    border-color: rgba(69,229,181,.34);
    background: rgba(69,229,181,.07);
    outline: none;
}
.file-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, auto) auto auto;
    gap: 10px;
    align-items: center;
    margin: 14px 20px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255,255,255,.022);
}
.file-search input { width: 100%; }
.file-sort { display: flex; align-items: center; gap: 8px; }
.file-sort > span { color: var(--muted); font-size: .72rem; font-weight: 750; }
.filter-summary { color: var(--muted); font-size: .72rem; text-align: right; white-space: nowrap; }
.shortcut-hint {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: .64rem;
    letter-spacing: .015em;
}
html[data-theme="light"] .connection-memory,
html[data-theme="light"] .file-tools,
html[data-theme="light"] .recent-connection-chip { background: rgba(42,70,103,.028); }
html[data-theme="light"] .connection-memory select,
html[data-theme="light"] .file-tools input,
html[data-theme="light"] .file-tools select {
    color: var(--text);
    background: rgba(255,255,255,.94);
    color-scheme: light;
}

@media (max-width: 1100px) {
    .connection-memory { grid-template-columns: 1fr 1fr; }
    .connection-memory-copy { grid-column: 1 / -1; }
    .file-tools { grid-template-columns: minmax(180px, 1fr) minmax(170px, auto) auto; }
    .filter-summary { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 720px) {
    .connection-memory { grid-template-columns: 1fr; }
    .connection-memory .button { width: 100%; }
    .file-tools { grid-template-columns: 1fr; margin-inline: 12px; }
    .file-sort { justify-content: space-between; }
    .file-sort select { flex: 1; }
    .file-tools .button { width: 100%; }
    .filter-summary { grid-column: auto; }
    .shortcut-hint { display: none; }
}
