/* Laptop → iPhone File Transfer — ToolSphare pro UI */
.tool-widget:has(.ft-app) {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
}

.ft-app {
    --ft-accent: #00aeef;
    --ft-accent-2: #38bdf8;
    --ft-ok: #34d399;
    --ft-card: rgba(15, 23, 42, 0.82);
    --ft-border: rgba(148, 163, 184, 0.16);
    --ft-muted: #94a3b8;
    --ft-text: #e2e8f0;
    width: 100%;
}

.ft-app [hidden] {
    display: none !important;
}

.ft-shell {
    border: 1px solid var(--ft-border);
    border-radius: 20px;
    background:
        radial-gradient(ellipse 65% 40% at 0% 0%, rgba(0, 174, 239, .14), transparent 50%),
        radial-gradient(ellipse 45% 30% at 100% 0%, rgba(56, 189, 248, .08), transparent 45%),
        linear-gradient(180deg, #111827 0%, #0b1220 100%);
    padding: 1.1rem 1.15rem 1.3rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.ft-trust {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}

.ft-trust-item {
    padding: .35rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--ft-border);
    background: rgba(2, 8, 20, .45);
    font-size: .72rem;
    font-weight: 700;
    color: var(--ft-text);
}

.ft-layout {
    display: grid;
    grid-template-columns: minmax(200px, .85fr) minmax(0, 1.35fr) minmax(220px, .95fr);
    gap: .95rem;
    align-items: start;
    margin-bottom: 1.1rem;
}

.ft-side,
.ft-main {
    min-width: 0;
}

.ft-side-title {
    margin: 0 0 .85rem;
    font-size: .95rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: .45rem;
}

.ft-how,
.ft-device,
.ft-card {
    border: 1px solid var(--ft-border);
    border-radius: 16px;
    background: var(--ft-card);
    padding: .95rem 1rem 1.05rem;
}

.ft-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.ft-steps li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
}

.ft-step-num {
    flex: 0 0 1.65rem;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: .75rem;
    font-weight: 800;
    color: #041018;
    background: linear-gradient(135deg, var(--ft-accent), var(--ft-accent-2));
}

.ft-steps strong {
    display: block;
    font-size: .86rem;
    color: #f1f5f9;
    margin-bottom: .2rem;
}

.ft-steps p {
    margin: 0;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--ft-muted);
}

.ft-secure {
    margin-top: 1rem;
    display: flex;
    gap: .65rem;
    padding: .75rem .8rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 174, 239, .28);
    background: rgba(0, 174, 239, .1);
    color: var(--ft-accent-2);
}

.ft-secure strong {
    display: block;
    font-size: .82rem;
    color: #e0f2fe;
    margin-bottom: .15rem;
}

.ft-secure p {
    margin: 0;
    font-size: .74rem;
    line-height: 1.4;
    color: #bae6fd;
}

.ft-tabs {
    display: flex;
    gap: .35rem;
    margin-bottom: .75rem;
    padding: .3rem;
    border-radius: 12px;
    background: rgba(2, 8, 20, .5);
    border: 1px solid var(--ft-border);
}

.ft-tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--ft-muted);
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    padding: .55rem .7rem;
    border-radius: 9px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.ft-tab.is-active {
    background: linear-gradient(135deg, rgba(0, 174, 239, .95), rgba(56, 189, 248, .85));
    color: #041018;
}

.ft-panel[hidden] {
    display: none !important;
}

.ft-panel.is-active {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.ft-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
}

.ft-card-head h3 {
    margin: 0;
    font-size: .9rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ft-badge {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    color: #041018;
    background: linear-gradient(135deg, var(--ft-accent), var(--ft-accent-2));
}

.ft-wifi {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: .75rem .8rem;
    border-radius: 12px;
    border: 1px solid var(--ft-border);
    background: rgba(2, 8, 20, .4);
}

.ft-wifi-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--ft-accent);
    background: rgba(0, 174, 239, .12);
}

