:root {
    --bg: #070913;
    --sidebar-bg: rgba(11, 15, 30, 0.75);
    --panel-bg: rgba(17, 24, 48, 0.65);
    --panel-hover: rgba(22, 32, 64, 0.8);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text: #f3f6fc;
    --text-muted: #94a3b8;
    --primary: #8b5cf6; /* Violet */
    --primary-glow: rgba(139, 92, 246, 0.15);
    --accent: #22d3ee;  /* Cyan */
    --accent-glow: rgba(34, 211, 238, 0.2);
    --green: #10b981;   /* Emerald */
    --red: #f43f5e;     /* Rose */
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.2);
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: radial-gradient(circle at 0% 0%, #1e1138 0%, #070913 50%, #050d1a 100%);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(20px);
    padding: 30px 24px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.side-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 35px;
    padding-left: 6px;
}

.side-brand strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.side-brand span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: grid;
    place-items: center;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
    color: #fff;
}

.brand-mark i {
    width: 22px;
    height: 22px;
}

.brand-mark.small {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.25);
}

.brand-mark.small i {
    width: 18px;
    height: 18px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    background: #08111f;
    border: 1px solid var(--border);
}

nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

nav a i {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
}

nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

nav a:hover i {
    transform: translateX(2px);
}

nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

nav a.active i {
    color: var(--accent);
}

/* App Main Layout */
.app {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    padding: 30px 40px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(7, 9, 19, 0.35);
    backdrop-filter: blur(12px);
}

.topbar h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 40%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topbar p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.content {
    padding: 30px 40px;
    flex-grow: 1;
}

.pill {
    padding: 8px 16px;
    border-radius: 99px;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green {
    background-color: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.status-dot.red {
    background-color: var(--red);
    box-shadow: 0 0 10px var(--red);
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Cards Grid */
.grid.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6);
}

.card.glow {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.05);
}

.card.glow:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(139, 92, 246, 0.15);
}

.card-header-icon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card .icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    place-items: center;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.card:hover .icon-wrapper {
    color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.2);
}

.card.glow:hover .icon-wrapper {
    color: #c084fc;
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.25);
}

.card strong {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: -0.5px;
    word-break: break-all;
}

.card small {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.status-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-value.online {
    color: #34d399 !important;
}

.status-value.offline {
    color: var(--red) !important;
}

.status-value.online .status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green);
    animation: status-pulse-green 2s infinite;
}

.status-value.offline .status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--red);
    animation: status-pulse-red 2s infinite;
}

@keyframes status-pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes status-pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* Progress Bars */
.bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    overflow: hidden;
    margin: 14px 0 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panels */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    margin-bottom: 30px;
    position: relative;
}

.panel:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: inherit;
}

.panel h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.panel h2 i,
.panel h2 svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

/* Disk Usage Panel */
.disk-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.disk-panel h2 {
    margin-bottom: 0;
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.1);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.15);
    font-size: 13px;
    font-weight: 600;
}

.disk-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.disk-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.text-green {
    color: #34d399 !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.meter-xl-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 99px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.meter-xl {
    height: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 99px;
    overflow: hidden;
    border: none;
}

.meter-xl i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--green));
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Quick Actions Panel */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.quick-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: #c084fc;
    display: grid;
    place-items: center;
    transition: all 0.3s ease;
}

.quick-btn-icon i {
    width: 20px;
    height: 20px;
}

.quick-btn-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-btn-info strong {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    transition: color 0.25s ease;
}

.quick-btn-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.quick-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.quick-btn:hover .quick-btn-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
    transform: scale(1.05);
}

/* Toolbar & Generic Form Elements */
.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

input, textarea, select, button {
    font-family: var(--font-sans);
}

input, textarea, select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.25s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

button, .primary {
    border: 0;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white;
    font-weight: 700;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

button:hover, .primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    filter: brightness(1.1);
}

button:active, .primary:active {
    transform: translateY(0);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    align-items: end;
}

.form-grid label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.check-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.check-row input {
    width: auto;
}

/* File List & Manager (v2) */
.file-list {
    display: grid;
    gap: 8px;
}

