/* Files V2 — Modern UI */

#filesRoot{
    display: block;
    width: 100%;
    height: 100%;
    overflow: clip;
}

.f2-shell {
    height: -webkit-fill-available !important;
    display: flex;
    flex-direction: column;
}

.f2-subroute-container{
    display: block;
    
}

.f2-overview-layout {
    display: flex;
    flex-direction: column;
    height: -webkit-fill-available;
    overflow: auto;
}

.f2-overview-topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px 10px;
}

.f2-overview-body {
    display: grid;
    grid-template-columns: 6fr 2fr;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.f2-overview-main {
    display: grid;
    grid-template-rows: 200px 1fr;
    overflow-y: auto;
    min-height: 0;
}

.f2-main-top {
    padding: 10px 5px;
    display: block;
}

.f2-drop-area-card {
    width: 100%;
    height: stretch;
    border: px solid var(--primary-faded);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(185deg, var(--strans), var(--btrans));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.f2-drop-area-card.drag-over {
    border-color: var(--primary);
    background: var(--primary-faded);
    transform: translateY(-2px);
    border-style: dashed;
}

.f2-drop-area-content {
    text-align: center;
}

.f2-main-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.f2-drop-area-content p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

.f2-main-bottom {
    display: grid;
    grid-template-columns: 7fr 3fr;
    padding: 0 8px 8px;
    gap: 12px;
    height: -webkit-fill-available;
    overflow: auto;
}

.f2-recent-files-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    height: -webkit-fill-available;
    width: -webkit-fill-available;
}

.f2-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.f2-section-header h3 {
    margin: 0;
    font-size: 18px;
}

.f2-link-sm {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    padding: 3px 8px;
    background: var(--bg);
    border-radius: 10px;
}

.f2-table-wrap {
    background: var(--bg);
    border-radius: 12px;
    overflow-y: auto;
    border: 1px solid var(--primary-faded);
}

.f2-table {
    width: 100%;
    border-collapse: collapse;
}

.f2-table th {
    text-align: left;
    padding: 8px 6px;
    background: var(--primary-faded);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.f2-table td {
    padding: 6px 4px;
    border-bottom: 1px solid var(--primary-faded);
    font-size: 11px;
    overflow: hidden;
    text-wrap-mode: nowrap;
    justify-items: center;
}

.f2-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    min-width: 0;
    justify-self: flex-start;
}

.f2-name-cell span{
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-wrap: auto;
    font-size: 12px;
}

.f2-name-cell i {
    font-size: 20px;
    color: var(--primary);
}

.f2-pill {
    padding: 2px 8px;
    border-radius: 4px;
    background: color-mix(in srgb, transparent, var(--primary-dark));
    font-size: 10px;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
}

/* Activity Monitor */
.f2-activity-sidebar {
    padding: 2px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: stretch;
    overflow: auto;
}

.f2-activity-sidebar h3 {
    margin: 0;
    font-size: 16px;
}

.f2-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg);
    padding: 10px;
    border-radius: 12px;
    height: -webkit-fill-available;
    overflow: auto;
}

.f2-activity-item {
    display: flex;
    gap: 12px;
    position: relative;
    padding-bottom: 12px;
}

.f2-activity-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 10px;
    bottom: -2px;
    width: 1px;
    background: var(--primary-faded);
}

.f2-activity-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 5px;
    z-index: 1;
    box-shadow: 0 0 0 3px var(--bg);
}

.f2-activity-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.f2-activity-content p span {
    color: var(--primary);
    font-weight: 500;
}

.f2-activity-content small {
    font-size: 11px;
    color: var(--text-muted);
}

/* Right Sidebar (3 Columns) */
.f2-overview-right-sidebar {
    padding: 0 0 0 10px;
    overflow: auto;
}

.f2-rs-columns {
    display: grid;
    gap: 10px;
    padding: 10px 5px 8px 0;
    height: 100%;
    overflow: auto;
}

.f2-rs-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 3px;
    min-height: 0;
    height: -webkit-fill-available;
    overflow: auto;
}

/* Analyzer Pie */
.f2-pie-wrap {
    position: relative;
    width: 100%;
    max-width: 190px;
    aspect-ratio: 1;
    place-self: anchor-center;
}

