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

:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-hover: #1f2937;
    --accent-cyan: #00d4ff;
    --accent-pink: #f472b6;
    --accent-purple: #a78bfa;
    --accent-blue: #60a5fa;
    --accent-orange: #fb923c;
    --accent-green: #4ade80;
    --accent-yellow: #fbbf24;
    --accent-teal: #2dd4bf;
    --text: #ffffff;
    --text-dim: #8b949e;
    --border: #30363d;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
}

.hidden { display: none !important; }

/* Login */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1f2937 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    width: 100%;
    max-width: 380px;
}

.login-logo { font-size: 56px; margin-bottom: 12px; }
.login-card h1 { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.login-card > p { color: var(--text-dim); margin-bottom: 28px; font-size: 14px; }

.login-card input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 15px;
}

.login-card input:focus { outline: none; border-color: var(--accent-cyan); }

.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--accent-cyan);
    color: #000;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover { opacity: 0.9; }
.error { color: var(--danger); margin-top: 12px; font-size: 13px; }

/* Setup Wizard */
.setup-wizard {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1f3a 0%, #1e2847 50%, #2a3f5f 100%);
}

.setup-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.setup-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    bottom: -50px;
    left: -50px;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

.setup-step {
    display: none;
    animation: fadeSlideIn 0.5s ease;
}

.setup-step.active { display: flex; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.setup-card {
    background: rgba(22, 27, 34, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.setup-logo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.setup-logo-svg {
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.setup-logo-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.setup-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #a0aec0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.setup-subtitle {
    color: var(--text-dim);
    font-size: 15px;
    margin-bottom: 32px;
}

.setup-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
}

.setup-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-dim);
    transition: all 0.2s;
}

.setup-feature:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.setup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.setup-btn.primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 100%);
    color: #000;
}

.setup-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.setup-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.setup-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.setup-btn.large {
    padding: 16px 40px;
    font-size: 16px;
}

/* Progress Steps */
.setup-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.progress-step.active {
    background: var(--accent-cyan);
    color: #000;
}

.progress-step.done {
    background: var(--accent-green);
    color: #000;
}

.progress-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.progress-line.active {
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
}

/* Setup Form */
.setup-form {
    text-align: left;
}

.setup-field {
    margin-bottom: 20px;
}

.setup-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.setup-field label .optional {
    color: var(--text-dim);
    font-weight: 400;
}

.setup-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
}

.setup-field input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
}

.setup-error {
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 8px;
    display: none;
}

.setup-error:not(:empty) { display: block; }

.setup-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.setup-actions .setup-btn { flex: 1; }

/* Success Animation */
.success-card { padding: 56px 48px; }

.success-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.success-check {
    width: 100%;
    height: 100%;
}

.success-circle {
    stroke: var(--accent-green);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circleAnim 0.6s ease forwards;
}

.success-path {
    stroke: var(--accent-green);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkAnim 0.4s ease forwards 0.4s;
}

@keyframes circleAnim {
    to { stroke-dashoffset: 0; }
}

@keyframes checkAnim {
    to { stroke-dashoffset: 0; }
}

.success-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.success-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-dim);
}

.success-item strong {
    color: var(--text);
}

/* Dashboard Layout */
.dashboard { display: flex; min-height: 100vh; }

/* Sidebar - matches native exactly */
.sidebar {
    width: 200px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
}