.file-row {
    display: grid;
    grid-template-columns: 32px 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.2s ease;
}

.file-row:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--border-hover);
}

.file-row em {
    color: var(--text-muted);
    font-style: normal;
}

.file-row-wide {
    display: grid;
    grid-template-columns: 48px minmax(120px, 1fr) 80px 120px 60px 50px auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.015);
    transition: all 0.2s ease;
}

.file-row-wide:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-hover);
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.row-actions form {
    display: inline;
}

.linkbtn {
    background: none !important;
    border: 0 !important;
    color: var(--accent) !important;
    padding: 0 !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.linkbtn:hover {
    filter: brightness(1.2);
    text-decoration: underline;
}

.danger {
    color: var(--red) !important;
}

.linkbtn.danger {
    color: var(--red) !important;
}

.danger-btn {
    background: rgba(244, 63, 94, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(244, 63, 94, 0.25) !important;
    box-shadow: none !important;
}

.danger-btn:hover {
    background: var(--red) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2) !important;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 16px;
    font-weight: 600;
}

/* Dropdown de Ações */
.actions-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dropdown-trigger i {
    width: 18px;
    height: 18px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    min-width: 170px;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.dropdown-menu.show {
    display: block;
    animation: dropdown-fade-in 0.2s ease;
}

@keyframes dropdown-fade-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu a, .dropdown-menu button, .dropdown-menu .linkbtn {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    padding: 10px 16px !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: left !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.dropdown-menu a i, .dropdown-menu button i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.dropdown-menu a:hover, .dropdown-menu button:hover, .dropdown-menu .linkbtn:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #fff !important;
}

.dropdown-menu a:hover i, .dropdown-menu button:hover i {
    color: #fff;
}

.dropdown-menu .danger:hover {
    background: rgba(244, 63, 94, 0.1) !important;
    color: var(--red) !important;
}

.dropdown-menu .danger:hover i {
    color: var(--red);
}

/* Ícones Dinâmicos de Arquivo */
.icon-wrapper-file {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    transition: all 0.25s ease;
}

.icon-wrapper-file i {
    width: 20px;
    height: 20px;
}

.icon-folder {
    background: rgba(139, 92, 246, 0.12);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.18);
}

.icon-code {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.icon-archive {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.icon-image {
    background: rgba(34, 211, 238, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.18);
}

.icon-text {
    background: rgba(100, 116, 139, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.18);
}

/* Dynamic Dropzone Area */
.dropzone {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.005);
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.dropzone-desc {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.dropzone-desc i {
    width: 38px;
    height: 38px;
    color: var(--accent);
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.dropzone:hover i, .dropzone.drag i {
    transform: translateY(-4px) scale(1.05);
}

.dropzone strong {
    font-size: 15px;
    color: #fff;
    margin-bottom: 4px;
}

.dropzone span {
    font-size: 12px;
    color: var(--text-muted);
}

.dropzone .btn-upload-dummy {
    margin-top: 14px;
    pointer-events: none;
    z-index: 1;
}

.dropzone:hover, .dropzone.drag {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.03);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.12);
}

/* Editor */
body:has(.editor-panel),
body:has(.editor-panel) .app {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

body:has(.editor-panel) .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 24px;
}

body:has(.editor-panel) .editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0;
    padding: 24px;
}

body:has(.editor-panel) #editorForm {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.editor {
    width: 100%;
    min-height: 0;
    flex: 1;
    font-family: Consolas, 'Fira Code', Monaco, monospace;
    tab-size: 4;
    line-height: 1.6;
    background: #03050d;
    color: #e2e8f0;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    resize: none;
}

.editor:focus {
    outline: none;
    border-color: var(--primary);
}

.editor-panel h2 {
    margin: 0;
}

.editor-topline p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.editor-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.editor-tools input {
    flex: 1 1 150px;
    min-width: 100px;
    padding: 10px 14px;
    font-size: 13px;
}

.editor-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    height: 42px;
    min-width: 80px;
}

.autosave-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    height: 42px;
    user-select: none;
}