.f2-pie-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.f2-pie-bg {
    fill: none;
    stroke: var(--primary-faded);
    stroke-width: 18px;
}

.f2-pie-segment {
    fill: none;
    stroke-width: 8px;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease, stroke-dashoffset 1s ease;
}

.f2-pie-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.f2-pie-text strong {
    font-size: 20px;
    font-weight: 700;
}

.f2-pie-text small {
    font-size: 10px;
    color: var(--text-muted);
}

/* Legend */
.f2-legend-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 5px;
}

.f2-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.f2-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    margin-top: 4px;
    flex-shrink: 0;
}

.f2-legend-info {
    display: flex;
    flex: 1;
    justify-content: space-between;
}

.f2-legend-name {
    font-size: 12px;
    font-weight: 500;
}

.f2-legend-val {
    font-size: 11px;
    color: var(--text-muted);
}

/* Providers Stack */
.f2-provider-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.f2-provider-card {
    display: flex;
    padding: 4px 8px;
    gap: 8px;
    border-radius: 12px;
    background: var(--bg);
    flex-direction: column;
}

.f2-pc-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.f2-pc-bottom {
    display: flex;
    flex-direction: column;
}

.f2-pc-left {
    position: relative;
    width: 25px;
    height: 25px;
}

.f2-pc-left i {
    font-size: 24px;
}

.f2-pc-avatar {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border: 2px solid var(--bg);
    border-radius: 50%;
    color: white;
    font-size: 9px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
}

.f2-pc-avatar img{
    contain: content;
    height: 100%;
    width: 100%;
    object-fit: fill;

}

.f2-pc-right {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.f2-pc-right strong {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.f2-pc-right small {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.f2-pc-progress {
    height: 5px;
    background: var(--primary-faded);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 6px;
}

.f2-pc-fill {
    height: 100%;
    background: var(--primary);
}

.f2-pc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--text-muted);
    height: 12px;
}

.f2-pc-meta button{height: 16px !important;padding: 2px 12px !important;font-size: 10px !important;}

/* Palette for pie segments */
:root {
    --p-color-0: antiquewhite;
    --p-color-1: darkorange;
    --p-color-2: deeppink;
    --p-color-3: #00ccff;
    --p-color-4: #9933ff;
}

/* Transfer Page */
#f2-subroute-container{
    display:flex;
    overflow: auto;
    flex-direction: column;
}

.f2-transfer-layout {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: -webkit-fill-available;
    height: stretch;
    overflow: hidden;
}

.f2-transfer-topbar {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f2-transfer-animation{
    display: flex;
}

.f2-transfer-columns-wrap {
    display:contents;
}

.f2-transfer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex: 1;
    gap: 1px;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.f2-transfer-col {
    user-select: none;
    display: flex;
    flex-direction: column;
    padding: .5rem .24rem;
    min-width: 0;
    min-height: 0;
    height: stretch;
    overflow-y: auto;
}

.f2-provider-transfer-card {
    padding: 10px;
    border: 1px solid var(--primary-faded);
    border-radius: 12px;
    background: var(--bg);
    position: relative;
}

.f2-provider-transfer-card.is-default {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-faded);
}

.f2-default-pill {
    position: absolute;
    top: -8px;
    right: 10px;
    background: var(--primary);
    color: white;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.f2-ptc-top {margin-bottom: 12px;}
.f2-ptc-identity {display: flex;gap: 12px;align-items: flex-start;}
.f2-ptc-icons {position: relative;width: 30px;height: 30px;}
.f2-ptc-icons i {font-size: 30px;}
.f2-ptc-avatar {
    position: absolute;
    bottom: -8px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 2px solid var(--strans);
    border-radius: 50%;
    color: white;
    font-size: 9px;
    display: grid;
    place-items: center;
}
.f2-ptc-info { display: flex; flex-direction: column; }
.f2-ptc-info strong { font-size: 14px; }
.f2-ptc-info small { font-size: 11px; color: var(--text-muted); }

.f2-ptc-storage { margin-bottom: 12px; }
.f2-ptc-bar { height: 6px; background: var(--primary-faded); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.f2-ptc-fill { height: 100%; background: var(--primary); }
.f2-ptc-legend { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); }

.f2-ptc-bottom { display: flex; justify-content: space-between; align-items: center; }
.f2-status-pill { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.f2-status-pill.online { background: #e6ffed; color: #22863a; }
.f2-status-pill.offline { background: #ffeef0; color: #d73a49; }

.f2-col-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--primary-faded);
    border-radius: 10px;
    padding: 0 12px;
}
.f2-col-search i { color: var(--text-muted); margin-right: 8px; }
.f2-col-search input {border: none;background: transparent;height: 20px;font-size: 11px; width: 100%; outline: none;}

.f2-col-tabs {display: flex;gap: 2px;}
.f2-col-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 15px;
}
.f2-col-tab.active {color: var(--primary);border-color: var(--primary-faded);}

.f2-col-files-space {
    flex: 1;
    background: var(--bg);
    border-radius: 10px;
    position: relative;
    min-height: 0;
    min-width: 0;
    height: -webkit-fill-available;
    width: -webkit-fill-available;
    overflow: hidden;
}

.f2-cloud-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 10px 2px 10px 6px;
    height: -webkit-fill-available;
    overflow: auto;
    align-content: start;
}