.logo-icon { font-size: 24px; }
.logo-text { font-size: 16px; font-weight: 600; }

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: rgba(0, 212, 255, 0.15); color: var(--text); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.sidebar-stat .stat-icon { font-size: 14px; }
.sidebar-stat .stat-val { margin-left: auto; color: var(--accent-cyan); font-weight: 600; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 200px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

/* Mobile menu button - hidden by default, shown on mobile */
.mobile-menu-btn {
    display: none;
}

.hostname { font-size: 16px; font-weight: 600; }

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.system-info { font-size: 13px; color: var(--text-dim); }

.btn-logout {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.btn-logout:hover { background: var(--bg-hover); }

/* Views */
.view { display: none; padding: 24px; flex: 1; overflow-y: auto; }
.view.active { display: block; }


/* Stats Grid - matches native app */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.cyan::before { background: var(--accent-cyan); }
.stat-card.pink::before { background: var(--accent-pink); }
.stat-card.purple::before { background: var(--accent-purple); }
.stat-card.blue::before { background: var(--accent-blue); }
.stat-card.orange::before { background: var(--accent-orange); }
.stat-card.green::before { background: var(--accent-green); }
.stat-card.yellow::before { background: var(--accent-yellow); }
.stat-card.teal::before { background: var(--accent-teal); }

.stat-card .stat-icon { font-size: 28px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }

.stat-card.cyan .stat-value { color: var(--accent-cyan); }
.stat-card.pink .stat-value { color: var(--accent-pink); }
.stat-card.purple .stat-value { color: var(--accent-purple); }
.stat-card.blue .stat-value { color: var(--accent-blue); }
.stat-card.orange .stat-value { color: var(--accent-orange); }
.stat-card.green .stat-value { color: var(--accent-green); }
.stat-card.yellow .stat-value { color: var(--accent-yellow); }
.stat-card.teal .stat-value { color: var(--accent-teal); }

/* Expandable Stat Cards */
.stat-card.expandable { cursor: pointer; transition: all 0.3s ease; }
.stat-card.expandable:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.stat-card.expandable::after {
    content: '▼';
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--text-dim);
    opacity: 0.5;
    transition: transform 0.3s ease;
}
.stat-card.expandable.expanded::after { transform: rotate(180deg); }
.stat-card.expandable.expanded { padding-bottom: 12px; }

.stat-details {
    display: none;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    text-align: left;
}
.stat-card.expanded .stat-details { display: block; }

.stat-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
}
.stat-details .detail-row span:first-child { color: var(--text-dim); }
.stat-details .detail-row span:last-child { color: var(--text); font-weight: 500; }

/* Stat card hover tooltip */
.stat-card.expandable::before-tooltip {
    content: 'Click to expand';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.stat-card.expandable:hover::before-tooltip {
    opacity: 1;
}

/* Panels */
.panel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.panel-content { display: flex; flex-direction: column; gap: 8px; }

.temp-row, .service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-dark);
    border-radius: 8px;
    font-size: 13px;
}

.temp-value { font-weight: 600; }
.temp-value.cool { color: var(--success); }
.temp-value.warm { color: var(--warning); }
.temp-value.hot { color: var(--danger); }

.service-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.status-dot.stopped { background: var(--text-dim); }

/* Storage View - with pie chart like native app */
.storage-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 180px);
}

.storage-chart-panel {
    width: 280px;
    flex-shrink: 0;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.storage-chart-panel h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 30px;
}

.pie-chart-wrap {
    position: relative;
    width: 200px;
    height: 200px;
}
/* Pie chart hover effects */
.pie-slice {
    opacity: 0.9;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pie-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    pointer-events: none;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.pie-tooltip strong {
    color: var(--accent-cyan);
}



#storage-pie {
    width: 200px;
    height: 200px;
}

.pie-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.pie-label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.pie-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.storage-list-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    overflow: hidden;
}

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

.storage-header h2 { font-size: 18px; margin: 0; }
.storage-summary { color: var(--text-dim); font-size: 14px; }

.volume-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Volume row style matching native */
.volume-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: background 0.15s;
}

.volume-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.volume-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.volume-icon-wrap {
    width: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-svg-icon {
    width: 24px;
    height: 24px;
}

.volume-details {
    flex: 1;
    min-width: 0;
}

.volume-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.volume-mount {
    font-size: 11px;
    color: var(--text-dim);
}

.volume-size {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    min-width: 70px;
    text-align: right;
}

.volume-bar-wrap {
    width: 150px;
    flex-shrink: 0;
}

.volume-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.volume-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.volume-pct {
    width: 45px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    font-family: ui-monospace, monospace;
    flex-shrink: 0;
}

/* Drive Health - matches native app */
.drives-header { margin-bottom: 20px; }

.drive-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.drive-stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 24px;
    text-align: center;
    flex: 1;
}

.drive-stat-box.healthy { border-color: var(--success); }
.dsb-value { display: block; font-size: 24px; font-weight: 700; color: var(--accent-cyan); }
.dsb-label { font-size: 12px; color: var(--text-dim); }

.drives-grid { display: flex; flex-direction: column; gap: 24px; }

/* Drive sections */
.drive-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drive-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    padding: 4px 0;
}

.drive-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.drive-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
}

.drive-header:hover { background: var(--bg-hover); }

/* New drive icon box */
.drive-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-shrink: 0;
}

.drive-icon-temp {
    font-size: 10px;
    font-weight: 700;
    font-family: ui-monospace, monospace;
}