.autosave-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Switch toggle slide */
.autosave-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.autosave-toggle .toggle-slider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.autosave-toggle .toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.autosave-toggle input[type="checkbox"]:checked + .toggle-slider {
    background-color: rgba(34, 211, 238, 0.2);
    border-color: var(--accent);
}

.autosave-toggle input[type="checkbox"]:checked + .toggle-slider:before {
    transform: translateX(18px);
    background-color: var(--accent);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

.editor-statusbar {
    margin-top: 12px;
    color: var(--text-muted);
}

.terminal-window {
    background: #02040a;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-dots .dot.red { background-color: #ef4444; }
.terminal-dots .dot.yellow { background-color: #f59e0b; }
.terminal-dots .dot.green { background-color: #10b981; }

.terminal-title {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.log {
    white-space: pre-wrap;
    max-height: 380px;
    overflow: auto;
    background: transparent;
    color: #e2e8f0;
    padding: 16px;
    margin: 0;
    font-family: Consolas, 'Fira Code', Monaco, monospace;
    font-size: 13px;
    line-height: 1.6;
    border: none;
    border-radius: 0;
}

.log-not-found {
    background: rgba(244, 63, 94, 0.05);
    border: 1px dashed rgba(244, 63, 94, 0.2);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--red);
    font-weight: 500;
    font-size: 14px;
}

.log-not-found i {
    width: 20px;
    height: 20px;
}

/* Sites */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.site-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.015);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.site-card strong {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.site-card span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Notices & Warnings */
.notice {
    padding: 14px 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    color: #34d399;
    font-weight: 600;
    margin-bottom: 20px;
}

.warning {
    color: #fbbf24;
}

code {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2px 6px;
    color: #c4b5fd;
    font-family: Consolas, monospace;
}

/* Login Page */
.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: min(420px, 100%);
    background: var(--panel-bg);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 26px;
    padding: 40px 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), var(--shadow-glow);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-card h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 40%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.login-card form {
    width: 100%;
    text-align: left;
}

.login-card label {
    display: block;
    margin-top: 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
}

.login-card input {
    width: 100%;
    margin-top: 6px;
}

.login-card button {
    width: 100%;
    margin-top: 24px;
}

.login-card small {
    display: block;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 12px;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.alert {
    background: rgba(244, 63, 94, 0.15);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid rgba(244, 63, 94, 0.25);
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    text-align: left;
}

/* Between utility */
.between {
    justify-content: space-between;
    align-items: center;
}

.breadcrumb {
    color: var(--text-muted);
    margin-bottom: 15px;
    word-break: break-all;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb i {
    width: 16px;
    height: 16px;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.15);
}

/* File manager headers and grid view */
.file-manager-head {
    position: relative;
    overflow: hidden;
}

.file-manager-head:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), rgba(139, 92, 246, 0.05));
    pointer-events: none;
}

.file-manager-head > * {
    position: relative;
}

.compact-toolbar {
    align-items: center;
    gap: 8px;
}

.mode-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    display: grid;
    place-items: center;
}

.mode-btn i {
    width: 18px;
    height: 18px;
}

.mode-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.mode-btn.active {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
}

.quick-create {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.quick-create .toolbar {
    margin-bottom: 0;
}

.quick-create input {
    min-width: 0;
    flex: 1;
}

.upload-progress {
    display: none;
    width: min(320px, 100%);
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}

.upload-progress.show {
    display: block;
}

.upload-progress i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .15s ease;
}

.file-main {
    min-width: 0;
}

.file-main a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.file-main small {
    display: block;
    color: var(--text-muted);
    margin-top: 4px;
}

.empty-state {
    color: var(--text-muted);
    padding: 30px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    text-align: center;
    font-weight: 500;
}

/* File Grid/Card Mode */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.file-grid .file-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 160px;
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-grid .file-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.file-grid .file-card em {
    display: none; /* Hide date/permissions in grid cards to keep clean */
}

.file-grid .file-card .file-main {
    width: 100%;
    margin-top: 4px;
}

.file-grid .file-card .file-main a {
    white-space: normal;
    word-break: break-word;
    font-size: 15px;
    line-height: 1.3;
}

.file-grid .file-card .actions-dropdown {
    position: absolute;
    top: 16px;
    right: 16px;
}

