/* DOCKER FEDORA MANAGER - MODERN DARK GLASSMORPHISM STYLESHEET */

:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(18, 26, 43, 0.75);
    --bg-card-hover: rgba(28, 38, 61, 0.85);
    --bg-glass-modal: rgba(13, 19, 32, 0.92);

    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-bright: rgba(255, 255, 255, 0.16);

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.35);

    --status-green: #10b981;
    --status-green-glow: rgba(16, 185, 129, 0.3);
    --status-red: #ef4444;
    --status-red-glow: rgba(239, 68, 68, 0.3);
    --status-amber: #f59e0b;
    --status-amber-glow: rgba(245, 158, 11, 0.3);

    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* UTILITIES & HELPERS */
.hidden { display: none !important; }
.mb-4 { margin-bottom: 1.25rem; }
.desktop-only { display: inline-flex; }
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}

.text-green { color: var(--status-green) !important; }
.text-red { color: var(--status-red) !important; }
.text-amber { color: var(--status-amber) !important; }

/* GLASS PANEL UTILITY */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
}

/* VIEW PANES */
.view-pane {
    min-height: 100vh;
    width: 100%;
}

/* ---------------------------------------------------- */
/* 1. LOGIN VIEW */
/* ---------------------------------------------------- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass-bright);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

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

.app-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.9rem;
    font-size: 1.1rem;
    pointer-events: none;
}

.form-group input,
.search-box input,
.logs-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-icon-wrapper input {
    padding-left: 2.75rem;
}

.form-group input:focus,
.search-box input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-height: 44px; /* Touch target */
}

.btn-block { width: 100%; }

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass-bright);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-icon {
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.15); }

.btn-danger-icon {
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger-icon:hover { background: rgba(239, 68, 68, 0.3); }

.btn-danger-header {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}
.btn-danger-header:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-danger-action {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}
.btn-danger-action:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.warning-icon-large {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.text-center {
    text-align: center;
}

.mobile-nav-btn.danger-nav {
    color: #fca5a5;
}
.mobile-nav-btn.danger-nav:hover {
    color: #ef4444;
}

.btn-action {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    min-height: 36px;
}
.btn-action.start { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.btn-action.start:hover { background: rgba(16, 185, 129, 0.35); }
.btn-action.stop { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-action.stop:hover { background: rgba(239, 68, 68, 0.35); }
.btn-action.restart { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.btn-action.restart:hover { background: rgba(245, 158, 11, 0.35); }
.btn-action.logs { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }
.btn-action.logs:hover { background: rgba(99, 102, 241, 0.35); }
.btn-action.rm { background: rgba(107, 114, 128, 0.2); color: #d1d5db; border: 1px solid rgba(107, 114, 128, 0.3); }
.btn-action.rm:hover { background: rgba(239, 68, 68, 0.3); color: #fca5a5; }

/* ---------------------------------------------------- */
/* 2. DASHBOARD VIEW & NAVIGATION */
/* ---------------------------------------------------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    padding: 0.85rem 1.5rem;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo { font-size: 1.75rem; }

.brand-title h2 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.host-status-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.pulse-dot.green { background: var(--status-green); box-shadow: 0 0 8px var(--status-green); animation: pulse 2s infinite; }
.pulse-dot.red { background: var(--status-red); box-shadow: 0 0 8px var(--status-red); }
.pulse-dot.grey { background: var(--text-muted); }

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.refresh-selector select {
    background: rgba(10, 15, 26, 0.6);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    outline: none;
}

.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    padding-bottom: 5rem; /* space for mobile nav */
}

/* HOST INFO BAR */
.host-info-card {
    padding: 1rem 1.25rem;
}

.host-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}
.info-action-item {
    justify-content: center;
    align-items: flex-end;
}
@media (max-width: 640px) {
    .info-action-item {
        align-items: stretch;
    }
}
.btn-shutdown-banner {
    width: 100%;
    font-weight: 600;
}
.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* STATS CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-icon.indigo { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.3); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* TOOLBAR & FILTERS */
.toolbar-section {
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.search-filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    min-width: 240px;
}

.search-box .search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

.search-box input {
    padding-left: 2.4rem;
    font-size: 0.85rem;
}

.filter-pills {
    display: flex;
    gap: 0.35rem;
}

.pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pill.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* CONTAINER GRID & CARDS */
.containers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.container-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.container-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
    border-color: var(--border-glass-bright);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.container-name {
    font-size: 1.1rem;
    font-weight: 700;
    word-break: break-all;
}

.container-image {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    word-break: break-all;
    margin-top: 0.15rem;
}

.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.status-badge.running {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.stopped {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.protected {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.protected-lock-box {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 4px;
    cursor: not-allowed;
}

.item-name-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.item-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    margin-left: 0.4rem;
    line-height: 1.3;
}

.container-url-link {
    font-size: 0.825rem;
    color: #60a5fa;
    font-family: var(--font-mono);
    text-decoration: none;
    margin-top: 0.2rem;
    margin-left: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    word-break: break-all;
    transition: color 0.2s;
}

.container-url-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.item-labels-bar, .labels-modal-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
    margin-left: 0.4rem;
}

.label-badge {
    font-size: 0.725rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass-bright);
    color: #d1d5db;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    word-break: break-all;
}

.label-badge strong {
    color: #818cf8;
    font-weight: 600;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* METRICS BARS */
.metrics-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.metric-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.metric-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-glass);
}

/* IMAGES GRID */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.image-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-repo {
    font-weight: 700;
    font-size: 1rem;
}

.image-tag {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.85rem;
}

/* PLACEHOLDERS */
.loading-placeholder, .empty-placeholder {
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ---------------------------------------------------- */
/* 3. MODALS & DRAWERS */
/* ---------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-card {
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    background: var(--bg-glass-modal);
    border: 1px solid var(--border-glass-bright);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-large { max-width: 900px; }

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

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem;
}
.btn-close-modal:hover { color: #fff; }

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.form-row {
    display: flex;
    gap: 1rem;
}
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-glass);
    background: rgba(13, 19, 32, 0.95);
    flex-shrink: 0;
}

.test-result-box {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.test-result-box.success { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.test-result-box.error { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

/* TERMINAL LOGS */
.logs-toolbar {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.logs-controls select {
    background: rgba(10, 15, 26, 0.6);
    color: #fff;
    border: 1px solid var(--border-glass);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
}

.logs-search { flex: 1; }
.logs-search input { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

.terminal-body {
    height: 60vh;
    max-height: 500px;
    background: #05080e;
    padding: 1rem 1.5rem;
    overflow-y: auto;
}

.terminal-content {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #34d399;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

/* ---------------------------------------------------- */
/* 4. MOBILE NAVIGATION BAR & TOASTS */
/* ---------------------------------------------------- */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    z-index: 99;
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    padding: 0.5rem 1rem;
    justify-content: space-around;
}

.mobile-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.mobile-nav-btn.active {
    color: var(--accent-primary);
}

.nav-icon { font-size: 1.3rem; }

@media (max-width: 768px) {
    .mobile-nav-bar { display: flex; }
    .toolbar-section { flex-direction: column; align-items: stretch; }
    .search-filter-wrapper { justify-content: space-between; }
    .search-box { min-width: 100%; }
}

/* TOASTS */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 360px;
    width: calc(100% - 3rem);
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--bg-glass-modal);
    border: 1px solid var(--border-glass-bright);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 4px solid var(--status-green); }
.toast.error { border-left: 4px solid var(--status-red); }
.toast.info { border-left: 4px solid var(--accent-primary); }

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

/* ---------------------------------------------------- */
/* 5. BATCH TOOLBAR, LIST VIEW & POPUP DETAILS MODAL */
/* ---------------------------------------------------- */

/* BATCH ACTIONS TOOLBAR */
.batch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(18, 26, 43, 0.85);
    border: 1px solid var(--border-glass-bright);
}

.batch-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selected-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    background: var(--accent-glow);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.batch-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.825rem;
    min-height: 34px;
    border-radius: 6px;
}

.btn-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-success:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.35);
}

.btn-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.btn-warning:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.35);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.35);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* CUSTOM CHECKBOX */
.custom-checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    cursor: pointer;
    font-size: 0.875rem;
    user-select: none;
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: rgba(10, 15, 26, 0.6);
    border: 1px solid var(--border-glass-bright);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
}