.f2-cloud-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--primary-faded);
    cursor: grab;
    font-size: 13px;
    transition: background 0.2s;
}

.f2-cloud-list-item:hover, .f2-cloud-item:hover {
    background: var(--primary-faded);
}

.f2-cloud-item i {
    color: var(--primary);
    font-size: 16px;
}

.f2-drop-overlay {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background: var(--primary-faded);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    border: 2px dashed var(--primary);
    z-index: 10;
    place-content: center;
    text-align: center;
}

.f2-transfer-footer {
    display: flex;
    position: absolute;
    bottom: 6px;
    right: 5px;
    align-items: center;
    padding: 0 4px 5px;
    justify-content: space-between;
    gap: 16px;
}

.f2-pending-list {
    flex: 1;
    display: flex;
    gap: 10px;
    overflow-x: scroll;
    padding: 5px 8px 1px;
    background: var(--strans);
    backdrop-filter: var(--backdrop-2);
    border-radius: 20px;
    border: var(--line);
}

.f2-pending-chip {
    background: var(--primary-faded);
    font-size: 12px;
    font-weight: 300;
    padding: 4px 9px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex: 0 0 auto;
    border: var(--line);
}

.f2-pending-chip button {
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

/* Settings Page */
.f2-settings-layout {
    display: flex;
    grid-template-columns: 240px 1fr;
    height: 100%;
    flex-direction: row-reverse;
}

.f2-settings-sidebar {
    border-left: 1px solid var(--primary-faded);
    padding: 16px 5px;
    width: 250px;
}

.f2-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.f2-settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    border-radius: 15px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.f2-settings-nav-item i {
    font-size: 18px;
    color: var(--text-muted);
}

.f2-settings-nav-item:hover {
    background: var(--primary-faded);
}

.f2-settings-nav-item.active {
    background: linear-gradient(to right, var(--primary-dark), var(--primary));
    color: white;
}

.f2-settings-nav-item.active i {
    color: white;
}

.f2-settings-main {
    padding: 15px 10px;
    overflow-y: auto;
    flex: 1;
}

.f2-settings-header {
    margin-bottom: 32px;
}

.f2-settings-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
}

.f2-settings-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--primary-faded);
}

.f2-settings-section h4 {
    margin: 0;
    font-size: 16px;
    color: var(--primary);
}

.f2-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.f2-sr-info {
    flex: 1;
}

.f2-sr-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.f2-sr-info p {
    margin: 0;
    font-size: 13px;
}

.f2-select {
    width: 200px;
}

.f2-input {
    width: 200px;
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--primary-faded);
    color: var(--text);
    outline: none;
}

.f2-input:focus {
    border-color: var(--primary);
}

/* PHASE 2 completion work */

/* Layout & Common Enhancements */

.f2-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Vault Sub-System */
.f2-vault-overlay {
    position: fixed;
    inset: 0;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: f2-fade-in 0.2s ease-out;
    transition: opacity 0.3s;
}

.f2-vault-boxes {
    display: flex;
    gap: 15px;
}

.f2-vault-box {
    width: 60px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.f2-vault-box.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--primary-faded);
}