.file-grid .file-card .row-actions {
    display: none; /* Collapsed under actions-dropdown */
}

.zip-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
}

.zip-list div {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 100px 140px;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.zip-list span {
    word-break: break-word;
}

.zip-list em {
    color: var(--text-muted);
    font-style: normal;
}

@media (max-width: 1250px) {
    .content {
        padding: 20px 24px;
    }
    .panel {
        padding: 20px;
    }
    .file-row-wide {
        grid-template-columns: 48px minmax(120px, 1fr) 80px 120px auto;
    }
    .file-row-wide em:nth-of-type(3),
    .file-row-wide em:nth-of-type(4) {
        display: none;
    }
}

@media (max-width: 1100px) {
    .file-row-wide {
        grid-template-columns: 48px minmax(120px, 1fr) 80px auto;
    }
    .file-row-wide em:nth-of-type(2) {
        display: none;
    }
}

/* Responsividade (Geral) */
@media (max-width: 990px) {
    body {
        display: block;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 24px;
    }
    .app {
        margin-left: 0;
        width: 100%;
    }
    .topbar {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .content {
        padding: 24px;
    }
    .disk-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .file-row {
        grid-template-columns: 42px 1fr auto;
        gap: 14px;
    }
    .file-row em {
        display: none; /* Hide less critical details on tablet */
    }
    .file-row-wide {
        grid-template-columns: 42px 1fr auto;
    }
    .file-row-wide em {
        display: none;
    }
    .file-row-wide .row-actions {
        display: none; /* collapsed inside dropdown */
    }
}

@media(max-width: 820px) {
    .file-grid {
        grid-template-columns: 1fr;
    }
    .zip-list div {
        grid-template-columns: 1fr;
    }
    .editor-tools {
        grid-template-columns: 1fr;
    }
    .editor-tools button, .editor-tools input {
        width: 100%;
    }
    .topbar {
        gap: 14px;
        align-items: flex-start;
    }
    .pill {
        white-space: nowrap;
    }
}

/* Banco de Dados */
.database-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    margin-bottom: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(34, 211, 238, .12), transparent 34%), var(--panel);
}
.database-hero-copy { display: flex; align-items: center; gap: 18px; }
.database-hero-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: grid;
    place-items: center;
    color: #22d3ee;
    background: rgba(34, 211, 238, .1);
    border: 1px solid rgba(34, 211, 238, .25);
    border-radius: 16px;
}
.database-hero-icon svg { width: 30px; height: 30px; }
.database-hero .eyebrow { color: #22d3ee; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.database-hero h2 { margin: 5px 0 7px; font-size: 24px; }
.database-hero p { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.55; }
.database-launch { white-space: nowrap; }
.database-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.database-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 20px;
}
.database-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.database-tools > div {
    display: flex;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,.018);
}
.database-tools > div > svg { width: 20px; flex: 0 0 20px; color: #22d3ee; }
.database-tools span, .database-tools strong, .database-tools small { display: block; }
.database-tools strong { margin-bottom: 4px; }
.database-tools small { color: var(--muted); line-height: 1.4; }
.database-access-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}
.database-access-row code { color: #c4b5fd; word-break: break-all; text-align: right; }
.database-warning {
    display: flex;
    gap: 11px;
    padding: 13px;
    margin: 16px 0;
    border: 1px solid rgba(245, 158, 11, .25);
    border-radius: 10px;
    color: #fbbf24;
    background: rgba(245, 158, 11, .08);
}
.database-warning svg { width: 19px; flex: 0 0 19px; }
.database-warning p { margin: 0; color: #d6b96e; font-size: 12px; line-height: 1.5; }
.btn.full { width: 100%; justify-content: center; }
@media (max-width: 1050px) {
    .database-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .database-hero { align-items: flex-start; flex-direction: column; }
    .database-launch { width: 100%; justify-content: center; }
    .database-status-grid, .database-tools { grid-template-columns: 1fr; }
}

.btn-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}
.btn-icon-link:hover {
    color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.2);
}
.btn-icon-link i {
    width: 16px;
    height: 16px;
}

.file-actions-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   Settings Page Custom Styles
   ========================================================================== */
