/* Service Detail Page Enhancements */

/* ========== Service Info Cards ========== */
.service-info-card,
.server-info,
.product-info {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.service-info-card:hover,
.server-info:hover,
.product-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

/* ========== Status Indicators ========== */
.status-badge,
.server-status {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.status-badge.running,
.server-status.running {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-badge.stopped,
.server-status.stopped {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-badge.pending,
.server-status.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ========== Action Buttons ========== */
.action-buttons,
.server-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.action-btn,
.server-action-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.action-btn::before,
.server-action-btn::before {
    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;
}

.action-btn:hover::before,
.server-action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn:hover,
.server-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ========== Tabs Enhancement ========== */
.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    position: relative;
    border: none;
    color: var(--gray-600);
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: all 0.3s;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: width 0.3s;
}

.nav-tabs .nav-link:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
}

.nav-tabs .nav-link.active::after {
    width: 100%;
}

.tab-content {
    animation: fadeIn 0.4s ease-out;
}

/* ========== Info List ========== */
.info-list,
.server-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li,
.server-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.3s;
}

.info-list li:hover,
.server-info-list li:hover {
    background: var(--gray-50);
    padding-left: 1.5rem;
}

.info-list li:last-child,
.server-info-list li:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
}

.info-label i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.info-value {
    color: var(--gray-900);
    font-weight: 500;
}

/* ========== Resource Meters ========== */
.resource-meter,
.usage-meter {
    margin: 1.5rem 0;
}

.meter-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.meter-bar {
    height: 1rem;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.meter-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* ========== Console/Terminal ========== */
.console-window,
.terminal-window {
    background: #1e293b;
    border-radius: var(--radius-lg);
    padding: 1rem;
    font-family: 'Courier New', monospace;
    color: #e2e8f0;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.console-window::-webkit-scrollbar,
.terminal-window::-webkit-scrollbar {
    width: 8px;
}

.console-window::-webkit-scrollbar-track,
.terminal-window::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: var(--radius-md);
}

.console-window::-webkit-scrollbar-thumb,
.terminal-window::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: var(--radius-md);
}

.console-window::-webkit-scrollbar-thumb:hover,
.terminal-window::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ========== Configuration Panels ========== */
.config-panel {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.config-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
}

.config-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
}

.config-panel-title i {
    margin-right: 0.75rem;
    color: var(--primary);
    font-size: 1.5rem;
}

/* ========== Alert Messages ========== */
.service-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    animation: slideInRight 0.4s ease-out;
}

.service-alert i {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.service-alert.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.service-alert.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.service-alert.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.service-alert.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* ========== Data Tables ========== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.data-table thead {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr {
    transition: all 0.3s;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* ========== Progress Indicators ========== */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.progress-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Copy Button ========== */
.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

.copy-btn i {
    margin-right: 0.5rem;
}

/* ========== Collapsible Sections ========== */
.collapsible-section {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}

.collapsible-header {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.collapsible-header:hover {
    background: var(--gray-100);
}

.collapsible-header i {
    transition: transform 0.3s;
}

.collapsible-section.open .collapsible-header i {
    transform: rotate(180deg);
}

.collapsible-content {
    padding: 1.5rem;
    display: none;
}

.collapsible-section.open .collapsible-content {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* ========== Quick Stats ========== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* ========== Timeline ========== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.375rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.timeline-content {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.3s;
}

.timeline-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(5px);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .action-buttons,
    .server-actions {
        flex-direction: column;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .info-list li,
    .server-info-list li {
        flex-direction: column;
        gap: 0.5rem;
    }
}