.drive-icon { font-size: 28px; }
.drive-info { flex: 1; min-width: 0; }
.drive-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }

.drive-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dim);
}

.drive-type-badge {
    font-weight: 500;
}

.drive-sep {
    opacity: 0.5;
}

.drive-type { font-size: 12px; color: var(--text-dim); }

/* Temperature gauge */
.drive-temp-gauge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 80px;
}

.drive-temp-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 18px;
    font-weight: 700;
    font-family: ui-monospace, monospace;
}

.drive-temp-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.drive-temp-fill {
    height: 100%;
    border-radius: 2px;
}

/* Legacy temp styles */
.drive-temp {
    font-size: 20px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
}

.drive-temp.cool { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.drive-temp.warm { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.drive-temp.hot { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

.drive-status {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.drive-status.healthy { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.drive-status.warning { background: rgba(251, 191, 36, 0.15); color: var(--warning); }

.drive-expand { 
    color: var(--text-dim); 
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}
.drive-card.expanded .drive-expand { transform: rotate(180deg); }

.drive-details {
    display: none;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-dark);
}

.drive-card.expanded .drive-details { display: block; }

.drive-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.drive-detail {
    text-align: center;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
}

.drive-detail-label { font-size: 10px; color: var(--text-dim); margin-bottom: 4px; text-transform: uppercase; }
.drive-detail-value { font-size: 14px; font-weight: 600; }


/* Services View */
.services-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.services-header h2 { font-size: 18px; }

.running-badge {
    padding: 4px 12px;
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    border-radius: 12px;
    font-size: 13px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 14px;
    margin-bottom: 16px;
}

.search-input:focus { outline: none; border-color: var(--accent-cyan); }
.search-input.small { width: 180px; padding: 8px 12px; margin: 0; }

.containers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.container-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.container-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}

.container-status.stopped { background: var(--text-dim); }
.container-status.error { background: var(--danger); }

.container-info { flex: 1; min-width: 0; }
.container-name { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.container-image { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* File Browser */
.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.tool-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover { background: var(--bg-hover); }
.tool-btn.active { background: var(--accent-cyan); color: #000; border-color: var(--accent-cyan); }

.breadcrumb {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-cyan); }
.breadcrumb span.current { color: var(--text); }
.breadcrumb-sep { color: var(--text-dim); }

.view-toggle { display: flex; gap: 4px; }

/* File List */
.file-list { display: flex; flex-direction: column; gap: 4px; }

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.file-item:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.file-item.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-cyan);
}

.file-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.file-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.selection-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--accent-cyan);
    color: #000;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
}

.selection-toolbar .tool-btn {
    background: rgba(0,0,0,0.2);
    color: #000;
    border: none;
}

.selection-toolbar .tool-btn:hover {
    background: rgba(0,0,0,0.3);
}

.file-icon { font-size: 28px; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: var(--text-dim); }
.file-size { font-size: 13px; color: var(--text-dim); min-width: 80px; text-align: right; }
.file-date { font-size: 13px; color: var(--text-dim); min-width: 100px; text-align: right; }

.file-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.15s;
}

.file-item:hover .file-actions { opacity: 1; }

.file-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.file-btn:hover { background: var(--accent-cyan); color: #000; border-color: var(--accent-cyan); }

/* Grid View */
.file-list.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.file-list.grid .file-item {
    flex-direction: column;
    text-align: center;
    padding: 20px 12px;
}

.file-list.grid .file-icon { font-size: 48px; margin-bottom: 8px; }
.file-list.grid .file-info { width: 100%; }
.file-list.grid .file-name { font-size: 13px; }
.file-list.grid .file-size { text-align: center; min-width: auto; margin-top: 4px; }
.file-list.grid .file-date, .file-list.grid .file-actions { display: none; }

/* Icons View (like Finder icon view) */
.file-list.icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    padding: 16px;
}

.file-list.icons .file-item {
    flex-direction: column;
    text-align: center;
    padding: 12px 8px;
    border-radius: 8px;
    position: relative;
}

.file-list.icons .file-item:hover {
    background: var(--bg-hover);
}

.file-list.icons .file-checkbox {
    position: absolute;
    top: 4px;
    left: 4px;
    opacity: 0;
}

.file-list.icons .file-item:hover .file-checkbox,
.file-list.icons .file-item.selected .file-checkbox {
    opacity: 1;
}

.file-list.icons .file-icon {
    margin-bottom: 8px;
}

