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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    min-height: 100vh;
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 40px 30px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content {
    text-align: left;
    flex: 1;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.user-info {
    text-align: right;
}

.user-info span {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 400;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.logout-btn i {
    font-size: 0.85rem;
}

.main {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
    background: #f8fafc;
}

.cluster-info {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.cluster-info h3 {
    margin: 0 0 10px 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.cluster-details {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
}

.cluster-details #clusterName {
    color: #4f46e5;
    font-weight: 600;
}

.statefulset-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.statefulset-section.hidden {
    display: none;
}

.statefulset-section h3 {
    margin: 0 0 15px 0;
    color: #92400e;
    font-size: 1.2rem;
    font-weight: 600;
}

.statefulset-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.statefulset-info p {
    margin: 0;
    color: #78350f;
}

.statefulset-info .sts-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.statefulset-info .sts-detail {
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.statefulset-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.btn-scale-sts {
    background: #f59e0b;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-scale-sts:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-scale-sts:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.warehouse-section {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.warehouse-section.hidden {
    display: none;
}

.warehouse-section h3 {
    margin: 0 0 15px 0;
    color: #166534;
    font-size: 1.2rem;
    font-weight: 600;
}

.warehouse-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.warehouse-info p {
    margin: 0;
    color: #166534;
}

.warehouse-info .warehouse-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.warehouse-info .warehouse-detail {
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
}

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

.warehouse-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.btn-update-warehouse {
    background: #22c55e;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-update-warehouse:hover:not(:disabled) {
    background: #16a34a;
    transform: translateY(-1px);
}

.btn-update-warehouse:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-resume-warehouse {
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-resume-warehouse:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-resume-warehouse:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.config-form {
    display: grid;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9fafb;
}

.dropdown-container {
    position: relative;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown-list.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item.highlighted {
    background-color: #f8fafc;
}

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

.dropdown-item.selected {
    background-color: #4f46e5;
    color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.dropdown-container input:focus {
    border-radius: 8px 8px 0 0;
}

.dropdown-container input:focus + .dropdown-list {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 4px;
    min-height: 20px;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.btn-submit,
.btn-reset,
.btn-refresh,
.btn-test-rds,
.btn-check-pods,
.btn-check-warehouse,
.btn-check-rds {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    flex: 1;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

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

.btn-reset {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-reset:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-refresh {
    background: #10b981;
    color: white;
}

.btn-refresh:hover {
    background: #059669;
    transform: translateY(-1px);
}

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

/* Namespace actions styling */
.namespace-actions {
    margin-top: 10px;
}

.btn-check-pods {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.btn-check-pods:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-check-pods:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Warehouse actions styling */
.warehouse-actions {
    margin-top: 10px;
}

.btn-check-warehouse {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.btn-check-warehouse:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.btn-check-warehouse:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* RDS actions styling */
.rds-actions {
    margin-top: 10px;
}

.btn-check-rds {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-check-rds:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.btn-check-rds:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* RDS Status Display */
.rds-status-display {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.rds-status-display.status-available {
    background-color: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.rds-status-display.status-stopped {
    background-color: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.rds-status-display.status-stopping {
    background-color: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.rds-status-display.status-starting {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.rds-status-display.status-failed {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.rds-status-display.status-error {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.rds-status-display.status-default {
    background-color: #f1f5f9;
    border-color: #64748b;
    color: #475569;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

.btn-submit.loading .btn-text {
    opacity: 0.7;
}

.btn-submit.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    margin-top: 32px;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.result.success {
    background: #f0fdf4;
    border-color: #22c55e;
}

.result.error {
    background: #fef2f2;
    border-color: #ef4444;
}

.result.info {
    background: #f0f9ff;
    border-color: #3b82f6;
}

.result.warning {
    background: #fefce8;
    border-color: #eab308;
}

.result.hidden {
    display: none;
}

.result-content h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.result.success h3 {
    color: #16a34a;
}

.result.error h3 {
    color: #dc2626;
}

.result.info h3 {
    color: #2563eb;
}

.result.warning h3 {
    color: #ca8a04;
}

.result-data {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.5);
    padding: 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

.result-data pre {
    white-space: pre-wrap;
    margin: 0;
}

.footer {
    background: #f1f5f9;
    padding: 15px 30px;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Additional styling for sections */
.section-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.section-wrapper:last-child {
    margin-bottom: 0;
}

/* Result section improvements */
.result {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 25px 20px;
    }
    
    .header-main {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-content {
        text-align: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .user-section {
        justify-content: center;
    }
    
    .main {
        padding: 20px 15px;
    }
    
    .config-form {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }
    
    .user-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .logout-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .main {
        padding: 15px 10px;
    }
    
    .config-form {
        padding: 15px;
    }
    
    .footer {
        padding: 12px 15px;
    }
}

/* Full viewport height for mobile */
@media (max-height: 600px) {
    .main {
        padding: 15px 20px;
    }
    
    .config-form {
        gap: 15px;
        padding: 20px;
    }
    
    .header {
        padding: 20px 30px;
    }
}

/* Helm Release Styles */
.helm-release-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.helm-release-section.hidden {
    display: none;
}

.helm-release-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.helm-releases-table {
    overflow-x: auto;
    margin-top: 15px;
}

.helm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9em;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.helm-table thead tr {
    background-color: #f8f9fa;
    color: #333;
    text-align: left;
    font-weight: 600;
}

.helm-table th,
.helm-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.helm-table th {
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.helm-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.helm-table tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

.helm-table tbody tr:last-of-type {
    border-bottom: 2px solid #007bff;
}

.helm-table tbody tr:hover {
    background-color: #f1f3f4;
}

/* Status styling for Helm releases */
.status-deployed {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-failed {
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-pending-install,
.status-pending-upgrade,
.status-pending-rollback {
    background-color: #ffc107;
    color: #212529;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-uninstalled {
    background-color: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.helm-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.btn-check-helm {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-check-helm:hover {
    background-color: #138496;
}

.btn-check-helm:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}