.custom-checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-primary);
}

.custom-checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* CONTAINERS LIST LAYOUT */
.containers-list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    transition: background-color 0.15s ease;
}

.list-row:last-child {
    border-bottom: none;
}

.list-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.list-row.selected {
    background-color: rgba(99, 102, 241, 0.08);
}

.list-col-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.item-name-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.item-name-btn:hover {
    color: #818cf8;
    background-color: rgba(99, 102, 241, 0.15);
    text-decoration: underline;
}

.list-col-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.icon-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.icon-btn-action:hover {
    transform: scale(1.08);
}

.icon-btn-action.start { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.4); }
.icon-btn-action.start:hover { background: rgba(16, 185, 129, 0.4); }

.icon-btn-action.stop { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); }
.icon-btn-action.stop:hover { background: rgba(239, 68, 68, 0.4); }

.icon-btn-action.restart { background: rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.4); }
.icon-btn-action.restart:hover { background: rgba(245, 158, 11, 0.4); }

.icon-btn-action.logs { background: rgba(99, 102, 241, 0.2); border-color: rgba(99, 102, 241, 0.4); }
.icon-btn-action.logs:hover { background: rgba(99, 102, 241, 0.4); }

.icon-btn-action.rm { background: rgba(107, 114, 128, 0.2); border-color: rgba(107, 114, 128, 0.4); }
.icon-btn-action.rm:hover { background: rgba(239, 68, 68, 0.4); }

/* POPUP DETAILS MODAL */
.modal-details {
    max-width: 620px;
}

.details-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.modal-icon {
    font-size: 1.75rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-card {
    background: rgba(10, 15, 26, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.detail-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.code-font {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    color: #a5b4fc;
}

.detail-card.full-width {
    grid-column: span 2;
}

.detail-url-link {
    color: #60a5fa;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    word-break: break-all;
}

.detail-url-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.icon-btn-action.web-link {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}
.icon-btn-action.web-link:hover {
    background: rgba(59, 130, 246, 0.4);
}

/* RESPONSIVE MOBILE STYLES */
@media (max-width: 640px) {
    .list-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    .list-col-right {
        width: 100%;
        justify-content: space-between;
    }
    .details-grid {
        grid-template-columns: 1fr;
    }
    .batch-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .batch-actions {
        justify-content: flex-end;
    }
    .modal-overlay {
        padding: 0.5rem;
    }
    .modal-card {
        max-height: calc(100dvh - 1rem);
        border-radius: var(--radius-md);
    }
    .modal-header {
        padding: 1rem;
    }
    .modal-body {
        padding: 1rem;
        gap: 0.85rem;
    }
    .modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
    }
}