.f2-vault-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Vault Styles */
.f2-vault-auth {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.f2-vault-auth-card {
    background: var(--surface);
    padding: 40px;
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--primary-faded);
    box-shadow: var(--shadow-lg);
}

.f2-vault-icon-lg {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 24px;
    display: block;
}

.f2-pin-input-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 32px 0;
}

.f2-pin-box {
    width: 50px;
    height: 60px;
    border: 2px solid var(--primary-faded);
    border-radius: 12px;
    background: var(--bg);
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    transition: all 0.2s;
}

.f2-pin-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-faded);
    outline: none;
}

.f2-pin-box.error {
    border-color: var(--danger);
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.f2-vault-welcome {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.f2-welcome-carousel {
    background: var(--surface);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    height: 400px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--primary-faded);
}

.f2-carousel-track {
    display: flex;
    flex: 1;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.f2-carousel-slide {
    min-width: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.f2-welcome-icon {
    font-size: 80px;
    color: var(--primary);
    margin-bottom: 24px;
}

.f2-carousel-nav {
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.f2-carousel-dots {
    display: flex;
    gap: 8px;
}

.f2-carousel-dots .f2-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-faded);
    transition: all 0.3s;
}

.f2-carousel-dots .f2-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary);
}

.f2-vault-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.f2-vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--primary-faded);
}

.f2-vh-left, .f2-vh-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.f2-vh-left i {
    font-size: 24px;
    color: var(--primary);
}

/* All Files & Selection UI */
.file-card.is-selected {
    border-color: var(--primary);
    background: var(--primary-faded);
    box-shadow: 0 0 0 1px var(--primary);
}

.f2-selection-info {
    font-weight: 600;
    color: var(--text-muted);
    background: var(--primary-faded);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* Move Modal */
.f2-move-modal {
    padding: 8px;
    min-width: 320px;
}

.f2-folder-tree-picker {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: -webkit-fill-available;
    border-radius: 0;
    padding: 0 0 0 5px;
    gap: 8px;
}

.f2-picker-root {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.f2-picker-root:hover {
    background: var(--primary-faded);
}

.anim-fade-in {
    animation: f2-fade-in 0.4s ease-out;
}

@keyframes f2-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.f2-provider-card.disconnected {
    opacity: 0.7;
    filter: grayscale(0.5);
}

/* All Files Grid V2 */
.files-v2-all {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 20px 10px 8px;
    gap: 10px;
}

.f2-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.f2-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.f2-breadcrumbs a:hover, .f2-breadcrumbs a.active {
    color: var(--primary);
    font-weight: 500;
}

.f2-search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--primary-faded);
    border-radius: 20px;
    padding: 0 10px;
    gap: 8px;
}

.f2-search-box i { color: var(--text-muted); }

.f2-input-clean {
    border: none;
    background: transparent;
    height: 30px;
    font-size: 13px;
    outline: none;
    color: var(--text);
}

.f2-category-filters {
    display: flex;
    gap: 4px;
}