.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    align-items: flex-end;
}

.settings-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.settings-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.settings-input-group:focus-within label {
    color: var(--accent);
}

.settings-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-input-wrapper input {
    width: 100%;
    padding-left: 44px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(0, 0, 0, 0.35);
}

.settings-input-wrapper i,
.settings-input-wrapper svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.settings-input-wrapper:focus-within i,
.settings-input-wrapper:focus-within svg {
    color: var(--accent);
    transform: scale(1.1);
}

/* Premium toggle switch */
.settings-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    height: 46px;
    user-select: none;
    width: 100%;
}

.settings-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.settings-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle .toggle-slider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.settings-toggle .toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-toggle input[type="checkbox"]:checked + .toggle-slider {
    background-color: rgba(34, 211, 238, 0.2);
    border-color: var(--accent);
}

.settings-toggle input[type="checkbox"]:checked + .toggle-slider:before {
    transform: translateX(18px);
    background-color: var(--accent);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

/* Save settings button */
.settings-btn-save {
    height: 46px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white;
    font-weight: 700;
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
    width: 100%;
}

.settings-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4), 0 0 15px rgba(168, 85, 247, 0.2);
    filter: brightness(1.1);
}

.settings-btn-save i {
    transition: transform 0.25s ease;
}

.settings-btn-save:hover i {
    transform: rotate(15deg) scale(1.1);
}

/* Login section updates */
.settings-credentials-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-credential-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.25s ease;
}

.settings-credential-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-hover);
}

.settings-credential-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-credential-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-credential-value {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

.settings-credential-value code {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px 8px;
    color: #c4b5fd;
    font-family: Consolas, monospace;
    font-size: 13px;
}

/* Clipboard Copy Button */
.settings-btn-copy {
    background: rgba(255, 255, 255, 0.04) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.settings-btn-copy:hover {
    color: var(--accent) !important;
    background: rgba(34, 211, 238, 0.1) !important;
    border-color: rgba(34, 211, 238, 0.2) !important;
    transform: scale(1.05);
}

.settings-btn-copy i,
.settings-btn-copy svg {
    width: 16px !important;
    height: 16px !important;
    color: inherit !important;
    display: inline-block !important;
}

/* Copy success toast/tooltip indicator */
.settings-copy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(34, 211, 238, 0.2);
    backdrop-filter: blur(12px);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.settings-copy-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Security notice banner */
.settings-security-notice {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-left: 4px solid #fbbf24;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #fbbf24;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
}

.settings-security-notice i,
.settings-security-notice svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #fbbf24;
    margin-top: 1px;
}

.settings-security-notice strong {
    font-weight: 700;
}

/* Caminhos do sistema cards grid */
.settings-paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.settings-path-card {
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.settings-path-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.settings-path-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--accent);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(34, 211, 238, 0.08);
}

.settings-path-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.15);
    color: var(--accent);
    display: grid;
    place-items: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.settings-path-card:hover .settings-path-icon {
    background: var(--accent);
    color: #070913;
    box-shadow: 0 0 12px var(--accent);
    transform: scale(1.05);
}

.settings-path-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.settings-path-label {
    color: var(--text-muted);
    display: block;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.settings-path-value {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    word-break: break-all;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(7, 9, 19, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: min(600px, 90%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: none;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.25);
}

.btn-confirm:hover {
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.4);
}

.btn-confirm:disabled {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
}

.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.selected-file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.selected-file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.selected-file-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-file-size {
    font-size: 11px;
    color: var(--text-muted);
}

.status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.status-badge.replace {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.new {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.file-manager-head {
    padding: 18px 24px;
}

@media (min-width: 991px) {
    body:has(.file-manager-head),
    body:has(.file-manager-head) .app {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    body:has(.file-manager-head) .content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 20px 30px;
        gap: 16px;
    }

    body:has(.file-manager-head) .file-manager-head {
        margin-bottom: 0;
    }

    body:has(.file-manager-head) .file-list-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
        margin-bottom: 0;
        padding: 20px 24px;
    }

    body:has(.file-manager-head) .file-list-panel .file-list {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        padding-right: 6px;
    }
}
