@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --success: #059669;
    --success-light: #ECFDF5;
    --danger: #DC2626;
    --danger-light: #FEF2F2;
    --warning: #D97706;
    --warning-light: #FFFBEB;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

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

/* ===== LOGIN PAGE ===== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 50%, #C7D2FE 100%);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.login-card .logo p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ===== NAVBAR ===== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    margin-right: 1.5rem;
    text-decoration: none;
}

.navbar-brand:hover { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius);
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link i { width: 16px; height: 16px; flex-shrink: 0; }

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    width: 14px !important;
    height: 14px !important;
    transition: transform 0.2s;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-toggle { cursor: pointer; }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
    z-index: 300;
}

.nav-dropdown-right {
    left: auto;
    right: 0;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 400;
    border-radius: var(--radius);
    transition: background 0.1s;
    text-decoration: none;
}

.nav-dropdown-item i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--gray-400);
}

.nav-dropdown-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-dropdown-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-dropdown-item.active i { color: var(--primary); }

.dropdown-item-title {
    font-weight: 500;
    display: block;
    line-height: 1.3;
}

.dropdown-item-sub {
    font-size: 0.7rem;
    color: var(--gray-400);
    display: block;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.375rem 0;
}

.nav-dropdown-danger { color: var(--danger); }
.nav-dropdown-danger i { color: var(--danger); }
.nav-dropdown-danger:hover { background: var(--danger-light); }

/* User avatar in navbar */
.nav-user-toggle {
    gap: 0.5rem;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.nav-username {
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* Mobile toggle */
.navbar-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0.5rem;
    border-radius: var(--radius);
}

.navbar-mobile-toggle:hover { background: var(--gray-100); }
.navbar-mobile-toggle i { width: 22px; height: 22px; }

.navbar-mobile-menu {
    display: none;
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid var(--gray-200);
}

.navbar-mobile-menu.open {
    display: flex;
}

.navbar-mobile-menu .nav-link {
    padding: 0.65rem 0.75rem;
    width: 100%;
}

/* Main content */
.main-content {
    padding: 2rem;
    padding-top: calc(56px + 2rem);
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .navbar-right { display: none; }
    .navbar-mobile-toggle { display: block; }

    .main-content {
        padding: 1rem;
        padding-top: calc(56px + 1rem);
    }
}

/* ===== PAGE HEADER ===== */

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.page-header p {
    color: var(--gray-500);
    margin-top: 0.25rem;
}

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

/* ===== CARDS / STATS ===== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.stat-card .stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-card .stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-card .stat-icon.danger { background: var(--danger-light); color: var(--danger); }
.stat-card .stat-icon.warning { background: var(--warning-light); color: var(--warning); }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ===== CARD ===== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 1.5rem;
}

.card-body.no-padding {
    padding: 0;
}

/* ===== FORMS ===== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.form-check label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #047857;
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #B91C1C;
    color: var(--white);
}

.btn-outline {
    background: var(--white);
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

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

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* ===== TABLES ===== */

.table-responsive {
    overflow-x: auto;
}

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

table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

table td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: var(--gray-50);
}

/* ===== BADGES ===== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

/* ===== FILE BROWSER ===== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb .separator {
    color: var(--gray-400);
}

.breadcrumb .current {
    color: var(--gray-700);
    font-weight: 500;
}

.file-list-item {
    cursor: pointer;
}

.file-list-item td:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.file-icon.folder { color: var(--warning); }
.file-icon.file { color: var(--gray-400); }

/* ===== UPLOAD AREA ===== */

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--gray-50);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area svg {
    width: 48px;
    height: 48px;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.upload-area .btn {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    transition: width 0.3s ease;
    width: 0%;
}

.upload-status {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    color: var(--gray-500);
}

/* ===== PAGINATION ===== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.15s;
}

.pagination a:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
}

.pagination .disabled {
    color: var(--gray-300);
    pointer-events: none;
}

/* ===== ALERTS ===== */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #FECACA;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #A7F3D0;
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid #FDE68A;
}

/* ===== MODAL ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: color 0.15s;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ===== EMPTY STATE ===== */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ===== FILTERS BAR ===== */

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.filters-bar .form-group {
    margin-bottom: 0;
    min-width: 140px;
}

.filters-bar label {
    font-size: 0.75rem;
}

.filters-bar .form-control {
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
}

/* ===== SERVER CARDS (grid) ===== */

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

.server-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    transition: box-shadow 0.15s;
}