.f2-cat-btn {
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.f2-cat-btn:hover {
    background: var(--primary-faded);
}

.f2-cat-btn.active {
    background: var(--primary);
    color: white;
}

.f2-select-clean {
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    outline: none;
}

.f2-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.f2-actions-group {
    display: flex;
    gap: 6px;
}

/* Account Avatar Button in All Files Header */
.f2-account-avatar-btn {
    border: var(--line);
    background: var(--strans);
    border-radius: 999px;
    padding: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.f2-account-avatar-btn:hover {
    background: var(--primary-faded);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.f2-account-avatar-btn .email-avatar{
    pointer-events:none
}
/* Custom Dropdown Adjustments */
.bits-dd-menu {
    min-width: 180px;
}

.bits-dd-item.danger {
    color: var(--danger);
}

.bits-dd-item.danger:hover {
    background: var(--danger-faded);
}

.f2-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.f2-sub-header .header-left, .f2-sub-header .header-right {
    display:flex;
    gap: 5px;
    align-items: center;
}

#f2-breadcrumbs{
    display: flex;
    align-items: center;
    background: var(--bg);
    padding: 6px 10px;
    border-radius: 15px;
    height: 34px;
}

.breadcrumbs{
    display: flex;
    gap: 5px;
}

.breadcrumbs a:hover{color: var(--primary-dark);}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-template-rows: auto;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    padding: 0;
    padding-right: 5px;
}

.file-grid.f2-layout-directory{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-grid .file-card {
    background: var(--strans);
    padding: 10px;
    border-radius: 15px;
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.file-card header{display:flex;gap: 1rem;justify-content: space-between;}
.file-card .file-meta{display:flex;flex-direction: column;flex: 1;overflow: hidden;}
.file-card .sm{padding: 0;width: 20px;font-size: 10px;}
.f2-layout-cards .file-card .file-meta{display:flex;flex-direction: column;flex: none;overflow: hidden;width: 80%;}
.file-card {
    background: var(--surface);
    border: 1px solid var(--primary-faded);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
    justify-content: space-between;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.file-card.drag-over {
    border-color: var(--primary);
    background: var(--primary-faded);
    transform: scale(1.02);
}

#filesGrid .file-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-align:left;
    text-overflow: ellipsis;
    text-transform: capitalize;
    width: -webkit-fill-available;
    max-width: none;
    opacity: 1;
}

#filesGrid .file-sub {
    font-size: 10px;
    text-wrap-mode: nowrap;
}

.file-hero {
    height: 100px;
    background: var(--bg);
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.files-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.files-actions-bar button {
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.files-actions-bar button:hover {
    background: var(--primary-faded);
}

/* PHASE 3 completion work */
.f2-tree-item[data-is-folder="true"], .is-folder{
    cursor:pointer !important;
}

.f2-tree-item[data-is-folder="true"] i{
    color: var(--primary);
}

.file-grid .f2-tree-item{
    cursor: pointer;
}

.f2-tree-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: var(--strans);
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.2s;
    cursor: grab;
}
.f2-tree-item:hover {
    background: var(--dots);
}
.f2-tree-item.selected { background: var(--primary-faded); color: var(--primary); }
.f2-tree-caret {
    width: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
}

.f2-col-header-actions {z-index: 12;display: flex;align-items: center;justify-content: space-between;padding: 2px;height: 0;background: var(--bg-card);border-bottom: 1px solid var(--border);}
.f2-col-header-actions .sm{backdrop-filter:blur(2px);}
.f2-col-search-morph { display: flex; align-items: center; flex: 1; margin-right: 10px; }
.f2-search-input {width: 100%;border: none;padding: 5px 5px;outline: none;border: 1px solid var(--primary); font-size: 10px;background: var(--strans);backdrop-filter: blur(5px);}
.f2-view-toggle{display:flex; gap:2px;align-items:center;}

.f2-cloud-grid {display: grid;grid-template-columns: repeat(2, minmax(50px, 1fr));gap: 10px;padding: 10px;}
.f2-cloud-grid .f2-cloud-item {flex-direction: column;text-align: center;height: auto;padding: 15px 5px;overflow: hidden;border-radius: 10px;}
.f2-cloud-grid .f2-cloud-item i {font-size: 20px;margin-bottom: 8px;margin-right: 0;}
.f2-cloud-grid .f2-cloud-item span {font-size: 10px;text-wrap-mode: nowrap;overflow: hidden;text-overflow: ellipsis;width: stretch;}

.f2-cloud-list-item {cursor: grab;padding: 5px;overflow: hidden;border-radius: 10px;display: flex;background: var(--strans);justify-content: space-between;align-items: center;gap: .21rem;height: max-content;flex-direction: column;}
.f2-cli-left {display: flex;flex-direction: column;overflow: hidden;align-items: center;width: stretch;}
.f2-cloud-list-item i {font-size: 20px;margin-bottom: 2px;margin-right: 0;}
.f2-cloud-list-item span {text-align: center;font-size: 10px;text-wrap-mode: nowrap;overflow: hidden;text-overflow: ellipsis;width: stretch;}
.f2-cli-right {font-size: 9px !important;text-wrap-mode: nowrap;}

#pendingAppBar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 10px;
    display: none;
    gap: 20px;
    transform: translateY(100%);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
#pendingAppBar.active {display: flex;transform: translateY(0);}

.f2-pc-remove { border: none; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; }
.f2-pc-remove:hover { color: var(--danger); }

.f2-card-check {position: absolute;top: 5px;left: 5px;z-index: 2;opacity: 0;transition: opacity 0.2s;}
.file-card:hover .f2-card-check, .file-card.is-selected .f2-card-check, .file-card.select-mode .f2-card-check { opacity: 1; }
#filesGrid .file-card.is-selected {border-color: var(--primary);background: var(--primary-faded);box-shadow: 0 0 0 1px var(--primary);}

.f2-ptc-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.f2-layout-cards {display: grid;grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));grid-template-rows: auto;gap: 8px;padding: 4px 4px 0 0;}
.f2-layout-cards .file-card {display: flex;flex-direction: row-reverse;align-items: center;padding: 4px 8px;height: auto;}
.f2-layout-cards .file-hero {width: 40px;height: 40px;margin: 0 12px 0 0;}
.f2-layout-cards .file-hero i {font-size: 24px !important;}
.f2-layout-cards header {flex: 1;margin: 0;padding: 0;border: none;gap: 0;display: grid;grid-template-columns: 1fr auto;align-items: center;}
.f2-layout-cards footer { display: none; }

.f2-vault-item { padding: 15px; display: flex; align-items: center; gap: 15px; }
.f2-vi-hero i { font-size: 32px; color: var(--primary); }
.f2-vi-info { display: flex; flex-direction: column; }

.f2-anim-idle {height: 40px;display: flex;align-items: center;justify-content: center;gap: 10px;font-size: 13px;font-style: italic;}

/* --- Files V2 Enhanced Tree & Explorer --- */

.f2-tree-node {
    user-select: none;
}

.f2-tree-item.is-active {
    background: var(--primary-faded) !important;
    border-left: 3px solid var(--primary);
    padding-left: 12px;
}

.f2-tree-label {
    flex: 1;
    font-weight: 500;
    font-size: 12px;
    overflow: hidden;
    text-wrap-mode: nowrap;
    text-overflow: ellipsis;
}

.f2-tree-children {
    border-left: 1px dashed var(--border-color);
    margin-left: 22px;
}

/* Explorer Sidebar */
.f2-explorer-body {
    display: flex;
    flex: 1;
    gap: 1rem;
    overflow: hidden;
}

.f2-explorer-sidebar {
    width: 260px;
    border-right: 1px solid var(--border-color);
    background: var(--surface-dim);
    overflow-y: auto;
}

.f2-main-content{
    flex: 1;
    overflow: overlay;
}

.f2-sidebar-tree{
    display:grid;
    gap: 5px;
}

.f2-sidebar-tree .f2-tree-item {
    padding: 8px 12px;
    border-bottom: none;
}

.f2-sidebar-tree .f2-tree-label {
    font-size: 13px;
}

/* Mini Mode */
.f2-tree-node.mini .f2-tree-item {
    padding: 6px 10px;
}

.f2-tree-node.mini .f2-tree-label {
    font-size: 12px;
}

/* Sync Status Bar */
.f2-sync-status-bar {
    background: var(--surface-light);
    border: 1px solid var(--primary-faded);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.f2-ssb-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.f2-ssb-text {
    display: flex;
    flex-direction: column;
}

.f2-ssb-main {
    font-size: 13px;
    font-weight: 600;
}

.f2-ssb-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.f2-ssb-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Folder Tree XL (Transfer) */
.f2-tree-xl-header {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 2px 2px;
    border-bottom: var(--line);
}
.f2-tree-xl-header .sm{
    width: 20px;
    height: 20px;
    font-size: 10px;
    color: var(--text-muted);
}
.f2-tree-xl-body{
    display:flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px 2px 5px 0;
    overflow-y: auto;
    min-height: 0;
    height: -webkit-fill-available;
}

.f2-xl-breadcrumbs {
    font-size: 10px;
    color: var(--text-muted);
}

.f2-tree-node.xl .f2-tree-item {
    padding: 6px 8px;
}

.f2-tree-node.xl .f2-tree-item:active {
    background: var(--primary-faded);
}

.f2-view-toggle-btn.active {
    background: var(--primary-faded);
    color: var(--primary);
}


/* --- Files V2 Unified Engine UI --- */

/* Transfer Navigation */
.f2-col-nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-dark);
    border-bottom: 1px solid var(--border-color);
}

.f2-nav-breadcrumbs {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}