.file-list.icons .file-icon img {
    width: 64px;
    height: 64px;
}

.file-list.icons .file-name {
    font-size: 12px;
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
}

.file-list.icons .file-info,
.file-list.icons .file-size,
.file-list.icons .file-date,
.file-list.icons .file-meta,
.file-list.icons .file-actions {
    display: none;
}

/* Columns View (like Finder column view) */
.file-list.columns {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: calc(100vh - 220px);
    min-height: 400px;
}

.columns-container {
    display: flex;
    height: 100%;
    overflow-x: auto;
}

.column {
    min-width: 220px;
    max-width: 280px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    flex-shrink: 0;
}

.column:last-child {
    border-right: none;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.column-item:hover {
    background: var(--bg-hover);
}

.column-item.selected {
    background: var(--accent-cyan);
    color: #000;
}

.column-item.selected .column-arrow {
    color: #000;
}

.column-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.column-name {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-arrow {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: bold;
}

/* Gallery View */
.file-list.gallery {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 400px;
    max-height: calc(100vh - 180px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.gallery-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    min-height: 200px;
    overflow: hidden;
}

.gallery-preview img,
.gallery-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-strip {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--bg-dark);
    overflow-x: auto;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    max-height: 120px;
}

.gallery-thumb {
    width: 80px;
    min-width: 80px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    position: relative;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.gallery-thumb:hover {
    border-color: var(--border);
}

.gallery-thumb.active {
    border-color: var(--accent-cyan);
}

.gallery-thumb img {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.gallery-thumb .thumb-label {
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 4px;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.gallery-thumb.folder {
    gap: 2px;
    padding: 6px;
}

.gallery-thumb.folder img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.gallery-thumb.folder .thumb-label {
    font-size: 9px;
}

.video-badge {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

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

.sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
    padding: 0 12px;
}

.sort-icon {
    font-size: 14px;
}

.sort-label {
    font-size: 13px;
}

.sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 160px;
    padding: 6px 0;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.sort-menu.show {
    display: block;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
}

.sort-option:hover {
    background: var(--bg-hover);
}

.sort-option .check {
    width: 16px;
    color: transparent;
}

.sort-option.active .check {
    color: var(--accent-cyan);
}

.sort-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* Share Links */
.shares-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.shares-header h2 { font-size: 18px; }
.share-summary { color: var(--text-dim); font-size: 14px; }

.shares-grid { display: flex; flex-direction: column; gap: 12px; }

.share-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.share-icon { font-size: 32px; }
.share-info { flex: 1; }
.share-name { font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-path { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }

.share-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.share-badge.upload {
    background: rgba(74, 222, 128, 0.15);
    color: var(--accent-green);
}

.share-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-dim);
}

.share-actions { display: flex; gap: 8px; }

.share-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.share-btn.copy { background: var(--accent-cyan); color: #000; }
.share-btn.delete { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.share-btn:hover { opacity: 0.85; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.modal-header span { font-weight: 600; }

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text);
    cursor: pointer;
}

.modal-body {
    flex: 1;
    padding: 20px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.modal-body img, .modal-body video {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}

.modal-body audio { width: 100%; }

.modal-body pre {
    width: 100%;
    padding: 16px;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: auto;
    font-size: 13px;
    white-space: pre-wrap;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.modal-footer .btn-primary { width: auto; padding: 10px 24px; }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

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

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

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    
    .storage-layout {
        flex-direction: column;
    }
    
    .storage-chart-panel {
        width: 100%;
        padding: 20px;
        border-bottom: 1px solid var(--border);
    }
    
    .storage-list-panel {
        border-left: none;
    }
}

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .panel-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Mobile sidebar */
    .sidebar {
        position: fixed;
        left: -260px;
        width: 260px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 8px;
        background: var(--bg-dark);
        color: var(--text);
        font-size: 20px;
        cursor: pointer;
        margin-right: 12px;
    }
    
    .mobile-menu-btn:hover {
        background: var(--bg-hover);
    }
    
    /* Top bar adjustments */
    .top-bar {
        padding: 12px 16px;
    }
    
    .hostname {
        font-size: 14px;
    }
    
    .system-info {
        display: none;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    .stat-card .stat-label {
        font-size: 10px;
    }
    
    /* File browser mobile */
    .browser-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    
    .breadcrumb {
        order: 10;
        width: 100%;
        margin-top: 8px;
    }
    
    .search-input.small {
        width: 100%;
        order: 11;
    }
    
    .file-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .file-size, .file-date {
        display: none;
    }
    
    .file-actions {
        opacity: 1;
    }
    
    .file-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Modal mobile */
    .modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 20px;
    }
    
    .modal-content.small {
        max-width: 95%;
    }
    
    /* Users grid mobile */
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .user-card {
        flex-wrap: wrap;
    }
    
    .user-actions {
        width: 100%;
        margin-top: 12px;
        justify-content: flex-end;
    }
    
    /* Settings mobile */
    .settings-row {
        grid-template-columns: 1fr;
    }
    
    /* Shares mobile */
    .share-card {
        flex-wrap: wrap;
    }
    
    .share-actions {
        width: 100%;
        margin-top: 12px;
    }
    
    /* Drive cards mobile */
    .drive-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .drive-temp {
        font-size: 16px;
        padding: 4px 10px;
    }
    
    /* Volume cards mobile */
    .volume-card {
        flex-wrap: wrap;
    }
    
    .volume-stats {
        width: 100%;
        text-align: left;
        margin-top: 8px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .view-toggle {
        display: none;
    }
    
    .sort-dropdown {
        display: none;
    }
    
    .panel-row {
        gap: 12px;
    }
    
    .panel {
        padding: 14px;
    }
}

/* Hide mobile menu button on desktop */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile stat card details - hide empty details on mobile */
@media (max-width: 768px) {
    /* Hide the expandable arrow indicator on mobile */
    .stat-card.expandable::after {
        display: none;
    }
    
    /* Hide stat details on mobile - they show empty */
    .stat-card .stat-details {
        display: none !important;
    }
    
    /* Disable expandable behavior on mobile */
    .stat-card.expandable,
    .stat-card.clickable {
        cursor: default;
        pointer-events: none;
    }
    
    .stat-card.expandable:hover,
    .stat-card.clickable:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Re-enable pointer events for the card content but not clicks */
    .stat-card.expandable *,
    .stat-card.clickable * {
        pointer-events: auto;
    }
    
    /* Hide detail modals completely on mobile */
    .detail-modal {
        display: none !important;
    }
    
    /* Ensure mobile backdrop is properly controlled */
    .mobile-backdrop {
        pointer-events: auto;
    }
}


/* Settings View */
.settings-header {
    margin-bottom: 24px;
}

.settings-header h2 { font-size: 18px; }

/* New Settings Styles */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section { width: 100%; }

.settings-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.settings-card.full { width: 100%; }

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}

.settings-icon { font-size: 24px; }
.settings-card-header h3 { font-size: 16px; font-weight: 600; margin: 0; }

.settings-card-body { padding: 24px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 15px; font-weight: 500; color: var(--text); }

.storage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.storage-stat {
    text-align: center;
    padding: 16px;
    background: var(--bg-dark);
    border-radius: 12px;
}

.storage-stat-value { display: block; font-size: 20px; font-weight: 700; color: var(--accent-cyan); margin-bottom: 4px; }
.storage-stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; }

.settings-card input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 14px;
}

.settings-card input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.settings-card .btn-primary { margin-top: 8px; }

.settings-msg { margin-top: 12px; font-size: 13px; }
.settings-msg.success { color: var(--success); }
.settings-msg.error { color: var(--danger); }

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover { background: var(--bg-hover); border-color: var(--accent-cyan); }
.btn-action.danger:hover { border-color: var(--danger); }
.btn-action .btn-icon { font-size: 18px; }

.btn-secondary {
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-cyan);
}


/* Users View */
.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.users-header h2 { font-size: 18px; }

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.user-info { flex: 1; }
.user-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.user-role { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.user-role.admin { color: var(--accent-yellow); }
.user-folders { font-size: 12px; color: var(--text-dim); }

.user-actions { display: flex; gap: 8px; }

.user-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.user-btn.edit {
    background: var(--bg-hover);
    color: var(--text);
}

.user-btn.delete {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

.user-btn:hover { opacity: 0.85; }

/* User Modal */
.modal-content.small {
    max-width: 480px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.form-group textarea {
    resize: vertical;
    font-family: monospace;
}

/* Folder input with browse button */
.folder-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.folder-input-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 14px;
    resize: vertical;
    font-family: monospace;
}

.btn-browse {
    padding: 10px 16px;
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    background: transparent;
    color: var(--accent-cyan);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-browse:hover {
    background: var(--accent-cyan);
    color: #000;
}

/* Folder Picker Modal */
.folder-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-picker-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 1101;
}

.folder-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.folder-picker-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.folder-picker-path {
    padding: 12px 20px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    font-family: monospace;
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.folder-picker-path button {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
}

.folder-picker-path button:hover {
    background: var(--bg-hover);
}

.folder-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    max-height: 400px;
}

.folder-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.folder-picker-item:hover {
    background: var(--bg-hover);
}

.folder-picker-item.selected {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid var(--accent-cyan);
}

.folder-picker-item .icon {
    font-size: 20px;
}

.folder-picker-item .name {
    flex: 1;
    font-size: 14px;
}

.folder-picker-item .arrow {
    color: var(--text-dim);
    font-size: 12px;
}

.folder-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    gap: 12px;
}

.folder-picker-footer .selected-path {
    flex: 1;
    font-size: 12px;
    color: var(--text-dim);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-picker-footer button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.folder-picker-footer .btn-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.folder-picker-footer .btn-cancel:hover {
    background: var(--bg-hover);
}

.folder-picker-footer .btn-select {
    background: var(--accent-cyan);
    border: none;
    color: #000;
}

.folder-picker-footer .btn-select:hover {
    opacity: 0.9;
}

/* Checkbox group styling */
.checkbox-group {
    margin-bottom: 16px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-cyan);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkbox-title {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.checkbox-hint {
    font-size: 12px;
    color: var(--text-dim);
}

.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}


/* Upload Button */
.upload-btn {
    background: var(--accent-cyan) !important;
    color: #000 !important;
    border-color: var(--accent-cyan) !important;
}

.upload-btn:hover {
    opacity: 0.9;
}

/* Drag and drop zone */
.file-list.drag-over {
    border: 2px dashed var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.drop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 212, 255, 0.1);
    border: 3px dashed var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.drop-overlay-text {
    background: var(--bg-card);
    padding: 24px 48px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-cyan);
}


/* Mobile backdrop */
.mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    -webkit-tap-highlight-color: transparent;
}

/* Backdrop is controlled via JS for reliability */
/* Clickable Cards */
.stat-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.stat-card.clickable:active {
    transform: translateY(0);
}

/* Detail Modals */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.detail-modal.show {
    opacity: 1;
    visibility: visible;
}

.detail-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: var(--bg-hover);
    color: var(--text);
}

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

.detail-item {
    background: var(--bg-hover);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.detail-item-label {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.detail-item-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.process-list {
    max-height: 300px;
    overflow-y: auto;
}

.process-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.process-name {
    font-weight: 500;
    color: var(--text);
}

.process-usage {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: var(--text-dim);
}


/* Server Management View */
.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.server-header h2 {
    font-size: 28px;
    font-weight: 700;
}

.server-status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: var(--success);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-info {
    flex: 1;
}

.status-title {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
}

.server-commands {
    margin-bottom: 24px;
}

.server-commands h3 {
    font-size: 14px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.command-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    font-family: inherit;
}

.command-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

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

.command-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.command-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.command-status {
    font-size: 11px;
    color: var(--text-dim);
    min-height: 16px;
}

.command-status.executing {
    color: var(--accent-yellow);
}

.command-status.success {
    color: var(--success);
}

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

.command-output {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.command-output h3 {
    font-size: 14px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.output-container {
    background: #000;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    color: #00ff00;
}

.output-line {
    display: flex;
    gap: 12px;
}

.output-line-num {
    color: #666;
    user-select: none;
    min-width: 30px;
    text-align: right;
}

.output-line-text {
    flex: 1;
    word-break: break-all;
}

.output-line-text.error {
    color: #ff6b6b;
}

.output-line-text.warning {
    color: #ffd93d;
}

.output-line-text.success {
    color: #6bcf7f;
}

.output-line-text.info {
    color: #4ecdc4;
}


.output-summary {
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid #4ade80;
    padding: 12px 16px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    color: #ccc;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.output-summary.error {
    border-left-color: #ff6b6b;
    color: #ff6b6b;
}
/* Drive Selection */
.drive-selection {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.loading-drives {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-dim);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.drive-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.drive-item:hover {
    background: var(--bg-hover);
}

.drive-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
}

.drive-checkbox.checked {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.drive-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: #000;
    font-size: 12px;
    font-weight: bold;
}

.drive-info {
    flex: 1;
}

.drive-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.drive-details {
    font-size: 12px;
    color: var(--text-dim);
}

.drive-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
    flex-shrink: 0;
}