.server-card:hover {
    box-shadow: var(--shadow-md);
}

.server-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.server-card-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.server-card-info {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.server-card-info p {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.server-card-info svg {
    width: 14px;
    height: 14px;
    color: var(--gray-400);
}

.server-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== TOAST ===== */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    animation: slideIn 0.3s ease;
    min-width: 280px;
    border-left: 4px solid var(--gray-400);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== DUAL PANEL FILE MANAGER ===== */

.browser-fullscreen {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem;
    background: var(--gray-50);
    z-index: 1;
}

.browser-fullscreen .dual-panel {
    height: 100%;
}

.dual-panel {
    display: grid;
    grid-template-columns: 1fr 48px 1fr;
    gap: 0;
    height: calc(100vh - 56px - 6rem);
    min-height: 500px;
}

.panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.panel-title i { width: 16px; height: 16px; }

.panel-title-sub {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-left: 0.25rem;
}

.panel-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.panel-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.8rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    min-height: 34px;
}

.panel-breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}

.panel-breadcrumb .separator {
    color: var(--gray-400);
    font-size: 0.75rem;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    font-size: 0.75rem;
    color: var(--gray-500);
    flex-shrink: 0;
}

/* Center actions column */
.panel-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.panel-actions .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

/* File rows */
.file-list {
    min-height: 100%;
}

.file-row {
    display: grid;
    grid-template-columns: 28px 1fr 70px 90px;
    align-items: center;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--gray-50);
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.file-row:hover {
    background: var(--gray-50);
}

.file-row.selected {
    background: var(--primary-light);
}

.file-row-icon {
    display: flex;
    align-items: center;
}

.file-row-icon i {
    width: 16px;
    height: 16px;
}

.icon-folder { color: var(--warning); }
.icon-file { color: var(--gray-400); }

.file-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--gray-800);
}

.file-row-dir .file-row-name {
    color: var(--gray-900);
}

.file-row-size {
    text-align: right;
    color: var(--gray-500);
    font-size: 0.75rem;
}

.file-row-date {
    text-align: right;
    color: var(--gray-400);
    font-size: 0.75rem;
}

.file-row-actions {
    text-align: right;
}

.file-row-local {
    grid-template-columns: 28px 1fr 70px 32px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 2px;
    border-radius: 4px;
    transition: color 0.1s;
}

.btn-icon:hover {
    color: var(--danger);
}

/* Drop overlay */
.drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(79, 70, 229, 0.08);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s;
    pointer-events: none;
}

.drop-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drop-overlay i {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.drop-overlay span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
}

/* Empty panel state */
.empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--gray-400);
    gap: 0.25rem;
    height: 100%;
    min-height: 200px;
}

.empty-panel i {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
}

.empty-panel p {
    font-size: 0.85rem;
}

/* Transfer Queue */
.transfer-queue {
    position: fixed;
    bottom: 0;
    right: 1rem;
    width: 420px;
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    border-bottom: none;
    z-index: 500;
}

.transfer-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.transfer-queue-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transfer-queue-body {
    max-height: 250px;
    overflow-y: auto;
}

.transfer-queue-body.collapsed {
    display: none;
}

.transfer-item {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.transfer-item:last-child {
    border-bottom: none;
}

.transfer-item.done {
    opacity: 0.7;
}

.transfer-item.error .transfer-item-status {
    color: var(--danger);
}

.transfer-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.transfer-item-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-800);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-item-size {
    font-size: 0.7rem;
    color: var(--gray-400);
}

.transfer-item-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transfer-item-progress .progress-bar {
    flex: 1;
    height: 4px;
}

.transfer-item-status {
    font-size: 0.7rem;
    color: var(--gray-500);
    min-width: 60px;
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .dual-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
    }

    .panel-actions {
        flex-direction: row;
        padding: 0.5rem;
    }

    .panel {
        min-height: 300px;
    }

    .transfer-queue {
        width: 100%;
        right: 0;
    }
}

/* ===== LASSO SELECTION ===== */

.lasso-box {
    position: absolute;
    border: 1px solid var(--primary);
    background: rgba(79, 70, 229, 0.08);
    pointer-events: none;
    z-index: 5;
    border-radius: 2px;
}

.panel-body {
    user-select: none;
}

/* ===== OVERWRITE MODAL ===== */

#overwriteFileList li {
    padding: 0.3rem 0.5rem;
    background: var(--warning-light);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ===== UTILITY ===== */

.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-1 { flex: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