.ft-wifi-meta {
    flex: 1;
    min-width: 8rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.ft-wifi-label {
    font-size: .88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.ft-wifi-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    color: var(--ft-muted);
}

.ft-wifi-status.is-on {
    color: var(--ft-ok);
}

.ft-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: #64748b;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, .2);
}

.ft-wifi-status.is-on .ft-dot,
.ft-device-head .ft-dot.is-on {
    background: var(--ft-ok);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .22);
    animation: ft-pulse 1.8s ease-in-out infinite;
}

@keyframes ft-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: .85; }
}

.ft-wifi-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.ft-room-line {
    margin-top: .7rem;
    font-size: .84rem;
    color: var(--ft-muted);
}

.ft-room-line strong {
    color: var(--ft-accent-2);
    letter-spacing: .08em;
    margin-left: .35rem;
}

.ft-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
}

.ft-qr {
    min-height: 12rem;
    width: 100%;
    max-width: 14rem;
    display: grid;
    place-items: center;
    padding: .85rem;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, .28);
    background: rgba(2, 8, 20, .35);
}

.ft-qr img {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}

.ft-qr-placeholder {
    margin: 0;
    text-align: center;
    font-size: .82rem;
    padding: 1rem;
}

.ft-qr-actions,
.ft-share {
    width: 100%;
    max-width: 22rem;
}

.ft-link-btn {
    border: 0;
    background: none;
    color: var(--ft-accent-2);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ft-link-btn:hover {
    color: #7dd3fc;
}

.ft-join {
    width: 100%;
    max-width: 22rem;
}

.ft-join-row,
.ft-share-row {
    display: flex;
    gap: .45rem;
}

.ft-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--ft-muted);
    margin-bottom: .35rem;
}

.ft-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: 1px solid var(--ft-border);
    border-radius: 10px;
    background: rgba(2, 8, 20, .55);
    color: var(--ft-text);
    font: inherit;
    font-size: .85rem;
    padding: .55rem .7rem;
}

.ft-input:focus {
    outline: 2px solid rgba(0, 174, 239, .45);
    outline-offset: 1px;
}

.ft-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 9.5rem;
    padding: 1.25rem 1rem;
    border-radius: 14px;
    border: 1.5px dashed rgba(0, 174, 239, .4);
    background: rgba(0, 174, 239, .06);
    cursor: pointer;
    text-align: center;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.ft-drop:hover,
.ft-drop.is-drag {
    border-color: var(--ft-accent);
    background: rgba(0, 174, 239, .12);
    transform: translateY(-1px);
}

.ft-drop-icon {
    color: var(--ft-accent);
}

.ft-drop-title {
    font-size: .9rem;
    font-weight: 700;
    color: #f1f5f9;
}

.ft-drop-sub {
    font-size: .78rem;
    color: var(--ft-muted);
}

.ft-limit {
    margin: .55rem 0 0;
    font-size: .78rem;
}

.ft-upload-progress {
    margin-top: .85rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem .85rem;
    border-radius: 12px;
    border: 1px solid var(--ft-border);
    background: rgba(2, 8, 20, .4);
}

.ft-progress-ring,
.ft-phone-ring {
    --ft-pct: 0;
    position: relative;
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
}

.ft-progress-ring svg,
.ft-phone-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ft-ring-bg {
    fill: none;
    stroke: rgba(148, 163, 184, .2);
    stroke-width: 7;
}

.ft-ring-fg {
    fill: none;
    stroke: url(#ftGrad);
    stroke: var(--ft-accent);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 213.6;
    stroke-dashoffset: calc(213.6 - (213.6 * var(--ft-pct) / 100));
    transition: stroke-dashoffset .25s ease;
}

.ft-phone-ring .ft-ring-fg {
    stroke-dasharray: 263.9;
    stroke-dashoffset: calc(263.9 - (263.9 * var(--ft-pct) / 100));
}

.ft-progress-ring span,
.ft-phone-pct {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: .78rem;
    font-weight: 800;
    color: #f8fafc;
}

.ft-phone-pct {
    flex-direction: column;
    gap: .1rem;
    line-height: 1.1;
}

.ft-phone-pct strong {
    font-size: 1.05rem;
}

.ft-phone-pct span {
    font-size: .62rem;
    font-weight: 600;
    color: var(--ft-muted);
}

.ft-progress-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.ft-progress-meta strong {
    font-size: .86rem;
    color: #f1f5f9;
}

.ft-status {
    margin: 0;
}

.ft-status[hidden] {
    display: none !important;
}

.ft-device-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
}

