:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --dark-text: #0f172a;
    --border-color: #e2e8f0;
    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --card-hover-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: rgba(59, 130, 246, 0.1);
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-color: #667eea;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container & Sidebar */
.app-container {
    display: flex;
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0.5;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.sidebar-logo {
    font-size: 2.5rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
}

.sidebar-logo:hover {
    transform: scale(1.1) rotate(-5deg);
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-collapsed .logo-text {
    opacity: 0;
    width: 0;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    letter-spacing: -0.025em;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.sidebar-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-toggle:hover::before {
    opacity: 1;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.toggle-icon {
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    display: block;
    padding: 0.5rem 1.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.sidebar-collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9375rem;
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 1rem;
    margin: 0.5rem auto;
    width: 56px;
    gap: 0;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar-collapsed .nav-item:hover {
    transform: translateX(0) scale(1.1);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #ffffff;
    font-weight: 600;
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px currentColor);
}

.nav-text {
    flex: 1;
    font-weight: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.sidebar-collapsed .nav-text {
    opacity: 0;
    width: 0;
}

.nav-count {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.sidebar-collapsed .nav-count {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
}

.external-icon {
    font-size: 0.875rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.sidebar-collapsed .external-icon {
    opacity: 0;
    width: 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-section {
    margin-bottom: 1rem;
}

.footer-info {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.sidebar-collapsed .footer-info {
    padding: 0.75rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-collapsed .status-indicator {
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.status-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.status-online {
    background: #10b981;
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.status-offline {
    background: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.status-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-collapsed .status-text {
    opacity: 0;
    width: 0;
}

.nav-item-secondary {
    opacity: 0.7;
}

.nav-item-secondary:hover {
    opacity: 1;
}

.nav-text {
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item-secondary {
    opacity: 0.7;
}

.nav-item-secondary:hover {
    opacity: 1;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--light-bg);
}

.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Content Container */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header-simple {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1rem;
}

.btn-refresh {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-refresh:hover {
    background: var(--primary-hover);
    transform: rotate(180deg);
}

/* Stats Grid (for Dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Welcome Section */
.welcome-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.welcome-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.welcome-card h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.welcome-card p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--light-bg);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.info-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.connection-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.connection-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.connection-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.connection-value {
    background: var(--light-bg);
    padding: 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Loading & Empty States */
.loading-container {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 5px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--secondary-color);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Containers Grid */
.containers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.container-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.container-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

.container-card.running {
    border-left-color: var(--success-color);
}

.container-card.stopped {
    border-left-color: var(--danger-color);
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-bg);
}

.container-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.container-icon {
    font-size: 1.2rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-running {
    background: #d4edda;
    color: #155724;
}

.badge-stopped {
    background: #f8d7da;
    color: #721c24;
}

.container-details {
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--secondary-color);
    font-weight: 600;
}

.detail-value {
    color: var(--dark-text);
    font-family: 'Courier New', monospace;
}

.container-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    flex: 1;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.image-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--info-color);
}

.image-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

.image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-bg);
}

.image-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    flex: 1;
    word-break: break-all;
}

.image-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.image-details {
    margin-bottom: 1rem;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-badge {
    background: var(--light-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    color: var(--dark-text);
}

.image-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #138496;
}

/* Definition Modal */
.definition-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.definition-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.definition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.definition-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.btn-close {
    background: var(--light-bg);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--border-color);
    transform: rotate(90deg);
}

.definition-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.definition-body pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Elements */
.form-section h4 {
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

.required {
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.form-input-error {
    border-color: var(--danger-color);
}

.form-input-error:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-error::before {
    content: "⚠️";
}

.form-hint {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
}

.form-hint code {
    background: var(--light-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* File Upload */
.upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}

.file-icon {
    font-size: 1.5rem;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
}

.upload-success {
    padding: 0.5rem;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: var(--border-color);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.multiselect-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-option:hover {
    background: white;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.info-text {
    color: var(--secondary-color);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.loading-small {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    color: var(--secondary-color);
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Command Preview */
.command-preview {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.command-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.command-label {
    color: #61dafb;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-copy {
    background: #2d2d30;
    color: #61dafb;
    border: 1px solid #3e3e42;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #3e3e42;
    border-color: #61dafb;
}

.command-text {
    background: transparent;
    color: #d4d4d4;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    padding: 0.5rem;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid var(--info-color);
    padding: 1rem;
    border-radius: 6px;
    color: #004085;
}

/* Logs Modal */
.logs-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.logs-content {
    background: #1e1e1e;
    border-radius: 12px;
    max-width: 1100px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #3e3e42;
    background: #2d2d30;
    border-radius: 12px 12px 0 0;
}

.logs-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #61dafb;
}

.logs-subtitle {
    margin: 0.25rem 0 0 0;
    color: #d4d4d4;
    font-size: 0.9rem;
}

.logs-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.logs-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    background: #1e1e1e;
}

.logs-text {
    background: transparent;
    color: #d4d4d4;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-title,
    .nav-text {
        display: none;
    }

    .sidebar-header {
        justify-content: center;
    }

    .nav-item {
        justify-content: center;
    }

    .main-content {
        margin-left: 70px;
        padding: 1rem;
    }

    .containers-grid {
        grid-template-columns: 1fr;
    }

    .page-header-simple {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .welcome-section {
        grid-template-columns: 1fr;
    }

    .bulk-actions-bar {
        padding: 1rem;
    }

    .bulk-selection {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-filter {
        width: 100%;
        text-align: left;
    }

    .bulk-actions {
        flex-direction: column;
    }

    .bulk-actions button {
        width: 100%;
    }
}

/* File Selection Tabs */
.file-selection-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Existing Files List */
.existing-files-container {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1rem;
    min-height: 200px;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
}

.file-item.selected {
    border-color: var(--success-color);
    background: #e8f5e9;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 600;
    color: var(--dark-text);
}

.file-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    display: flex;
    gap: 0.5rem;
}

.file-selected-icon {
    font-size: 1.5rem;
    color: var(--success-color);
}

.empty-files-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bulk-selection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-card {
    margin-right: 0.5rem;
}

.select-label {
    font-weight: 600;
    color: var(--dark-text);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-filter {
    background: var(--light-bg);
    border: 2px solid transparent;
    color: var(--dark-text);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    border-color: var(--primary-color);
}

.btn-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.bulk-label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

.container-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.container-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .logo-text,
    .nav-text,
    .nav-badge,
    .nav-count,
    .external-icon,
    .status-text,
    .nav-section-title {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 0.875rem;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .page-header-simple {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .header-actions {
        flex-wrap: wrap;
    }

    .containers-grid {
        grid-template-columns: 1fr;
    }
}

/* After Execution Logs Styles */
.after-execution-logs-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin: 2rem;
}

.after-execution-logs-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.after-execution-logs-header h3 {
    font-size: 1.5rem;
    color: var(--dark-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.after-execution-logs-header h3::before {
    content: '📋';
    font-size: 1.75rem;
}

.after-execution-logs-content {
    padding: 2rem;
}

.after-execution-logs-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
}

.after-execution-logs-empty p {
    font-size: 1rem;
    margin: 0;
}

.after-execution-logs-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.after-execution-logs-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.after-execution-logs-table {
    width: 100%;
    border-collapse: collapse;
}

.after-execution-logs-table thead {
    background: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
}

.after-execution-logs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.after-execution-logs-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.after-execution-logs-table tbody tr:hover {
    background-color: var(--light-bg);
}

.after-execution-logs-table td {
    padding: 1rem;
    color: var(--dark-text);
}

.after-execution-logs-table .time-cell {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.after-execution-logs-table .container-cell {
    font-weight: 500;
    color: var(--primary-color);
}

.after-execution-logs-table .image-cell {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.after-execution-logs-table .mode-cell {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--info-color);
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.after-execution-logs-download-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.after-execution-logs-download-btn::before {
    content: '⬇️';
}

.after-execution-logs-download-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.after-execution-logs-download-btn:active {
    transform: translateY(0);
}
    
    .bulk-actions-bar {
        padding: 1rem;
    }
    
    .bulk-selection {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-filter {
        width: 100%;
        text-align: left;
    }
    
    .bulk-actions {
        flex-wrap: wrap;
    }
    
    .bulk-actions button {
        flex: 1;
        min-width: 120px;
    }
}


/* Count Badge Animation */
.nav-count {
    animation: countFadeIn 0.3s ease;
}

@keyframes countFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Sidebar Transition Enhancements */
.sidebar {
    backdrop-filter: blur(10px);
}

/* Nav Item Ripple Effect */
.nav-item {
    overflow: hidden;
}

.nav-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-item:active::after {
    width: 300px;
    height: 300px;
}

/* Logo Enhancements */
.sidebar-logo {
    cursor: pointer;
}

.sidebar-logo:hover {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

/* Enhanced Active State */
.nav-item.active {
    animation: activeSlideIn 0.3s ease;
}

@keyframes activeSlideIn {
    from {
        transform: translateX(-10px);
        opacity: 0.5;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* Users table / grid improvements */
.users-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    margin-top: 2rem;
}

.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .users-table thead th {
        font-weight: 600;
        font-size: 0.875rem;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 1rem 1rem;
        background: #f8fafc;
        border-bottom: 2px solid #e2e8f0;
        text-align: left;
    }

        .users-table thead th:first-child {
            border-top-left-radius: 8px;
        }

        .users-table thead th:last-child {
            border-top-right-radius: 8px;
        }

    .users-table tbody tr {
        transition: all 0.2s ease;
        border-bottom: 1px solid #f1f5f9;
    }

        .users-table tbody tr:hover {
            background: linear-gradient(90deg, rgba(99,102,241,0.03) 0%, rgba(139,92,246,0.03) 100%);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }

        .users-table tbody tr:last-child {
            border-bottom: none;
        }

    .users-table tbody td {
        padding: 1rem;
        vertical-align: middle;
    }

.user-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.user-meta {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.badge-2fa {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102,126,234,0.2);
}

.action-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

    .icon-btn.edit {
        background: #f0fdf4;
        color: #16a34a;
    }

        .icon-btn.edit:hover {
            background: #dcfce7;
            transform: scale(1.05);
            box-shadow: 0 2px 8px rgba(22,163,74,0.2);
        }

    .icon-btn.delete {
        background: #fef2f2;
        color: #dc2626;
    }

        .icon-btn.delete:hover {
            background: #fee2e2;
            transform: scale(1.05);
            box-shadow: 0 2px 8px rgba(220,38,38,0.2);
        }

.empty-users {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    font-size: 1rem;
}

.users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.users-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.users-count {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

@media (max-width: 720px) {
    .users-table thead {
        display: none;
    }

    .users-table, .users-table tbody, .users-table tr, .users-table td {
        display: block;
        width: 100%;
    }

        .users-table tr {
            margin-bottom: 0.75rem;
            border: 1px solid #f1f5f9;
            border-radius: 8px;
            padding: 0.5rem;
        }

        .users-table td {
            padding: 0.5rem;
            display: flex;
            justify-content: space-between;
        }

            .users-table td .label {
                color: #6b7280;
                font-size: 0.85rem;
                margin-right: 0.5rem;
            }
}