.ft-device-head .ft-side-title {
    margin: 0;
}

.ft-icon-btn {
    border: 1px solid var(--ft-border);
    background: rgba(2, 8, 20, .4);
    color: var(--ft-muted);
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
}

.ft-icon-btn:hover {
    color: var(--ft-accent-2);
    border-color: rgba(0, 174, 239, .4);
}

.ft-phone {
    margin: 0 auto .9rem;
    width: 100%;
    max-width: 11.5rem;
    border-radius: 1.35rem;
    border: 2px solid rgba(148, 163, 184, .28);
    background: linear-gradient(180deg, #0f172a, #020617);
    padding: .45rem .4rem .65rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.ft-phone-notch {
    width: 38%;
    height: .28rem;
    margin: .2rem auto .55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, .35);
}

.ft-phone-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    padding: .35rem .25rem .2rem;
}

.ft-phone-ring {
    width: 6.2rem;
    height: 6.2rem;
}

.ft-phone-caption {
    margin: 0;
    font-size: .72rem;
    color: var(--ft-muted);
    text-align: center;
}

.ft-device-files h4 {
    margin: 0 0 .55rem;
    font-size: .8rem;
    font-weight: 700;
    color: #cbd5e1;
}

.ft-file-list,
.ft-history-list {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    max-height: 14rem;
    overflow: auto;
}

.ft-file-row,
.ft-history-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .65rem;
    padding: .65rem .7rem;
    border-radius: 10px;
    border: 1px solid var(--ft-border);
    background: rgba(2, 8, 20, .4);
}

.ft-file-name,
.ft-history-item strong {
    flex: 1;
    min-width: 6rem;
    font-size: .8rem;
    word-break: break-word;
    color: #f1f5f9;
}

.ft-file-size {
    font-size: .72rem;
}

.ft-file-row .btn-sm,
.ft-history-item .btn-sm {
    padding: .3rem .55rem;
    font-size: .72rem;
}

.ft-keep-open {
    margin-top: .85rem;
    padding: .65rem .75rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 174, 239, .25);
    background: rgba(0, 174, 239, .08);
    font-size: .74rem;
    line-height: 1.4;
    color: #bae6fd;
}

.ft-features {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .65rem;
}

.ft-feature {
    padding: .8rem .75rem;
    border-radius: 12px;
    border: 1px solid var(--ft-border);
    background: rgba(2, 8, 20, .4);
    text-align: center;
}

.ft-feature-icon {
    display: inline-grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    margin-bottom: .45rem;
    border-radius: 10px;
    color: var(--ft-accent);
    background: rgba(0, 174, 239, .12);
}

.ft-feature strong {
    display: block;
    font-size: .78rem;
    color: #f1f5f9;
    margin-bottom: .2rem;
}

.ft-feature p {
    margin: 0;
    font-size: .7rem;
    line-height: 1.35;
    color: var(--ft-muted);
}

@media (max-width: 1100px) {
    .ft-layout {
        grid-template-columns: 1fr 1fr;
    }

    .ft-how {
        grid-column: 1 / -1;
    }

    .ft-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ft-layout {
        grid-template-columns: 1fr;
    }

    .ft-features {
        grid-template-columns: 1fr 1fr;
    }

    .ft-wifi {
        flex-direction: column;
        align-items: stretch;
    }

    .ft-wifi-actions {
        width: 100%;
    }

    .ft-wifi-actions .btn {
        flex: 1;
    }
}

@media (max-width: 560px) {
    .ft-features {
        grid-template-columns: 1fr;
    }
}
