/* ====================================
   OOREDOO CCUP - Styles
   Customer Complaint Unified Portal
   ==================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Dark Theme (Default) */
#ccup[data-theme="dark"] {
    --primary-color: #003F87;
    --primary-hover: #0056b3;
    --secondary-color: #0066cc;
    --accent-color: #3399ff;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-color: #334155;
    --border-light: #475569;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

/* Light Pastel Theme */
#ccup[data-theme="light"] {
    --primary-color: #003F87;
    --primary-hover: #0056b3;
    --secondary-color: #0066cc;
    --accent-color: #3399ff;

    --bg-primary: #f5f7ff;
    --bg-secondary: #f3f6ff;
    /* #f5f3ff; */
    --bg-tertiary: #e9eefe;
    --bg-card: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64788b;

    --border-color: #e0e7ff;
    --border-light: #c7d2fe;

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #6366f1;
}

#ccup {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Header Styles */
#ccup .header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#ccup .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
}

#ccup .logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#ccup .logo-icon {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

#ccup .logo-text h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

#ccup .logo-text .subtitle {
    font-size: 0.7rem;
    opacity: 0.9;
}

#ccup .header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#ccup .theme-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-speed);
}

#ccup .theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

#ccup .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#ccup .user-role {
    font-size: 0.75rem;
    font-weight: 500;
}

#ccup .user-avatar {
    font-size: 1.5rem;
}

/* Container */
#ccup .container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Search Panel */
#ccup .search-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

#ccup .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

#ccup .panel-header h2 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

#ccup .panel-header h2 i {
    color: var(--secondary-color);
}

#ccup .search-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#ccup .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

/* Inline Form Row - All in One Row */
#ccup .form-row-inline {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    flex-wrap: nowrap;
}

#ccup .form-row-inline .form-group {
    flex: 1;
    min-width: 150px;
}

#ccup .form-actions-inline {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    padding-bottom: 0.1rem;
}

#ccup .form-actions-inline .btn {
    white-space: nowrap;
    padding: 0.55rem 1rem;
}

#ccup .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#ccup .form-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

#ccup .form-group label i {
    color: var(--secondary-color);
}

#ccup .form-group input,
#ccup .form-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all var(--transition-speed);
    outline: none;
}

#ccup .form-group input:focus,
#ccup .form-group select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Input Validation States */
#ccup .form-group input.input-valid {
    border-color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#ccup .form-group input.input-invalid {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Shake Animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

#ccup .form-group input.shake {
    animation: shake 0.5s ease-in-out;
}

/* Validation Hint Tooltip */
#ccup .validation-hint {
    position: absolute;
    top: -8px;
    right: 8px;
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#ccup .validation-hint::before {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--error);
}

#ccup .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

#ccup .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-speed);
    outline: none;
}

#ccup .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

#ccup .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#ccup .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

#ccup .btn-secondary:hover {
    background: var(--border-color);
}

/* Loading Indicator */
#ccup .loading-overlay {
    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: 9999;
}

#ccup .loading-spinner {
    text-align: center;
    color: white;
}

#ccup .spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.75rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Subscriber Info Panel */
#ccup .subscriber-device-info {
    margin-bottom: 0.75rem;
}

#ccup .info-panel {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
}

/* Two Column Layout for Subscriber and Device */
#ccup .info-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

#ccup .info-column {
    background: var(--bg-card);
    border-radius: 0;
    border: none;
    padding: 0;
    position: relative;
}

#ccup .info-column:first-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
}

/* Column Wrapper with Horizontal Layout */
#ccup .info-column-wrapper {
    display: flex;
    align-items: stretch;
    min-height: 100%;
}

/* Vertical Header on Left Side */
#ccup .info-header-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    /* background: var(--bg-secondary); */
    background: #dfe7ff;
    /* border-right: 1px solid var(--border-color); */
    min-width: 100px;
    gap: 0.8rem;
}
#ccup[data-theme="dark"] .info-header-vertical {
    background: #232e3f;
}
#ccup .info-header-icon-large {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    background: transparent;
}

.info-header-icon-large.subscriber {
    color: #5b9cff;
}

.info-header-icon-large.device {
    color: #ff5470;
}

.info-header-vertical h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
    text-align: center;
    writing-mode: horizontal-tb;
}

/* Old horizontal header - keep for backward compatibility */
#ccup .info-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0;
    padding: 0.8rem 1.2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.info-header h3 {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: capitalize;
}

#ccup .info-header-icon {
    width: 20px;
    height: 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: transparent;
}

.info-header-icon.subscriber {
    color: #5b9cff;
}

.info-header-icon.device {
    color: #ff5470;
}

#ccup .info-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.2rem 1.2rem;
}

/* Compact Grid Design for Info Items */
#ccup .info-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
    padding: 1rem;
    flex: 1;
}

#ccup .info-grid-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    /* padding: 0.6rem; */
    background: var(--bg-secondary);
    border-radius: 4px;
    /* border: 1px solid var(--border-color); */
    transition: all 0.2s ease;
}

#ccup .info-grid-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

#ccup .info-grid-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#ccup .info-grid-icon i {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#ccup .info-grid-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

#ccup .info-grid-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

#ccup .info-grid-value {
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ccup .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    font-size: 0.78rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 32px;
}

#ccup .info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#ccup .info-row:first-child {
    padding-top: 0;
}

#ccup .info-row .info-label {
    color: var(--text-muted);
    font-weight: 400;
    min-width: 150px;
    letter-spacing: 0.3px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#ccup .info-row .info-label i {
    color: var(--text-secondary);
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

#ccup .info-row .info-value {
    color: var(--text-primary);
    font-weight: 400;
    text-align: right;
    flex: 1;
    word-break: break-word;
    line-height: 1.4;
}

/* Theme-specific overrides for info-row */
#ccup[data-theme="dark"] .info-row .info-label {
    color: #94a3b8;
}

#ccup[data-theme="dark"] .info-row .info-label i {
    color: #cbd5e1;
}

#ccup[data-theme="dark"] .info-row .info-value {
    color: #f1f5f9;
}

#ccup[data-theme="light"] .info-row .info-label {
    color: #64788b;
}

#ccup[data-theme="light"] .info-row .info-label i {
    color: #475569;
}

#ccup[data-theme="light"] .info-row .info-value {
    color: #1e293b;
}

/* Old styles - keep for backward compatibility */
#ccup .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, max-content));
    gap: 0.5rem;
    justify-content: start;
}

#ccup .info-card {
    background: var(--bg-secondary);
    padding: 0.6rem;
    border-radius: 6px;
    display: flex;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
    position: relative;
    max-width: 260px;
    width: 100%;
}

#ccup .info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#ccup .info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    position: relative;
    flex-shrink: 0;
}

/* Result-based icon styling */
.info-icon.status-error::after,
.info-icon.status-warning::after {
    content: '✕';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse-error 2s infinite;
}

.info-icon.status-warning::after {
    content: '!';
    background: var(--warning);
    animation: pulse-warning 2s infinite;
    width: 16px;
    height: 16px;
}

.info-icon.status-success::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

@keyframes pulse-error {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

@keyframes pulse-warning {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
}

.info-icon.subscriber {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.info-icon.device {
    background: linear-gradient(135deg, #3b82f6, #2dd4bf);
}

.info-icon.network {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.info-icon.status {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

#ccup .info-content {
    flex: 1;
    min-width: 0;
}

.info-content h3 {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

#ccup .info-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

#ccup .info-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
    line-height: 1.2;
}

#ccup .info-label span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Diagnosis Panel */
#ccup .diagnosis-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .diagnosis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, max-content));
    gap: 0.5rem;
    justify-content: start;
}

#ccup .diagnosis-card {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
    position: relative;
    max-width: 280px;
    width: 100%;
}

.diagnosis-card.has-error {
    border-color: var(--error);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), transparent);
}

.diagnosis-card.has-warning {
    border-color: var(--warning);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent);
}

.diagnosis-card.has-success {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
}

#ccup .diagnosis-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#ccup .diagnosis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.diagnosis-header h3 {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
}

#ccup .status-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--warning);
    color: white;
    white-space: nowrap;
    line-height: 1.2;
}

.status-badge.success {
    background: var(--success);
}

.status-badge.error {
    background: var(--error);
}

#ccup .diagnosis-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#ccup .diagnosis-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

#ccup .diagnosis-item i {
    color: var(--secondary-color);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.diagnosis-item.error i {
    color: var(--error);
}

.diagnosis-item.success i {
    color: var(--success);
}

/* Demarcation Panel */
#ccup .demarcation-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .btn-best-suggestion {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all var(--transition-speed);
}

#ccup .btn-best-suggestion:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#ccup .demarcation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.4rem;
}

#ccup .demarcation-card {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    gap: 0.4rem;
    border: 1px solid var(--border-color);
}

#ccup .demarcation-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

#ccup .demarcation-card.root-cause .demarcation-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

#ccup .demarcation-card.suggestion .demarcation-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

#ccup .demarcation-card.remarks .demarcation-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.demarcation-content h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

#ccup .demarcation-content p {
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Quality Panel */
#ccup .quality-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

#ccup .quality-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-radius: 10px;
    padding: 0.9rem;
    border: 1px solid rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#ccup .quality-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    opacity: 0.8;
}

#ccup .quality-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.quality-card h3 {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.quality-card h3 i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

#ccup .quality-card:nth-child(2) h3 i {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

#ccup .quality-card:nth-child(2)::before {
    background: linear-gradient(180deg, #10b981, #059669);
}

#ccup .quality-card:nth-child(2) {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.15);
}

#ccup .quality-card:nth-child(2):hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

#ccup .quality-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

#ccup .metric {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0.7rem;
    background: rgba(8, 0, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

#ccup .metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#ccup .metric:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateX(2px);
}

#ccup .metric:hover::before {
    opacity: 1;
}

#ccup .metric-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    line-height: 1.2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

#ccup .metric-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

#ccup .quality-card:nth-child(2) .metric-label::before {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

#ccup .metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#ccup .quality-card:nth-child(2) .metric-value {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Application Quality */
#ccup .app-quality-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    justify-content: start;
}

#ccup .app-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 0.85rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

#ccup .app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-speed);
}

#ccup .app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
    border-color: var(--secondary-color);
}

#ccup .app-card:hover::before {
    opacity: 1;
}

#ccup .app-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.6rem;
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
}

#ccup .app-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0;
    filter: blur(8px);
    transition: opacity var(--transition-speed);
}

#ccup .app-card:hover .app-icon-wrapper::after {
    opacity: 0.5;
}

#ccup .app-icon-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

#ccup .app-name {
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
}

#ccup .app-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

#ccup .app-metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

#ccup .metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ccup .metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: left;
    line-height: 1.2;
}

#ccup .metric-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

#ccup .metric-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#ccup .metric-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#ccup .metric-progress-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;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.metric-progress-fill.speed {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.metric-progress-fill.excellent {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.metric-progress-fill.good {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.metric-progress-fill.warning {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

#ccup .metric-value {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

/* Table Styles */
.serving-sites-panel,
.ftth-infrastructure-panel,
.ftth-sessions-panel,
#ccup .ftth-alarms-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .btn-export {
    padding: 0.6rem 1.2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

#ccup .btn-export:hover {
    background: var(--primary-hover);
}

#ccup .table-container {
    overflow-x: auto;
    margin-top: 0.5rem;
}

#ccup .data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#ccup .data-table thead {
    background: var(--bg-tertiary);
}

#ccup .data-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#ccup .data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.data-table tbody tr {
    transition: all var(--transition-speed);
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* FTTH Specific Styles */

/* FTTH Layout Grid */
#ccup .ftth-topology-row {
    width: 100%;
    margin-bottom: 1rem;
}

#ccup .ftth-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

#ccup .ftth-middle-row {
    display: none;
}

#ccup .ftth-bottom-row {
    display: none;
}

/* Infrastructure Topology */
#ccup .infrastructure-topology {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

#ccup .topology-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.topology-header h2 {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#ccup .topology-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#ccup .topology-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.topology-screenshot-btn,
#ccup .topology-email-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: rgb(79, 70, 229);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

#ccup .topology-email-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
    color: rgb(5, 150, 105);
}

#ccup .topology-screenshot-btn:hover,
#ccup .topology-email-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(16, 185, 129, 0.15));
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

#ccup .topology-email-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

#ccup .topology-screenshot-btn:active,
#ccup .topology-email-btn:active {
    transform: translateY(0);
}

/* Zoom Controls */
#ccup .topology-zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    margin-right: 0.5rem;
}

#ccup .topology-zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 4px;
    color: rgb(79, 70, 229);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

#ccup .topology-zoom-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
    transform: scale(1.05);
}

#ccup .topology-zoom-btn:active {
    transform: scale(0.95);
}

#ccup .topology-zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#ccup .topology-zoom-level {
    min-width: 45px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(79, 70, 229);
    user-select: none;
}

#ccup[data-theme="dark"] .topology-zoom-controls {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

#ccup[data-theme="dark"] .topology-zoom-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.4);
    color: rgb(129, 140, 248);
}

#ccup[data-theme="dark"] .topology-zoom-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
}

#ccup[data-theme="dark"] .topology-zoom-level {
    color: rgb(129, 140, 248);
}

/* Zoom Wrapper */
#ccup .topology-zoom-wrapper {
    overflow: auto;
    position: relative;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.1);
    scroll-behavior: smooth;
}

#ccup .topology-zoom-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#ccup .topology-zoom-wrapper::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 4px;
}

#ccup .topology-zoom-wrapper::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

#ccup .topology-zoom-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

#ccup[data-theme="dark"] .topology-zoom-wrapper {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.08));
    border-color: rgba(71, 85, 105, 0.3);
}

#ccup[data-theme="dark"] .topology-zoom-wrapper::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
}

#ccup[data-theme="dark"] .topology-zoom-wrapper::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
}

#ccup[data-theme="dark"] .topology-zoom-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

#ccup[data-theme="dark"] .topology-screenshot-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(16, 185, 129, 0.15));
    border-color: rgba(99, 102, 241, 0.4);
    color: rgb(129, 140, 248);
}

#ccup[data-theme="dark"] .topology-email-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
    border-color: rgba(16, 185, 129, 0.4);
    color: rgb(52, 211, 153);
}

#ccup[data-theme="dark"] .topology-screenshot-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.2));
    border-color: rgba(99, 102, 241, 0.6);
}

#ccup[data-theme="dark"] .topology-email-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2));
    border-color: rgba(16, 185, 129, 0.6);
}

#ccup .node-id {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

#ccup .topology-diagram {
    display: grid;
    grid-template-columns: .15fr 1fr .15fr;
    align-items: center;
    gap: 0;
    padding-bottom: .4rem;
    /* padding: 1rem 0.5rem; */
}

#ccup .topology-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 2px solid #10b981;
    border-radius: 8px;
    position: relative;
}

.topology-node.labels {
    padding: 0;
    background: no-repeat;
    border: 0;
}

#ccup .node-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #10b981;
    overflow: visible;
}

/* SVG Node Icons */
#ccup .node-svg {
    width: 100%;
    height: 100%;
}

/* Router/OLT SVG Styling (Server Rack Design) */
#ccup .router-svg .gradient-start {
    stop-color: #10b981;
}

#ccup .router-svg .gradient-end {
    stop-color: #047857;
}

#ccup .router-svg .rack-body {
    fill: url(#routerGradient);
    stroke: #10b981;
}

#ccup .router-svg .status-light {
    fill: #10b981;
}

#ccup .router-svg .port-light {
    fill: #10b981;
    opacity: 0.7;
}

/* ONT SVG Styling (WiFi Router Design) */
#ccup .ont-svg .gradient-start {
    stop-color: #10b981;
}

#ccup .ont-svg .gradient-end {
    stop-color: #047857;
}

#ccup .ont-svg .ont-body {
    fill: url(#ontGradient);
    stroke: #10b981;
}

#ccup .ont-svg .status-led {
    fill: #10b981;
}

#ccup .ont-svg .wifi-wave {
    stroke: #10b981;
    opacity: 0.2;
}

#ccup .ont-svg .wifi-center {
    fill: #10b981;
}

/* Online Status Animations - OLT */
.topology-node.olt-node:has(#oltStatus.online) .router-svg .status-light {
    animation: ledPulse 1.8s ease-in-out infinite;
}

.topology-node.olt-node:has(#oltStatus.online) .router-svg .port-light {
    animation: portActivity 2.2s ease-in-out infinite;
}

/* Online Status Animations - ONT (Reachable/Success) */
.topology-node.ont-node:has(#ontStatus.reachable) .ont-svg .status-led {
    animation: ledPulse 1.6s ease-in-out infinite;
}

.topology-node.ont-node:has(#ontStatus.reachable) .ont-svg .wifi-wave {
    animation: wifiSignalPulse 2s ease-in-out infinite;
}

/* ONT Diagnostic Status - Success (All Checks Passed) */
.topology-node.ont-node[data-diagnostic-status="success"] {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    animation: successPulse 2s ease-in-out infinite;
}

.topology-node.ont-node[data-diagnostic-status="success"] .node-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.08));
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .gradient-start {
    stop-color: #10b981;
}

.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .gradient-end {
    stop-color: #047857;
}

.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .ont-body,
.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .status-led,
.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .wifi-wave,
.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .wifi-center {
    stroke: #10b981;
    fill: #10b981;
}

.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .status-led {
    animation: ledPulse 1.6s ease-in-out infinite;
}

.topology-node.ont-node[data-diagnostic-status="success"] .ont-svg .wifi-wave {
    animation: wifiSignalPulse 2s ease-in-out infinite;
}

/* ONT Diagnostic Status - Warning (Some Issues Detected) */
.topology-node.ont-node[data-diagnostic-status="warning"] {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
    animation: warningPulse 1.5s ease-in-out infinite;
}

.topology-node.ont-node[data-diagnostic-status="warning"] .node-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.08));
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.topology-node.ont-node[data-diagnostic-status="warning"] .ont-svg .gradient-start {
    stop-color: #f59e0b;
}

.topology-node.ont-node[data-diagnostic-status="warning"] .ont-svg .gradient-end {
    stop-color: #d97706;
}

.topology-node.ont-node[data-diagnostic-status="warning"] .ont-svg .ont-body,
.topology-node.ont-node[data-diagnostic-status="warning"] .ont-svg .status-led,
.topology-node.ont-node[data-diagnostic-status="warning"] .ont-svg .wifi-wave,
.topology-node.ont-node[data-diagnostic-status="warning"] .ont-svg .wifi-center {
    stroke: #f59e0b;
    fill: #f59e0b;
}

.topology-node.ont-node[data-diagnostic-status="warning"] .ont-svg .status-led {
    animation: ledFlicker 1.2s ease-in-out infinite;
}

/* ONT Diagnostic Status - Critical (Critical Issues Found) */
.topology-node.ont-node[data-diagnostic-status="critical"] {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
    animation: criticalPulse 1s ease-in-out infinite;
}

.topology-node.ont-node[data-diagnostic-status="critical"] .node-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.08));
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.topology-node.ont-node[data-diagnostic-status="critical"] .ont-svg .gradient-start {
    stop-color: #ef4444;
}

.topology-node.ont-node[data-diagnostic-status="critical"] .ont-svg .gradient-end {
    stop-color: #b91c1c;
}

.topology-node.ont-node[data-diagnostic-status="critical"] .ont-svg .ont-body,
.topology-node.ont-node[data-diagnostic-status="critical"] .ont-svg .status-led,
.topology-node.ont-node[data-diagnostic-status="critical"] .ont-svg .wifi-wave,
.topology-node.ont-node[data-diagnostic-status="critical"] .ont-svg .wifi-center {
    stroke: #ef4444;
    fill: #ef4444;
}

/* ONT Diagnostic Status - Unknown (Unable to Determine) */
.topology-node.ont-node[data-diagnostic-status="unknown"] {
    border-color: #6b7280;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08), rgba(107, 114, 128, 0.02));
}

.topology-node.ont-node[data-diagnostic-status="unknown"] .node-icon {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.25), rgba(107, 114, 128, 0.08));
    box-shadow: 0 0 10px rgba(107, 114, 128, 0.2);
}

.topology-node.ont-node[data-diagnostic-status="unknown"] .ont-svg .gradient-start {
    stop-color: #6b7280;
}

.topology-node.ont-node[data-diagnostic-status="unknown"] .ont-svg .gradient-end {
    stop-color: #4b5563;
}

.topology-node.ont-node[data-diagnostic-status="unknown"] .ont-svg .ont-body,
.topology-node.ont-node[data-diagnostic-status="unknown"] .ont-svg .status-led,
.topology-node.ont-node[data-diagnostic-status="unknown"] .ont-svg .wifi-wave,
.topology-node.ont-node[data-diagnostic-status="unknown"] .ont-svg .wifi-center {
    stroke: #6b7280;
    fill: #6b7280;
}

/* ========================================
   OLT NODE - DIAGNOSTIC STATUS STYLING
   ======================================== */

/* OLT Node - Success Status (Green) */
.topology-node.olt-node[data-diagnostic-status="success"] {
    animation: successPulse 3s ease-in-out infinite;
}

.topology-node.olt-node[data-diagnostic-status="success"] .node-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.08));
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.topology-node.olt-node[data-diagnostic-status="success"] .router-svg .gradient-start {
    stop-color: #10b981;
}

.topology-node.olt-node[data-diagnostic-status="success"] .router-svg .gradient-end {
    stop-color: #059669;
}

.topology-node.olt-node[data-diagnostic-status="success"] .router-svg .rack-body,
.topology-node.olt-node[data-diagnostic-status="success"] .router-svg .status-light,
.topology-node.olt-node[data-diagnostic-status="success"] .router-svg .port-light {
    stroke: #10b981;
}

.topology-node.olt-node[data-diagnostic-status="success"] .router-svg .status-light,
.topology-node.olt-node[data-diagnostic-status="success"] .router-svg .port-light {
    fill: #10b981;
    animation: greenBlink 2s ease-in-out infinite;
}

/* OLT Node - Warning Status (Yellow) */
.topology-node.olt-node[data-diagnostic-status="warning"] {
    animation: warningPulse 2s ease-in-out infinite;
}

.topology-node.olt-node[data-diagnostic-status="warning"] .node-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.08));
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.topology-node.olt-node[data-diagnostic-status="warning"] .router-svg .gradient-start {
    stop-color: #f59e0b;
}

.topology-node.olt-node[data-diagnostic-status="warning"] .router-svg .gradient-end {
    stop-color: #d97706;
}

.topology-node.olt-node[data-diagnostic-status="warning"] .router-svg .rack-body,
.topology-node.olt-node[data-diagnostic-status="warning"] .router-svg .status-light,
.topology-node.olt-node[data-diagnostic-status="warning"] .router-svg .port-light {
    stroke: #f59e0b;
}

.topology-node.olt-node[data-diagnostic-status="warning"] .router-svg .status-light,
.topology-node.olt-node[data-diagnostic-status="warning"] .router-svg .port-light {
    fill: #f59e0b;
    animation: yellowBlink 1.5s ease-in-out infinite;
}

/* OLT Node - Critical Status (Red) */
.topology-node.olt-node[data-diagnostic-status="critical"] {
    animation: criticalPulse 1.5s ease-in-out infinite;
}

.topology-node.olt-node[data-diagnostic-status="critical"] .node-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.08));
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.topology-node.olt-node[data-diagnostic-status="critical"] .router-svg .gradient-start {
    stop-color: #ef4444;
}

.topology-node.olt-node[data-diagnostic-status="critical"] .router-svg .gradient-end {
    stop-color: #dc2626;
}

.topology-node.olt-node[data-diagnostic-status="critical"] .router-svg .rack-body,
.topology-node.olt-node[data-diagnostic-status="critical"] .router-svg .status-light,
.topology-node.olt-node[data-diagnostic-status="critical"] .router-svg .port-light {
    stroke: #ef4444;
}

.topology-node.olt-node[data-diagnostic-status="critical"] .router-svg .status-light,
.topology-node.olt-node[data-diagnostic-status="critical"] .router-svg .port-light {
    fill: #ef4444;
    animation: redBlink 1s ease-in-out infinite;
}

/* OLT Node - Unknown Status (Gray) */
.topology-node.olt-node[data-diagnostic-status="unknown"] .node-icon {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.25), rgba(107, 114, 128, 0.08));
    box-shadow: 0 0 10px rgba(107, 114, 128, 0.2);
}

.topology-node.olt-node[data-diagnostic-status="unknown"] .router-svg .gradient-start {
    stop-color: #6b7280;
}

.topology-node.olt-node[data-diagnostic-status="unknown"] .router-svg .gradient-end {
    stop-color: #4b5563;
}

.topology-node.olt-node[data-diagnostic-status="unknown"] .router-svg .rack-body,
.topology-node.olt-node[data-diagnostic-status="unknown"] .router-svg .status-light,
.topology-node.olt-node[data-diagnostic-status="unknown"] .router-svg .port-light {
    stroke: #6b7280;
    fill: #6b7280;
}

/* ========================================
   SPLITTER NODE - DIAGNOSTIC STATUS STYLING
   ======================================== */

/* Splitter Node - Success Status (Green) */
.splitter-node[data-diagnostic-status="success"] {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    animation: successPulse 3s ease-in-out infinite;
}

/* Splitter Node - Warning Status (Yellow) */
.splitter-node[data-diagnostic-status="warning"] {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    animation: warningPulse 2s ease-in-out infinite;
}

/* Splitter Node - Critical Status (Red) */
.splitter-node[data-diagnostic-status="critical"] {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    animation: criticalPulse 1.5s ease-in-out infinite;
}

/* Splitter Node - Unknown Status (Gray) */
.splitter-node[data-diagnostic-status="unknown"] {
    border-color: #6b7280;
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
    box-shadow: 0 0 5px rgba(107, 114, 128, 0.2);
}

/* Offline Status - Red and No Animation - OLT */
.topology-node.olt-node:has(#oltStatus.offline) .node-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
}

.topology-node.olt-node:has(#oltStatus.offline) .router-svg .gradient-start {
    stop-color: #ef4444;
}

.topology-node.olt-node:has(#oltStatus.offline) .router-svg .gradient-end {
    stop-color: #b91c1c;
}

.topology-node.olt-node:has(#oltStatus.offline) .router-svg .rack-body,
.topology-node.olt-node:has(#oltStatus.offline) .router-svg .status-light,
.topology-node.olt-node:has(#oltStatus.offline) .router-svg .port-light {
    stroke: #ef4444;
    fill: #ef4444;
}

/* Offline Status - Red and No Animation - ONT (Legacy support for :has selector) */
.topology-node.ont-node:has(#ontStatus.offline) .node-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
}

/* Integrated Diagnostic Status in Topology */
#ccup .topology-diagnostic-status {
    margin-top: 0.6rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(245, 158, 11, 0.05));
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: diagnosticGlow 2s ease-in-out infinite;
}

#ccup .diag-status-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
    margin-bottom: 0.4rem;
}

#ccup .diag-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: iconPulseSmall 1.5s ease-in-out infinite;
}

#ccup .diag-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

#ccup .diag-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ccup .diag-time {
    font-size: 0.55rem;
    color: var(--text-secondary);
}

#ccup .diag-conclusion {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
}

#ccup .diag-status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.diag-status-icon.critical {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: statusPulse 1s ease-in-out infinite;
}

.diag-status-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.diag-status-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

#ccup .diag-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#ccup .diag-issue {
    font-size: 0.7rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.3;
}

#ccup .diag-action {
    font-size: 0.6rem;
    color: var(--text-secondary);
    background: rgba(251, 191, 36, 0.1);
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    border-left: 2px solid #f59e0b;
    line-height: 1.4;
}

#ccup .diag-action i {
    color: #f59e0b;
    margin-right: 0.25rem;
}

@keyframes diagnosticGlow {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(239, 68, 68, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    }
}

@keyframes iconPulseSmall {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes statusPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.8);
    }
}

/* ==========================================
   ENHANCED TOPOLOGY FLOW DIAGRAM STYLES
   Card-based horizontal flow layout
   ========================================== */

#ccup .topology-flow-diagram {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
    overflow-x: auto;
    min-height: 140px;
}

/* Topology Component Card */
#ccup .topology-component {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 120px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

#ccup .topology-component:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Component Status Header */
#ccup .component-status-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#ccup .component-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

#ccup .component-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#ccup .component-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ccup .component-status-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    width: fit-content;
}

/* Component Details */
#ccup .component-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

#ccup .detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

#ccup .detail-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#ccup .detail-value {
    font-size: 0.65rem;
    color: var(--text-primary);
    font-weight: 600;
}

#ccup .detail-value i {
    margin-right: 0.25rem;
    font-size: 0.6rem;
}

.detail-value.error {
    color: var(--error);
}

/* Connection Arrows */
#ccup .topology-arrow {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

#ccup .arrow-line {
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-color), transparent);
    position: relative;
}

#ccup .arrow-head {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid var(--border-color);
}

/* ========================================
   COMPONENT-SPECIFIC STYLES
   ======================================== */

/* AAA AUTH Component */
#ccup .aaa-auth-component {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
}

#ccup .aaa-auth-component .component-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

#ccup .aaa-auth-component .component-status-badge.ok {
    background: #10b981;
    color: white;
}

/* CORE Component */
#ccup .core-component {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
}

#ccup .core-component .component-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* NCE-TRM Component */
#ccup .nce-component {
    border-color: #06b6d4;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(6, 182, 212, 0.02));
}

#ccup .nce-component .component-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

/* OLT Component */
#ccup .olt-component {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
}

#ccup .olt-component .component-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

#ccup .olt-component .component-status-badge.up {
    background: #10b981;
    color: white;
}

/* Splitter Component */
#ccup .splitter-component {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
}

#ccup .splitter-component .component-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

#ccup .splitter-component .component-status-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid #8b5cf6;
}

/* ONT Component */
#ccup .ont-component {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
}

#ccup .ont-component .component-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    animation: errorPulse 2s ease-in-out infinite;
}

#ccup .ont-component .component-status-badge.critical {
    background: #ef4444;
    color: white;
    animation: badgePulse 1.5s ease-in-out infinite;
}

/* Status Badge Variations */
.component-status-badge.ok,
.component-status-badge.up {
    background: #10b981;
    color: white;
}

.component-status-badge.warning {
    background: #f59e0b;
    color: white;
}

.component-status-badge.critical,
.component-status-badge.down {
    background: #ef4444;
    color: white;
}

.component-status-badge.unknown {
    background: #6b7280;
    color: white;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes errorPulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6);
        transform: scale(1.05);
    }
}

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Scrollbar styling for flow diagram */
#ccup .topology-flow-diagram::-webkit-scrollbar {
    height: 6px;
}

#ccup .topology-flow-diagram::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}

#ccup .topology-flow-diagram::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

#ccup .topology-flow-diagram::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #ccup .topology-component {
        min-width: 100px;
        padding: 0.5rem;
    }

    #ccup .component-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    #ccup .component-label {
        font-size: 0.6rem;
    }

    #ccup .detail-label,

    #ccup .detail-value {
        font-size: 0.5rem;
    }
}

/* Modern Topology Flow Container */
#ccup .topology-flow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1rem 1rem;
    min-height: 280px;
    position: relative;
    transform-origin: center center;
    transition: transform 0.3s ease;
    width: max-content;
    min-width: 100%;
}

#ccup[data-theme="dark"] .topology-flow-container {
    background: transparent;
    border-color: transparent;
}

/* Flex utilities */
#ccup .flex-shrink-0 {
    flex-shrink: 0;
    overflow: visible;
}

#ccup .w-44 {
    width: 11rem;
}

#ccup .w-48 {
    width: 12rem;
}

/* Glass Card */
#ccup .glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    position: relative;
}

#ccup .glass-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#ccup[data-theme="dark"] .glass-card,
html.dark-mode .glass-card,
#ccup[data-theme="dark"] .glass-card {
    background: rgba(0, 0, 0, 0.79);
    backdrop-filter: blur(12px);
    border-color: rgba(71, 85, 105, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#ccup[data-theme="dark"] .glass-card:hover,
html.dark-mode .glass-card:hover,
#ccup[data-theme="dark"] .glass-card:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.glass-card.ring-1 {
    border: 2px solid;
}

.glass-card.ring-error\\/50 {
    border-color: rgba(239, 68, 68, 0.5);
}

#ccup[data-theme="dark"] .glass-card.ring-error\\/50,
#ccup[data-theme="dark"] .glass-card.ring-error\\/50 {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2), 0 0 0 1px rgba(239, 68, 68, 0.15);
}

.glass-card.bg-error\\/5 {
    background: rgba(239, 68, 68, 0.05);
}

#ccup[data-theme="dark"] .glass-card.bg-error\\/5,
#ccup[data-theme="dark"] .glass-card.bg-error\\/5 {
    background: rgba(239, 68, 68, 0.08);
}

.glass-card.border-error\\/20 {
    border-color: rgba(239, 68, 68, 0.2);
}

#ccup[data-theme="dark"] .glass-card.border-error\\/20 {
    border-color: rgba(239, 68, 68, 0.3);
}

/* Padding utilities */
.p-1\\.5 {
    padding: 0.375rem;
}

#ccup .p-2 {
    padding: 0.5rem;
}

/* Background utilities */
.bg-blue-500\\/10 {
    background-color: rgba(59, 130, 246, 0.1);
}

.bg-emerald-500\\/10 {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-error\\/10 {
    background-color: rgba(239, 68, 68, 0.1);
}

.bg-error\\/5 {
    background-color: rgba(239, 68, 68, 0.05);
}

/* Border utilities */
#ccup .border-b {
    border-bottom-width: 1px;
}

#ccup .border-slate-100 {
    border-color: rgb(241, 245, 249);
}

#ccup[data-theme="dark"] .border-slate-800 {
    border-color: rgb(30, 41, 59);
}

.border-error\\/10 {
    border-color: rgba(239, 68, 68, 0.1);
}

/* Border radius utilities */
#ccup .rounded-t-xl {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

#ccup .rounded-sm {
    border-radius: 0.125rem;
}

#ccup .rounded-lg {
    border-radius: 0.5rem;
}

#ccup .rounded-full {
    border-radius: 9999px;
}

/* Flex utilities */
#ccup .flex {
    display: flex;
}

#ccup .items-center {
    align-items: center;
}

#ccup .justify-between {
    justify-content: space-between;
}

.gap-0\\.5 {
    gap: 0.125rem;
}

#ccup .gap-1 {
    gap: 0.25rem;
}

.gap-1\\.5 {
    gap: 0.375rem;
}

#ccup .gap-2 {
    gap: 0.5rem;
}

#ccup .flex-col {
    flex-direction: column;
}

/* Grid utilities */
#ccup .grid {
    display: grid;
}

#ccup .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Space utilities */
.space-y-2>*+* {
    margin-top: 0.5rem;
}

/* Material Symbols */
#ccup .material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

#ccup .text-xs {
    font-size: 0.75rem;
}

.text-\\[8px\\] {
    font-size: 8px;
}

.text-\\[7px\\] {
    font-size: 7px;
}

.text-\\[10px\\] {
    font-size: 10px;
}

.text-\\[12px\\] {
    font-size: 12px;
}

.text-\\[6px\\] {
    font-size: 6px;
}

#ccup .text-lg {
    font-size: 1.125rem;
}

/* Font weight utilities */
#ccup .font-black {
    font-weight: 900;
}

#ccup .font-bold {
    font-weight: 700;
}

/* Text transform */
#ccup .uppercase {
    text-transform: uppercase;
}

/* Letter spacing */
#ccup .tracking-wider {
    letter-spacing: 0.05em;
}

/* Text colors */
#ccup .text-blue-500 {
    color: rgb(59, 130, 246);
}

#ccup .text-emerald-500 {
    color: rgb(16, 185, 129);
}

#ccup .text-error {
    color: #ef4444;
}

.text-error\\/70 {
    color: rgba(239, 68, 68, 0.7);
}

#ccup .text-slate-400 {
    color: rgb(148, 163, 184);
}

#ccup .text-slate-500 {
    color: rgb(100, 116, 139);
}

#ccup .text-slate-600 {
    color: rgb(71, 85, 105);
}

#ccup[data-theme="dark"] .text-slate-300 {
    color: rgb(203, 213, 225);
}

#ccup .text-white {
    color: white;
}

/* Compact labels and values */
#ccup .compact-label {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgb(100, 116, 139);
    opacity: 0.7;
}

#ccup[data-theme="dark"] .compact-label {
    color: rgb(148, 163, 184);
}

#ccup .compact-value {
    font-size: 10px;
    font-weight: 700;
    color: rgb(15, 23, 42);
}

#ccup[data-theme="dark"] .compact-value {
    color: rgb(226, 232, 240);
}

#ccup .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Horizontal Connector */
#ccup .horizontal-connector {
    position: relative;
    width: 7rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.4), rgba(16, 185, 129, 0.4));
    flex-shrink: 0;
    margin: 0 -1px;
}

#ccup[data-theme="dark"] .horizontal-connector {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.5), rgba(16, 185, 129, 0.5));
}

#horizontal-connector-olt-splitter[data-diagnostic-status="success"],
#horizontal-connector-splitter-ont[data-diagnostic-status="success"] {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.4), rgba(16, 185, 129, 0.4));
}

#horizontal-connector-olt-splitter[data-diagnostic-status="warning"],
#horizontal-connector-splitter-ont[data-diagnostic-status="warning"] {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.4), rgba(245, 158, 11, 0.4));
}

#horizontal-connector-olt-splitter[data-diagnostic-status="critical"],
#horizontal-connector-splitter-ont[data-diagnostic-status="critical"] {
    background: rgb(217, 35, 35) !important;
}

#horizontal-connector-olt-splitter[data-diagnostic-status="unknown"],
#horizontal-connector-splitter-ont[data-diagnostic-status="unknown"] {
    background: linear-gradient(90deg, rgba(107, 114, 128, 0.4), rgba(107, 114, 128, 0.4));
}

/* Fiber Cut Badge */
#ccup .fiber-cut-badge {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(217, 35, 35);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(217, 35, 35, 0.4);
    z-index: 10;
    animation: fiberCutPulse 1.5s ease-in-out infinite;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#ccup .fiber-cut-badge svg {
    width: 11px;
    height: 11px;
    fill: white;
}

@keyframes fiberCutPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(217, 35, 35, 0.4);
    }
    50% {
        box-shadow: 0 4px 16px rgba(217, 35, 35, 0.7), 0 0 0 4px rgba(217, 35, 35, 0.2);
    }
}

/* Ping Pulse Animation */
#ccup .ping-pulse {
    position: absolute;
    top: 50%;
    left: 0;
    width: 40px;
    height: 3px;
    background: rgb(16, 122, 185);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: pingPulseAnim 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

#horizontal-connector-olt-splitter[data-diagnostic-status="success"] .ping-pulse,
#horizontal-connector-splitter-ont[data-diagnostic-status="success"] .ping-pulse {
    background: rgb(16, 185, 129);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

#horizontal-connector-olt-splitter[data-diagnostic-status="warning"] .ping-pulse,
#horizontal-connector-splitter-ont[data-diagnostic-status="warning"] .ping-pulse {
    background: rgb(245, 158, 11);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

#horizontal-connector-olt-splitter[data-diagnostic-status="critical"] .ping-pulse,
#horizontal-connector-splitter-ont[data-diagnostic-status="critical"] .ping-pulse {
    background: rgb(217, 35, 35) !important;
    box-shadow: 0 0 10px rgba(217, 35, 35, 0.8) !important;
}

#horizontal-connector-olt-splitter[data-diagnostic-status="unknown"] .ping-pulse,
#horizontal-connector-splitter-ont[data-diagnostic-status="unknown"] .ping-pulse {
    background: rgb(107, 114, 128);
    box-shadow: 0 0 10px rgba(107, 114, 128, 0.8);
}

@keyframes pingPulseAnim {

    /* 0%,
    100% {
        left: 0;
        opacity: 1;
    }

    50% {
        left: calc(100% - 8px);
        opacity: 0.6;
    } */

    0% {
        left: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Node Circle */
#ccup .node-circle {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* Splitter Pulse Animation */
#ccup .splitter-pulse {
    animation: splitterPulseAnim 1.8s ease-in-out infinite;
    animation-delay: 3.2s;
}

@keyframes splitterPulseAnim {
    0%, 60%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(139, 92, 246, 0.7);
    }
    
    30% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4), 0 0 0 8px rgba(139, 92, 246, 0);
    }
}

.splitter-node[data-diagnostic-status="critical"] ~ .node-circle.splitter-pulse,
.node-circle.splitter-pulse[data-diagnostic-status="critical"] {
    animation: none !important;
    background: rgba(217, 35, 35, 0.15) !important;
    border-color: rgb(217, 35, 35) !important;
    box-shadow: 0 2px 8px rgba(217, 35, 35, 0.3) !important;
}

#ccup[data-theme="dark"] .splitter-pulse {
    animation: splitterPulseAnimDark 3.5s ease-in-out infinite;
    animation-delay: 3.2s;
}

@keyframes splitterPulseAnimDark {
    0%, 60%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(139, 92, 246, 0.9);
    }
    
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.6), 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

#ccup[data-theme="dark"] .node-circle {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#ccup .node-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#ccup[data-theme="dark"] .node-circle:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#ccup .bg-indigo-600 {
    background-color: rgb(79, 70, 229);
}

#ccup .bg-cyan-600 {
    background-color: rgb(8, 145, 178);
}

#ccup .bg-slate-200 {
    background-color: rgb(226, 232, 240);
}

#ccup[data-theme="dark"] .bg-slate-700 {
    background-color: rgb(51, 65, 85);
}

#ccup .border-slate-400 {
    border-color: rgb(148, 163, 184);
}

/* Position utilities */
#ccup .absolute {
    position: absolute;
}

#ccup .relative {
    position: relative;
}

.-bottom-5 {
    bottom: -1.25rem;
}

.-top-6 {
    top: -1.5rem;
}

/* Width and height utilities */
.w-1\\.5 {
    width: 0.375rem;
}

.h-1\\.5 {
    height: 0.375rem;
}

/* Background utilities */
#ccup .bg-error {
    background-color: #ef4444;
}

/* Padding utilities */
#ccup .px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.py-0\\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

/* Typography utilities */
#ccup .topology-text-xs {
    font-size: 9px;
}

#ccup .topology-text-xxs {
    font-size: 8px;
}

#ccup .topology-text-xxxs {
    font-size: 7px;
}

#ccup .topology-font-black {
    font-weight: 900;
}

#ccup .topology-font-bold {
    font-weight: 700;
}

#ccup .topology-uppercase {
    text-transform: uppercase;
}

#ccup .topology-tracking-wider {
    letter-spacing: 0.05em;
}

/* Layout utilities */
#ccup .topology-flex {
    display: flex;
}

#ccup .topology-flex-col {
    flex-direction: column;
}

#ccup .topology-items-center {
    align-items: center;
}

#ccup .topology-justify-between {
    justify-content: space-between;
}

#ccup .topology-grid {
    display: grid;
}

#ccup .topology-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Gap utilities */
#ccup .topology-gap-05 {
    gap: 0.125rem;
}

#ccup .topology-gap-1 {
    gap: 0.25rem;
}

#ccup .topology-gap-15 {
    gap: 0.375rem;
}

#ccup .topology-gap-2 {
    gap: 0.5rem;
}

.topology-space-y-2>*+* {
    margin-top: 0.5rem;
}

/* Border radius utilities */
#ccup .topology-rounded-sm {
    border-radius: 0.125rem;
}

#ccup .topology-rounded-lg {
    border-radius: 0.5rem;
}

#ccup .topology-rounded-full {
    border-radius: 9999px;
}

#ccup .topology-rounded-t-xl {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

/* Border utilities */
#ccup .topology-border {
    border-width: 1px;
}

#ccup .topology-border-b {
    border-bottom-width: 1px;
}

/* Color utilities */
#ccup .topology-text-blue {
    color: rgb(59, 130, 246);
}

#ccup .topology-text-emerald {
    color: rgb(16, 185, 129);
}

#ccup .topology-text-purple {
    color: rgb(168, 85, 247);
}

#ccup .topology-text-orange {
    color: rgb(249, 115, 22);
}

#ccup .topology-text-slate-400 {
    color: rgb(148, 163, 184);
}

#ccup .topology-text-slate-500 {
    color: rgb(100, 116, 139);
}

#ccup .topology-text-slate-600 {
    color: rgb(71, 85, 105);
}

#ccup[data-theme="dark"] .topology-text-slate-300 {
    color: rgb(203, 213, 225);
}

#ccup .topology-text-white {
    color: white;
}

#ccup .topology-text-error {
    color: rgb(239, 68, 68);
}

#ccup .topology-text-error-70 {
    color: rgba(239, 68, 68, 0.7);
}

/* Background utilities */
#ccup .topology-bg-blue-10 {
    background-color: rgba(59, 130, 246, 0.1);
}

#ccup[data-theme="dark"] .topology-bg-blue-10 {
    background-color: rgba(59, 130, 246, 0.15);
}

#ccup .topology-bg-emerald-10 {
    background-color: rgba(16, 185, 129, 0.1);
}

#ccup[data-theme="dark"] .topology-bg-emerald-10 {
    background-color: rgba(16, 185, 129, 0.15);
}

#ccup .topology-bg-purple-10 {
    background-color: rgba(168, 85, 247, 0.1);
}

#ccup[data-theme="dark"] .topology-bg-purple-10 {
    background-color: rgba(168, 85, 247, 0.15);
}

#ccup .topology-bg-orange-10 {
    background-color: rgba(249, 115, 22, 0.1);
}

#ccup[data-theme="dark"] .topology-bg-orange-10 {
    background-color: rgba(249, 115, 22, 0.15);
}

#ccup .topology-bg-error {
    background-color: rgb(239, 68, 68);
}

#ccup .topology-bg-error-5 {
    background-color: rgba(239, 68, 68, 0.05);
}

#ccup[data-theme="dark"] .topology-bg-error-5 {
    background-color: rgba(239, 68, 68, 0.08);
}

#ccup .topology-bg-error-10 {
    background-color: rgba(239, 68, 68, 0.1);
}

#ccup[data-theme="dark"] .topology-bg-error-10 {
    background-color: rgba(239, 68, 68, 0.15);
}

#ccup .topology-bg-indigo-600 {
    background-color: rgb(79, 70, 229);
}

#ccup .topology-bg-cyan-600 {
    background-color: rgb(8, 145, 178);
}

#ccup .topology-bg-slate-200 {
    background-color: rgb(226, 232, 240);
}

#ccup[data-theme="dark"] .topology-bg-slate-700 {
    background-color: rgb(51, 65, 85);
}

/* Border color utilities */
#ccup .topology-border-slate-100 {
    border-color: rgb(241, 245, 249);
}

#ccup[data-theme="dark"] .topology-border-slate-100 {
    border-color: rgba(71, 85, 105, 0.4);
}

#ccup[data-theme="dark"] .topology-border-slate-800 {
    border-color: rgb(30, 41, 59);
}

#ccup .topology-border-slate-400 {
    border-color: rgb(148, 163, 184);
}

#ccup .topology-border-error-10 {
    border-color: rgba(239, 68, 68, 0.1);
}

#ccup[data-theme="dark"] .topology-border-error-10 {
    border-color: rgba(239, 68, 68, 0.2);
}

#ccup .topology-border-error-20 {
    border-color: rgba(239, 68, 68, 0.2);
}

#ccup[data-theme="dark"] .topology-border-error-20 {
    border-color: rgba(239, 68, 68, 0.3);
}

/* Ring utilities */
#ccup .topology-ring-1 {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5);
}

/* Padding utilities */
#ccup .topology-p-15 {
    padding: 0.375rem;
}

#ccup .topology-p-2 {
    padding: 0.5rem;
}

#ccup .topology-px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

#ccup .topology-py-05 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

/* Width/Height utilities */
#ccup .topology-w-15 {
    width: 0.375rem;
}

#ccup .topology-h-15 {
    height: 0.375rem;
}

/* Animation utilities */
#ccup .animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

#ccup .animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Scrollbar styling for topology container */
#ccup .topology-flow-container::-webkit-scrollbar {
    height: 8px;
}

#ccup .topology-flow-container::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 4px;
}

#ccup .topology-flow-container::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

/* Node Result Tooltip Styles */
#ccup .node-result-icon {
    position: relative;
    cursor: pointer;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

#ccup .node-result-icon:hover {
    transform: scale(1.1);
}

#ccup .node-result-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.5;
    white-space: normal;
    min-width: 280px;
    max-width: 400px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

#ccup .node-result-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 12px;
    border: 6px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.95);
}

#ccup .node-result-icon:hover .node-result-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#ccup .node-result-tooltip .result-title {
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.8;
}

#ccup .node-result-tooltip .result-content {
    font-weight: 500;
}

#ccup .topology-flow-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Responsive design */
@media (max-width: 768px) {
    #ccup .topology-flow-container {
        gap: 1rem;
        padding: 1.5rem 0.5rem;
    }

    #ccup .w-44 {
        width: 9rem;
    }

    #ccup .w-48 {
        width: 10rem;
    }

    #ccup .node-circle {
        width: 40px;
        height: 40px;
    }

    #ccup .horizontal-connector {
        width: 32px;
    }
}

.topology-node.ont-node:has(#ontStatus.offline) .ont-svg .gradient-start {
    stop-color: #ef4444;
}

.topology-node.ont-node:has(#ontStatus.offline) .ont-svg .gradient-end {
    stop-color: #b91c1c;
}

.topology-node.ont-node:has(#ontStatus.offline) .ont-svg .ont-body,
.topology-node.ont-node:has(#ontStatus.offline) .ont-svg .status-led,
.topology-node.ont-node:has(#ontStatus.offline) .ont-svg .wifi-wave,
.topology-node.ont-node:has(#ontStatus.offline) .ont-svg .wifi-center {
    stroke: #ef4444;
    fill: #ef4444;
}

/* Diagnostic Conclusion Card */
#ccup .diagnostic-conclusion-card {
    background: var(--bg-card);
    border-radius: 4px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

#ccup .diagnostic-conclusion-card .diag-status-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
    margin-bottom: 0.4rem;
}

#ccup .diagnostic-conclusion-card .diag-status-header.success {
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

#ccup .diagnostic-conclusion-card .diag-status-header.warning {
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

#ccup .diagnostic-conclusion-card .diag-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: iconPulseSmall 1.5s ease-in-out infinite;
}

#ccup .diagnostic-conclusion-card .diag-status-header.success .diag-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    animation: none;
}

#ccup .diagnostic-conclusion-card .diag-status-header.warning .diag-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    animation: iconPulseSmall 1.5s ease-in-out infinite;
}

#ccup .diagnostic-conclusion-card .diag-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

#ccup .diagnostic-conclusion-card .diag-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ccup .diagnostic-conclusion-card .diag-time {
    font-size: 0.55rem;
    color: var(--text-secondary);
}

#ccup .diagnostic-conclusion-card .diag-conclusion {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
}

#ccup .diagnostic-conclusion-card .diag-status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

#ccup .diagnostic-conclusion-card .diag-status-icon.critical {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: statusPulse 1s ease-in-out infinite;
}

#ccup .diagnostic-conclusion-card .diag-status-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

#ccup .diagnostic-conclusion-card .diag-status-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

#ccup .diagnostic-conclusion-card .diag-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#ccup .diagnostic-conclusion-card .diag-issue {
    font-size: 0.7rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.3;
}

#ccup .diagnostic-conclusion-card:has(.diag-status-header.success) .diag-issue {
    color: #059669;
}

#ccup .diagnostic-conclusion-card:has(.diag-status-header.warning) .diag-issue {
    color: #d97706;
}

#ccup .diagnostic-conclusion-card .diag-action {
    font-size: 0.6rem;
    color: var(--text-secondary);
    background: rgba(251, 191, 36, 0.1);
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    border-left: 2px solid #f59e0b;
    line-height: 1.4;
}

#ccup .diagnostic-conclusion-card:has(.diag-status-header.success) .diag-action {
    background: rgba(16, 185, 129, 0.1);
    border-left: 2px solid #10b981;
}

#ccup .diagnostic-conclusion-card:has(.diag-status-header.success) .diag-action i {
    color: #10b981;
}

#ccup .diagnostic-conclusion-card:has(.diag-status-header.warning) .diag-action {
    background: rgba(245, 158, 11, 0.1);
    border-left: 2px solid #f59e0b;
}

#ccup .diagnostic-conclusion-card:has(.diag-status-header.warning) .diag-action i {
    color: #f59e0b;
}

#ccup .diagnostic-conclusion-card .diag-action i {
    color: #f59e0b;
    margin-right: 0.25rem;
}

/* Keyframe Animations */
@keyframes ledPulse {

    0%,
    100% {
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        opacity: 0.4;
        filter: brightness(1.5);
    }
}

@keyframes portActivity {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

@keyframes wifiSignalPulse {

    0%,
    100% {
        opacity: 0.2;
        stroke-width: 2;
    }

    50% {
        opacity: 0.9;
        stroke-width: 2.5;
    }
}

@keyframes ledFlicker {

    0%,
    100% {
        opacity: 1;
        filter: brightness(1);
    }

    25% {
        opacity: 0.6;
        filter: brightness(1.2);
    }

    50% {
        opacity: 0.3;
        filter: brightness(1.4);
    }

    75% {
        opacity: 0.7;
        filter: brightness(1.1);
    }
}

/* Staggered Animation Delays - OLT Status Lights */
#ccup .router-svg .status-light.light-1 {
    animation-delay: 0s;
}

#ccup .router-svg .status-light.light-2 {
    animation-delay: 0.15s;
}

#ccup .router-svg .status-light.light-3 {
    animation-delay: 0.3s;
}

#ccup .router-svg .status-light.light-4 {
    animation-delay: 0.45s;
}

/* Staggered Animation Delays - OLT Port Lights */
#ccup .router-svg .port-light.port-1 {
    animation-delay: 0s;
}

#ccup .router-svg .port-light.port-2 {
    animation-delay: 0.2s;
}

#ccup .router-svg .port-light.port-3 {
    animation-delay: 0.4s;
}

#ccup .router-svg .port-light.port-4 {
    animation-delay: 0.6s;
}

/* Staggered Animation Delays - ONT Status LEDs */
#ccup .ont-svg .status-led.led-1 {
    animation-delay: 0s;
}

#ccup .ont-svg .status-led.led-2 {
    animation-delay: 0.2s;
}

#ccup .ont-svg .status-led.led-3 {
    animation-delay: 0.4s;
}

/* Staggered Animation Delays - ONT WiFi Waves */
#ccup .ont-svg .wifi-wave.wave-1 {
    animation-delay: 0s;
}

#ccup .ont-svg .wifi-wave.wave-2 {
    animation-delay: 0.4s;
}

#ccup .ont-svg .wifi-wave.wave-3 {
    animation-delay: 0.8s;
}

#ccup .ont-svg .wifi-wave.wave-3 {
    animation-delay: 0.6s;
}

#ccup .ont-svg .wifi-wave.wave-4 {
    animation-delay: 0.9s;
}

#ccup .node-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

#ccup .node-info {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 500;
}

#ccup .node-status {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.node-status.online {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.node-status.reachable {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.node-status.offline {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

#ccup .topology-connection {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#ccup .connection-line {
    width: 100%;
    height: 2px;
    background: #10b981;
    position: relative;
}

.connection-line[data-diagnostic-status="success"] {
    background: #10b981;
}

.connection-line[data-diagnostic-status="warning"] {
    background: #f59e0b;
}

.connection-line[data-diagnostic-status="critical"] {
    background: #ef4444;
}

.connection-line[data-diagnostic-status="critical"]::before {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 25%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #ef4444;
    font-size: 14px;
    background: var(--bg-secondary);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #ef4444;
    z-index: 3;
    animation: criticalPulse 1.5s ease-in-out infinite;
}

.connection-line[data-diagnostic-status="unknown"] {
    background: #6b7280;
}

#ccup .splitter-node {
    position: absolute;
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border: 1.5px solid #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #10b981;
    z-index: 2;
}

#ccup .splitter-label {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Active Alarms */
#ccup .active-alarms {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

#ccup .alarm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

#ccup .alarm-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

#ccup .alarm-title i {
    color: #ef4444;
    font-size: 0.95rem;
}

#ccup .alarm-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

#ccup .alarm-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#ccup .alarm-item {
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.alarm-item.high {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

#ccup .alarm-content {
    flex: 1;
}

#ccup .alarm-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}

#ccup .alarm-details {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

#ccup .alarm-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

#ccup .alarm-action-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

#ccup .alarm-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

#ccup .alarm-time {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-align: right;
    margin-top: 0.2rem;
}

/* Link Quality Analysis */
#ccup .link-quality-analysis {
    background: var(--bg-card);
    border-radius: 4px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

#ccup .quality-header {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-color);
}

#ccup .quality-header i {
    color: var(--primary);
    font-size: 0.8rem;
}

.quality-header h3 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

#ccup .quality-time {
    font-size: 0.6rem;
    color: var(--text-tertiary);
}

#ccup .quality-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

#ccup .quality-metric label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

#ccup .quality-bar-container {
    width: 100%;
}

#ccup .quality-bar {
    width: 100%;
    height: 4px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

#ccup .quality-progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 8px;
    transition: width 1s ease-in-out;
}

.quality-progress.optimal {
    background: linear-gradient(90deg, #10b981, #059669);
}

.quality-progress.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.quality-progress.critical {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

#ccup .quality-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
}

#ccup #qualityValue {
    color: var(--text-primary);
    font-weight: 600;
}

#ccup #qualityTarget {
    color: var(--text-secondary);
}

#ccup .quality-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

#ccup .quality-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

#ccup .stat-label {
    font-size: 0.55rem;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0.3px;
}

#ccup .stat-value {
    font-size: 0.7rem;
    color: var(--text-primary);
    font-weight: 600;
}

#ccup .stat-unit {
    font-size: 0.6rem;
    color: #10b981;
    font-weight: 500;
}

/* Service Provisioning */
#ccup .service-provisioning {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

#ccup .provisioning-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

#ccup .provisioning-header i {
    color: var(--primary);
    font-size: 0.95rem;
}

.provisioning-header h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

#ccup .provisioning-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

#ccup .provision-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 5px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

#ccup .provision-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.provision-icon.internet {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.provision-icon.voip {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.provision-icon.iptv {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

#ccup .provision-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

#ccup .provision-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.provision-status.up {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.provision-status.off {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ONT Diagnostics */
#ccup .ont-diagnostics {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

#ccup .diagnostics-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.diagnostics-header h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
}

#ccup .diagnostics-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

#ccup .diagnostic-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-speed);
    color: var(--text-primary);
}

#ccup .diagnostic-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

#ccup .diagnostic-btn i {
    font-size: 1.1rem;
}

#ccup .diagnostic-btn span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.diagnostic-btn.reboot i {
    color: #3b82f6;
}

.diagnostic-btn.wifi i {
    color: #10b981;
}

.diagnostic-btn.test i {
    color: #f59e0b;
}

.diagnostic-btn.history i {
    color: #8b5cf6;
}

#ccup .diagnostic-btn:hover i {
    color: white;
}

/* Primary Contact */
#ccup .primary-contact {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 4px;
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
}

#ccup .contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#ccup .contact-avatar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#ccup .contact-avatar i {
    font-size: 1.5rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem;
    border-radius: 50%;
}

#ccup .contact-info {
    flex: 1;
}

#ccup .contact-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.1rem;
    font-weight: 500;
}

#ccup .contact-name {
    font-size: 0.8rem;
    color: white;
    font-weight: 700;
}

#ccup .contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#ccup .contact-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ccup .detail-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

#ccup .detail-value {
    font-size: 0.65rem;
    color: white;
    font-weight: 600;
}

.detail-value.paid {
    background: rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    color: #10b981;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ==================== DIAGNOSTIC ANALYSIS PANEL ==================== */
#ccup .diagnostic-analysis-panel {
    background: var(--card-bg);
    border-radius: 4px;
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
}

#ccup .diagnostic-analysis-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.1);
}

#ccup .diagnostic-time {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

#ccup .diagnostic-overview {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

#ccup .overview-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

#ccup .overview-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

#ccup .overview-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ccup .overview-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.overview-value.conclusion {
    color: #ef4444;
}

#ccup .overview-suggestion {
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 0.75rem;
    border-radius: 6px;
}

#ccup .suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

#ccup .suggestion-text {
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Diagnostic Items */
#ccup .diagnostic-items-container {
    margin-top: 0.5rem;
}

#ccup .items-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

#ccup .diagnostic-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 1rem;
}

#ccup .diagnostic-item-card {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

#ccup .diagnostic-item-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px) scale(1.02);
}

.diagnostic-item-card.status-success {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
    animation: successPulse 2s ease-in-out infinite;
}

.diagnostic-item-card.status-warning {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
    animation: warningPulse 1.5s ease-in-out infinite;
}

.diagnostic-item-card.status-critical {
    border: 2px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
    animation: criticalPulse 1s ease-in-out infinite;
}

.diagnostic-item-card.status-unknown {
    border: 2px solid #6b7280;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.05), rgba(107, 114, 128, 0.02));
}

#ccup .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.05);
    border-bottom: 1px solid var(--border-color);
}

#ccup .item-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

#ccup .item-title i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1rem;
}

#ccup .status-success .item-title i {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    animation: iconBounce 2s ease-in-out infinite;
}

#ccup .status-warning .item-title i {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    animation: iconShake 2s ease-in-out infinite;
}

#ccup .status-critical .item-title i {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: iconPulseError 1s ease-in-out infinite;
}

#ccup .status-unknown .item-title i {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

#ccup .item-status-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0rem 0.25rem;
    border-radius: 14px;
    letter-spacing: 0.8px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.item-status-badge.success {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: badgeGlow 2s ease-in-out infinite;
}

.item-status-badge.success::before {
    content: '✓ ';
}

.item-status-badge.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation: badgeFlash 1.5s ease-in-out infinite;
}

.item-status-badge.warning::before {
    content: '⚠ ';
}

.item-status-badge.critical {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: badgePulse 1s ease-in-out infinite;
}

.item-status-badge.critical::before {
    content: '✖ ';
}

.item-status-badge.unknown {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.item-status-badge.unknown::before {
    content: '? ';
}

#ccup .item-body {
    padding: 0.75rem;
}

#ccup .item-object {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    border: 1px solid var(--border-color);
}

#ccup .item-result {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.5;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.item-result.success {
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #10b981;
}

.item-result.warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
}

.item-result.error {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    animation: resultPulse 2s ease-in-out infinite;
}

#ccup .item-suggestion {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(59, 130, 246, 0.08);
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    border-left: 2px solid #3b82f6;
}

#ccup .item-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Metrics Grid for All Indicators */
#ccup .item-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

#ccup .metric-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

#ccup .metric-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

/* Metric Status Indicators */
.metric-item.metric-pass {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

#ccup .metric-item.metric-pass .metric-label::before {
    color: #10b981;
}

.metric-item.metric-fail {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

#ccup .metric-item.metric-fail .metric-label::before {
    color: #ef4444;
    animation: failPulse 1.5s ease-in-out infinite;
}

#ccup .metric-item.metric-fail .metric-value {
    color: #ef4444;
    font-weight: 700;
}

#ccup .metric-label {
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

#ccup .metric-label::before {
    content: '●';
    color: #3b82f6;
    font-size: 0.6rem;
}

#ccup .metric-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    flex: 1 1 auto;
}

.metric-value.error {
    color: #ef4444;
    font-weight: 700;
    animation: valueFlash 1.5s ease-in-out infinite;
}

/* Execution Time Display */
#ccup .item-execution-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

#ccup .item-execution-time i {
    color: #3b82f6;
}

/* Fail Pulse Animation */
@keyframes failPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* ==================== END DIAGNOSTIC ANALYSIS ==================== */

/* ==================== SIMPLIFIED DIAGNOSTIC ANALYSIS ==================== */
#ccup .simplified-diagnostic {
    margin-top: 1.5rem;
}

#ccup .simplified-diagnostic .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

#ccup .diagnostic-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-style: italic;
}

#ccup .simplified-grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

#ccup .simplified-diagnostic .item-suggestion {
    margin-bottom: 0;
}

.item-suggestion.success {
    background: rgba(16, 185, 129, 0.08);
    border-left: 2px solid #10b981;
    color: #10b981;
}

#ccup .item-suggestion i {
    margin-right: 0.35rem;
}

/* ==================== END SIMPLIFIED DIAGNOSTIC ANALYSIS ==================== */

#ccup .ftth-overview {
    margin-bottom: 0.75rem;
}

#ccup .overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

#ccup .overview-card {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

#ccup .overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

#ccup .overview-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.overview-icon.active {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.overview-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.overview-icon.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.overview-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

#ccup .overview-content p {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* Fiber Analysis */
#ccup .fiber-analysis-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .fiber-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

#ccup .analysis-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all var(--transition-speed);
}

#ccup .analysis-card:hover {
    border-color: var(--secondary-color);
}

.analysis-card.active {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(34, 197, 94, 0.1));
}

#ccup .analysis-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.analysis-icon.power {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.analysis-icon.ont {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.analysis-icon.quality {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.analysis-content h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

#ccup .analysis-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

#ccup .analysis-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Fiber Optimization */
#ccup .fiber-optimization-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .optimization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

#ccup .optimization-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    border: 1px solid var(--border-color);
}

#ccup .optimization-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

#ccup .optimization-content {
    flex: 1;
}

.optimization-content h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

#ccup .optimization-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

#ccup .optimization-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* FTTH Services */
#ccup .ftth-services-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

#ccup .service-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

#ccup .service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

#ccup .service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.service-icon.internet {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.service-icon.voip {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.service-icon.iptv {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.service-icon.wifi {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.service-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#ccup .service-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#ccup .service-metrics span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#ccup .service-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Footer */
#ccup .footer {
    background: var(--bg-secondary);
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

#ccup .footer-content {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

#ccup .footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

#ccup .footer-links {
    display: flex;
    gap: 1.5rem;
}

#ccup .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    #ccup .container {
        padding: 1rem;
    }

    #ccup .form-row {
        grid-template-columns: 1fr;
    }

    #ccup .form-row-inline {
        flex-wrap: wrap;
    }

    #ccup .form-row-inline .form-group {
        min-width: 200px;
    }

    .info-grid,
    .diagnosis-grid,
    .quality-grid,
    .app-grid,
    #ccup .overview-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    #ccup .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .logo-text h1 {
        font-size: 1.4rem;
    }

    .info-grid,
    .diagnosis-grid,
    .quality-grid,
    .overview-grid,
    #ccup .services-grid {
        grid-template-columns: 1fr;
    }

    #ccup .info-grid-compact {
        grid-template-columns: 1fr;
    }

    #ccup .table-container {
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#ccup .category-dashboard {
    animation: fadeIn 0.5s ease;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Two Column Layout */
#ccup .two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

#ccup .two-column-layout .diagnosis-panel,
#ccup .two-column-layout .app-quality-panel {
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    #ccup .two-column-layout {
        grid-template-columns: 1fr;
    }

    #ccup .info-two-column {
        grid-template-columns: 1fr;
    }

    #ccup .info-column-wrapper {
        flex-direction: column;
    }

    #ccup .info-header-vertical {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-width: auto;
        padding: 0.8rem 1rem;
    }

    #ccup .info-header-icon-large {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    #ccup .info-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Left and Right Column Layout */
.left-column,
#ccup .right-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#ccup .left-column .diagnosis-panel,
#ccup .left-column .quality-panel,
#ccup .right-column .demarcation-panel,
#ccup .right-column .app-quality-panel {
    margin-bottom: 0;
}


/* History Panel */
#ccup .history-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .history-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#ccup .history-metric-select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.8rem;
}

#ccup .time-range-buttons {
    display: flex;
    gap: 0.5rem;
}

#ccup .time-btn {
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

#ccup .time-btn:hover {
    background: var(--bg-tertiary);
}

.time-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

#ccup .chart-container {
    margin-top: 1rem;
    height: 300px;
    position: relative;
}

/* Quality Analysis Panel */
#ccup .quality-analysis-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#ccup .quality-analysis-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.analysis-left,
#ccup .analysis-right {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
}

.analysis-tabs,
#ccup .detail-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn,
#ccup .detail-tab-btn {
    padding: 0.4rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

#ccup .tab-btn:hover,
#ccup .detail-tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active,
.detail-tab-btn.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

#ccup .tab-content {
    display: none;
    padding: 0.75rem;
}

.tab-content.active {
    display: block;
}

#ccup .compact-table {
    font-size: 0.75rem;
}

.compact-table th,
#ccup .compact-table td {
    padding: 0.4rem 0.5rem;
}

#ccup .no-data {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

/* Suggestion Box */
#ccup .suggestion-box {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.suggestion-box h3 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#ccup .suggestion-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#ccup .suggestion-field {
    display: flex;
    gap: 0.5rem;
}

#ccup .suggestion-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 130px;
    font-weight: 500;
}

#ccup .suggestion-field span {
    font-size: 0.75rem;
    color: var(--text-primary);
}

/* Pagination */
#ccup .pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

#ccup .rows-per-page {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.75rem;
}

#ccup .total-records {
    font-size: 0.75rem;
    color: var(--text-muted);
}

#ccup .pagination-controls {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    margin-left: auto;
}

.page-btn,
.page-num,
#ccup .go-btn {
    padding: 0.3rem 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

#ccup .page-btn:hover,
#ccup .page-num:hover,
#ccup .go-btn:hover {
    background: var(--bg-tertiary);
}

.page-num.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

#ccup .page-jump {
    width: 50px;
    padding: 0.3rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.75rem;
    text-align: center;
}

@media (max-width: 1200px) {
    #ccup .quality-analysis-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Light Theme - Colorful Icons */
#ccup[data-theme="light"] .info-header-icon-large.subscriber,
#ccup[data-theme="light"] .info-header-icon.subscriber {
    color: #3b82f6;
}

#ccup[data-theme="light"] .info-header-icon-large.device,
#ccup[data-theme="light"] .info-header-icon.device {
    color: #ec4899;
}

#ccup[data-theme="light"] .info-grid-icon i {
    color: #5c74f6;
}

#ccup[data-theme="light"] .diagnosis-card.tcp .diagnosis-header h3,
#ccup[data-theme="light"] .diagnosis-card.tcp .diagnosis-header i {
    color: #3b82f6;
}

#ccup[data-theme="light"] .diagnosis-card.no-issue .diagnosis-header h3,
#ccup[data-theme="light"] .diagnosis-card.no-issue .diagnosis-header i {
    color: #22c55e;
}

#ccup[data-theme="light"] .diagnosis-card.throttling .diagnosis-header h3,
#ccup[data-theme="light"] .diagnosis-card.throttling .diagnosis-header i {
    color: #f59e0b;
}

#ccup[data-theme="light"] .diagnosis-card.terminal .diagnosis-header h3,
#ccup[data-theme="light"] .diagnosis-card.terminal .diagnosis-header i {
    color: #ef4444;
}

#ccup[data-theme="light"] .demarcation-icon {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

#ccup[data-theme="light"] .demarcation-card.root-cause .demarcation-icon {
    background: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%);
}

#ccup[data-theme="light"] .demarcation-card.suggestion .demarcation-icon {
    background: linear-gradient(135deg, #86efac 0%, #22c55e 100%);
}

#ccup[data-theme="light"] .demarcation-card.remarks .demarcation-icon {
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 100%);
}

#ccup[data-theme="light"] .panel-header i {
    color: #4272e5;
}

#ccup[data-theme="light"] .form-group label i {
    color: #3b82f6;
}

#ccup[data-theme="light"] .quality-card h3 i {
    color: #06b6d4;
}

#ccup[data-theme="light"] .overview-icon {
    color: #4272e5;
}

#ccup[data-theme="light"] .overview-icon.active {
    color: #22c55e;
}

#ccup[data-theme="light"] .overview-icon.warning {
    color: #f59e0b;
}

#ccup[data-theme="light"] .overview-icon.error {
    color: #ef4444;
}

#ccup[data-theme="light"] .analysis-icon {
    color: #06b6d4;
}

#ccup[data-theme="light"] .analysis-icon.power {
    color: #eab308;
}

#ccup[data-theme="light"] .analysis-icon.ont {
    color: #22c55e;
}

#ccup[data-theme="light"] .analysis-icon.quality {
    color: #3b82f6;
}

#ccup[data-theme="light"] .optimization-icon i {
    color: #8b5cf6;
}

#ccup[data-theme="light"] .service-icon.internet {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

#ccup[data-theme="light"] .service-icon.voip {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

#ccup[data-theme="light"] .service-icon.iptv {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

#ccup[data-theme="light"] .service-icon.wifi {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

#ccup[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #004896, #005ebe)
}

#ccup[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #3a64ed, #2860d9);
}

#ccup[data-theme="light"] .time-btn.active {
    background: linear-gradient(135deg, #004896, #005ebe)
}

#ccup[data-theme="light"] .status-badge.success {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
}

#ccup[data-theme="light"] .status-badge.warning {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

#ccup[data-theme="light"] .status-badge.error {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
}

/* Application Quality - Horizontal Scroll Layout */
#ccup .app-quality-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
}

#ccup .app-scroll-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

#ccup .app-scroll-container::-webkit-scrollbar {
    height: 6px;
}

#ccup .app-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

#ccup .app-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

#ccup .app-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

#ccup .app-grid-horizontal {
    display: flex;
    gap: 0.6rem;
    padding: 0.25rem;
}

#ccup .app-grid-horizontal .app-card {
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 200px;
}

#ccup .app-nav-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

#ccup .app-nav-arrow:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

#ccup .app-nav-arrow:active {
    transform: scale(0.95);
}

.app-nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

#ccup .app-nav-arrow i {
    font-size: 0.9rem;
}

/* Compact App Card for Horizontal Layout */
#ccup .app-grid-horizontal .app-card {
    padding: 0.6rem;
}

#ccup .app-grid-horizontal .app-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

#ccup .app-grid-horizontal .app-name {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

#ccup .app-grid-horizontal .metric-item {
    padding: 0.3rem 0;
}

#ccup .app-grid-horizontal .metric-label {
    font-size: 0.65rem;
}

#ccup .app-grid-horizontal .metric-progress-bar {
    height: 5px;
}

#ccup .app-grid-horizontal .metric-value {
    font-size: 0.7rem;
}

@media (max-width: 768px) {
    #ccup .app-quality-wrapper {
        padding: 0.5rem;
    }

    #ccup .app-nav-arrow {
        width: 28px;
        height: 28px;
    }

    #ccup .app-grid-horizontal .app-card {
        min-width: 160px;
        max-width: 180px;
    }
}

/* Application Icons - Real Life Brand Colors */
.app-icon-wrapper[data-app="whatsapp"] {
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
}

.app-icon-wrapper[data-app="instagram"] {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(240, 148, 51, 0.4) !important;
}

.app-icon-wrapper[data-app="facebook"] {
    background: linear-gradient(135deg, #4267B2, #3b5998) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 103, 178, 0.4) !important;
}

.app-icon-wrapper[data-app="youtube"] {
    background: linear-gradient(135deg, #FF0000, #CC0000) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4) !important;
}

.app-icon-wrapper[data-app="twitter"] {
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4) !important;
}

.app-icon-wrapper[data-app="tiktok"] {
    background: linear-gradient(135deg, #000000, #EE1D52) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(238, 29, 82, 0.4) !important;
}

.app-icon-wrapper[data-app="quicietf"],
.app-icon-wrapper[data-app="quic"] {
    background: linear-gradient(135deg, #0066CC, #004C99) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4) !important;
}

.app-icon-wrapper[data-app="snapchat"] {
    background: linear-gradient(135deg, #FFFC00, #FFEC00) !important;
    color: #000000;
    box-shadow: 0 4px 12px rgba(255, 252, 0, 0.4) !important;
}

.app-icon-wrapper[data-app="telegram"] {
    background: linear-gradient(135deg, #0088cc, #006699) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4) !important;
}

.app-icon-wrapper[data-app="netflix"] {
    background: linear-gradient(135deg, #E50914, #B20710) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4) !important;
}

.app-icon-wrapper[data-app="spotify"] {
    background: linear-gradient(135deg, #1DB954, #1ed760) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.4) !important;
}

.app-icon-wrapper[data-app="linkedin"] {
    background: linear-gradient(135deg, #0077B5, #005582) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4) !important;
}

/* Light Theme - Enhanced shadows for brand colors */
#ccup[data-theme="light"] .app-icon-wrapper[data-app] {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

/* ====================================
   Intelligence Cards Styles
   ==================================== */

#ccup .intelligence-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#ccup .intelligence-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.7rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

#ccup .intelligence-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#ccup .card-header-intel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

#ccup .card-icon-intel {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.card-icon-intel.combined-icon {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.card-icon-intel.diagnostic-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.card-header-intel h2 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Combined Usage & Revenue Card - Redesigned */
#ccup .usage-revenue-combined {
    grid-column: span 1;
}

.usage-revenue-combined>.card-header-intel {
    margin-bottom: 0.7rem;
}

#ccup .intel-sections-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Combined Usage and Revenue Section */
#ccup .intel-section-combined {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.8rem;
    align-items: start;
}

#ccup .usage-section-side {
    display: flex;
    flex-direction: column;
}

#ccup .revenue-section-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#ccup .intel-section-redesign {
    margin-bottom: 0;
}

#ccup .usage-section-redesign {
    padding-right: 0;
    padding-bottom: 0.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
}

#ccup .revenue-section-redesign {
    padding-left: 0;
    padding-top: 0.5rem;
}

/* Revenue Doughnut Chart Styles */
#ccup .revenue-chart-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0.8rem auto;
}

#ccup .revenue-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

#ccup .chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

#ccup .chart-period {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

#ccup .chart-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

#ccup .revenue-legend-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

#ccup .legend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ccup .legend-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#ccup .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

#ccup .base-plan-dot {
    background: #3b82f6;
}

#ccup .addons-dot {
    background: #10b981;
}

#ccup .roaming-dot {
    background: #f59e0b;
}

#ccup .legend-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

#ccup .legend-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Legacy styles - keeping for backwards compatibility */
#ccup .revenue-pie-container {
    width: 160px;
    height: 160px;
    margin: 1rem 0;
}

#ccup .revenue-pie-container canvas {
    width: 100% !important;
    height: 100% !important;
}

#ccup .revenue-total-display {
    text-align: center;
    margin-top: 1rem;
}

#ccup .total-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

#ccup .total-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

#ccup .total-growth {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.total-growth[data-positive="true"] {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.total-growth[data-positive="false"] {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

#ccup .section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

#ccup .section-title::before {
    content: '';
    width: 2px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Usage Section Redesign */
#ccup .usage-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Usage Cylinders Grid */
#ccup .usage-cylinders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-top: 0.5rem;
}

#ccup .usage-cylinder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#ccup .usage-cylinder-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

#ccup .cylinder-header {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

#ccup .cylinder-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#ccup .cylinder-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

#ccup .cylinder-svg {
    width: 100%;
    max-width: 60px;
    height: auto;
    margin: 0.3rem 0;
}

/* Animate cylinder fill elements */
.cylinder-svg g[id$="UsageFill"] rect,
.cylinder-svg g[id$="UsageFill"] ellipse {
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cylinder-svg g[id$="UsageFill"] {
    animation: fillPulse 3s ease-in-out infinite;
}

@keyframes fillPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* Shimmer effect on fill */
.cylinder-svg g[id$="UsageFill"]::after {
    content: '';
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 0;
    }
}

#ccup .cylinder-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.3rem;
}

#ccup .cylinder-progress {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* Old card styles - keeping for backwards compatibility */
#ccup .usage-mini-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#ccup .usage-mini-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
}

.usage-mini-card.data-card::before {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.usage-mini-card.voice-card::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.usage-mini-card.sms-card::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

#ccup .usage-mini-card:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#ccup .card-icon-mini {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

#ccup .data-card .card-icon-mini {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

#ccup .voice-card .card-icon-mini {
    background: linear-gradient(135deg, #10b981, #059669);
}

#ccup .sms-card .card-icon-mini {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

#ccup .card-content-mini {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#ccup .metric-value-mini {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 60px;
}

#ccup .metric-label-mini {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.4px;
    min-width: 35px;
}

#ccup .progress-mini {
    flex: 1;
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

#ccup .progress-fill-mini {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.progress-fill-mini.data-fill {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.progress-fill-mini.voice-fill {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-fill-mini.sms-fill {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

#ccup .metric-progress-text {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 75px;
    text-align: right;
}

/* Revenue Section Redesign - Doughnut Chart */
#ccup .revenue-chart-container {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

#ccup .chart-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

#ccup .chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

#ccup .chart-center-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

#ccup .center-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

#ccup .center-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0.1rem 0;
}

#ccup .center-growth {
    font-size: 0.6rem;
    font-weight: 700;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

#ccup .center-growth::before {
    content: '↑';
    font-size: 0.7rem;
}

#ccup .revenue-legend {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: center;
}

#ccup .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

#ccup .legend-item:hover {
    transform: translateX(2px);
    border-color: var(--accent-color);
}

#ccup .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

#ccup .legend-item.base-plan .legend-dot {
    background: #10b981;
}

#ccup .legend-item.add-ons .legend-dot {
    background: #f59e0b;
}

#ccup .legend-item.roaming .legend-dot {
    background: #ec4899;
}

#ccup .legend-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    flex: 1;
}

#ccup .legend-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Customer Insights */
#ccup .customer-insights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

#ccup .insight-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

#ccup .insight-item:hover {
    border-color: var(--accent-color);
}

#ccup .insight-item i {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.insight-item.lifetime i {
    color: #fbbf24;
}

.insight-item.churn i {
    color: #3b82f6;
}

#ccup .insight-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#ccup .insight-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

#ccup .insight-badge {
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #10b981;
    color: white;
    display: inline-block;
    align-self: flex-start;
}

/* Upsell Recommendation Banner - Compact Design */
#ccup .upsell-recommendation {
    margin-top: 0.8rem;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.12) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left: 3px solid #fbbf24;
    border-radius: 6px;
    padding: 0.5rem 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #d97706;
    line-height: 1.3;
}

#ccup[data-theme="dark"] .upsell-recommendation {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left-color: rgba(251, 191, 36, 0.6);
    color: #fbbf24;
}

#ccup .upsell-recommendation i {
    font-size: 0.9rem;
    color: #fbbf24;
    flex-shrink: 0;
}

#ccup .upsell-recommendation p {
    margin: 0;
    flex: 1;
}

/* Legacy Upsell Banner Redesign */
#ccup .upsell-banner {
    margin-top: 0.8rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#ccup[data-theme="dark"] .upsell-banner {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
    border-color: rgba(251, 191, 36, 0.4);
}

#ccup .upsell-icon {
    width: 32px;
    height: 32px;
    background: #fbbf24;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#ccup .upsell-icon i {
    font-size: 1rem;
    color: white;
}

#ccup .upsell-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    margin: 0;
    line-height: 1.4;
}

#ccup[data-theme="dark"] .upsell-text {
    color: #fde68a;
}

/* Network Diagnostic Checkpoints Card - Iconic Design */
#ccup .checkpoints-iconic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

#ccup .checkpoint-iconic {
    position: relative;
    background: var(--bg-secondary);
    /* border: 2px solid var(--border-color); */
    border-radius: 12px;
    padding: 1.2rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    transition: all 0.3s ease;
}

#ccup .checkpoint-iconic:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Status-based border colors */
.checkpoint-iconic[data-status="healthy"] {
    border-color: #10b981;
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(16, 185, 129, 0.03) 100%);
}

.checkpoint-iconic[data-status="warning"] {
    border-color: #f59e0b;
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(245, 158, 11, 0.03) 100%);
}

.checkpoint-iconic[data-status="error"] {
    border-color: #ef4444;
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(239, 68, 68, 0.03) 100%);
}

/* Large iconic checkpoint icon */
#ccup .checkpoint-icon-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.checkpoint-icon-large.profile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.checkpoint-icon-large.usage {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.checkpoint-icon-large.roaming {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Checkpoint label */
#ccup .checkpoint-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Status icon indicator */
#ccup .checkpoint-status-icon {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 1.1rem;
}

.checkpoint-iconic[data-status="healthy"] .checkpoint-status-icon {
    color: #10b981;
}

.checkpoint-iconic[data-status="warning"] .checkpoint-status-icon {
    color: #f59e0b;
}

.checkpoint-iconic[data-status="error"] .checkpoint-status-icon {
    color: #ef4444;
}

/* Metrics in checkpoint */
#ccup .checkpoint-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

#ccup .metric-mini {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

#ccup .metric-mini i {
    color: var(--text-muted);
    font-size: 0.65rem;
    width: 12px;
}

#ccup .metric-mini span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.68rem;
}

/* Universal Status Metric Styles */
.charging-status-metric,
.online-status-metric,
#ccup .status-metric {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#ccup .charging-status-metric .metric-icon-base,
#ccup .online-status-metric .metric-icon-base,
#ccup .status-metric .metric-icon-base {
    font-size: 0.85rem;
    width: 16px;
}

#ccup .charging-status-metric .metric-label,
#ccup .online-status-metric .metric-label,
#ccup .status-metric .metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

#ccup .charging-status-metric .metric-value,
#ccup .online-status-metric .metric-value,
#ccup .status-metric .metric-value {
    font-size: 0.75rem;
    font-weight: 700;
    flex: 1;
}

#ccup .charging-status-metric .status-indicator,
#ccup .online-status-metric .status-indicator,
#ccup .status-metric .status-indicator {
    font-size: 0.9rem;
    margin-left: auto;
}

/* Active State (Green) */
.charging-status-metric[data-active="true"],
.online-status-metric[data-active="true"],
.status-metric[data-active="true"] {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.charging-status-metric[data-active="true"] .metric-icon-base,
.online-status-metric[data-active="true"] .metric-icon-base,
.status-metric[data-active="true"] .metric-icon-base {
    color: #10b981;
}

.charging-status-metric[data-active="true"] .metric-value,
.online-status-metric[data-active="true"] .metric-value,
.status-metric[data-active="true"] .metric-value {
    color: #10b981;
}

.charging-status-metric[data-active="true"] .status-indicator,
.online-status-metric[data-active="true"] .status-indicator,
.status-metric[data-active="true"] .status-indicator {
    color: #10b981;
}

/* Inactive State (Red) with Animation */
.charging-status-metric[data-active="false"],
.online-status-metric[data-active="false"],
.status-metric[data-active="false"] {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.4);
    animation: statusAlert 2s ease-in-out infinite;
}

.charging-status-metric[data-active="false"] .metric-icon-base,
.online-status-metric[data-active="false"] .metric-icon-base,
.status-metric[data-active="false"] .metric-icon-base {
    color: #ef4444;
    animation: iconPulse 1.5s ease-in-out infinite;
}

.charging-status-metric[data-active="false"] .metric-value,
.online-status-metric[data-active="false"] .metric-value,
.status-metric[data-active="false"] .metric-value {
    color: #ef4444;
    font-weight: 700;
}

.charging-status-metric[data-active="false"] .status-indicator,
.online-status-metric[data-active="false"] .status-indicator,
.status-metric[data-active="false"] .status-indicator {
    color: #ef4444;
    animation: iconPulse 1.5s ease-in-out infinite;
}

/* Warning State (Orange) */
.charging-status-metric[data-active="warning"],
.online-status-metric[data-active="warning"],
.status-metric[data-active="warning"] {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.4);
    animation: statusWarning 2.5s ease-in-out infinite;
}

.charging-status-metric[data-active="warning"] .metric-icon-base,
.online-status-metric[data-active="warning"] .metric-icon-base,
.status-metric[data-active="warning"] .metric-icon-base {
    color: #f59e0b;
}

.charging-status-metric[data-active="warning"] .metric-value,
.online-status-metric[data-active="warning"] .metric-value,
.status-metric[data-active="warning"] .metric-value {
    color: #f59e0b;
}

.charging-status-metric[data-active="warning"] .status-indicator,
.online-status-metric[data-active="warning"] .status-indicator,
.status-metric[data-active="warning"] .status-indicator {
    color: #f59e0b;
}

/* Universal Animations */
@keyframes statusAlert {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        border-color: rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.6);
        border-color: rgba(239, 68, 68, 0.8);
    }
}

@keyframes statusWarning {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3);
        border-color: rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 0 10px 2px rgba(245, 158, 11, 0.5);
        border-color: rgba(245, 158, 11, 0.7);
    }
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* AAA User Status Styling */
.aaa-user-status-value.status-success {
    color: #10b981 !important;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    animation: statusSuccessPulse 2s ease-in-out infinite;
}

.aaa-user-status-value.status-critical {
    color: #ef4444 !important;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    animation: statusCriticalPulse 2s ease-in-out infinite;
}

.aaa-user-status-value.status-warning {
    color: #f59e0b !important;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    animation: statusWarningPulse 2s ease-in-out infinite;
}

@keyframes statusWarningPulse {
    0%, 100% {
        text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
        transform: scale(1.05);
    }
}

/* ONT Status and Management Status Styling */
.ont-status-value.status-success,
.ont-management-value.status-success {
    color: #10b981;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    animation: statusSuccessPulse 2s ease-in-out infinite;
}

.ont-status-value.status-critical,
.ont-management-value.status-critical {
    color: #ef4444;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    animation: statusCriticalPulse 2s ease-in-out infinite;
}

@keyframes statusSuccessPulse {
    0%, 100% {
        text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
        transform: scale(1.05);
    }
}

@keyframes statusCriticalPulse {
    0%, 100% {
        text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
        transform: scale(1.05);
    }
}

/* Diagnostic Card Animations */
@keyframes successPulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
}

@keyframes warningPulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
    }
}

@keyframes criticalPulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
    }
}

/* Icon Animations */
@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-3px) scale(1.05);
    }
}

@keyframes iconShake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

@keyframes iconPulseError {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.8);
    }
}

/* Badge Animations */
@keyframes badgeGlow {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.6);
    }
}

@keyframes badgeFlash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.7);
    }
}

/* Value Animations */
@keyframes valueFlash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes resultPulse {

    0%,
    100% {
        background: rgba(239, 68, 68, 0.1);
    }

    50% {
        background: rgba(239, 68, 68, 0.15);
    }
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    #ccup .intelligence-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #ccup .usage-revenue-combined {
        grid-column: span 1;
    }

    #ccup .checkpoints-iconic-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    #ccup .intel-sections-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #ccup .usage-section-redesign {
        padding-right: 0;
        padding-bottom: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    #ccup .revenue-section-redesign {
        padding-left: 0;
        padding-top: 1rem;
    }
}

@media (max-width: 960px) {
    #ccup .intel-section-combined {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #ccup .revenue-section-side {
        margin-top: 1rem;
    }
}

@media (max-width: 1024px) {
    #ccup .checkpoints-iconic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .usage-metrics-grid,
    #ccup .revenue-breakdown-grid {
        grid-template-columns: 1fr;
    }

    #ccup .intelligence-card {
        padding: 1rem;
    }

    #ccup .checkpoints-iconic-grid {
        grid-template-columns: 1fr;
    }

    #ccup .checkpoint-icon-large {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}

/* ONT Reboot Button */
#ccup .ont-reboot-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-top: 0.75rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#ccup .ont-reboot-btn:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 1), rgba(185, 28, 28, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

#ccup .ont-reboot-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#ccup .ont-reboot-btn:disabled {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.5), rgba(107, 114, 128, 0.5));
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#ccup .ont-reboot-btn svg {
    animation: none;
}

#ccup .ont-reboot-btn:disabled svg {
    animation: spin 1s linear infinite;
}

#ccup[data-theme="dark"] .ont-reboot-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    border-color: rgba(239, 68, 68, 0.4);
}

#ccup[data-theme="dark"] .ont-reboot-btn:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 1), rgba(185, 28, 28, 1));
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

/* ONT Push Config Button - Absolute Position Outside Node */
#ccup .ont-push-cfg-btn-absolute {
    position: absolute;
    top: -12px;
    left: -36px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), 0 0 0 4px rgba(59, 130, 246, 0.1);
    z-index: 10;
}

#ccup .ont-push-cfg-btn-absolute:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(29, 78, 216, 1));
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5), 0 0 0 6px rgba(59, 130, 246, 0.15);
}

#ccup .ont-push-cfg-btn-absolute:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4), 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#ccup .ont-push-cfg-btn-absolute:disabled {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.8), rgba(107, 114, 128, 0.8));
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    opacity: 0.6;
    pointer-events: all;
}

#ccup .ont-push-cfg-btn-absolute svg {
    animation: none;
}

#ccup .ont-push-cfg-btn-absolute:disabled svg {
    animation: spin 1s linear infinite;
}

#ccup[data-theme="dark"] .ont-push-cfg-btn-absolute {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(37, 99, 235, 1));
    border-color: rgba(30, 41, 59, 0.9);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5), 0 0 0 4px rgba(59, 130, 246, 0.15);
}

#ccup[data-theme="dark"] .ont-push-cfg-btn-absolute:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(29, 78, 216, 1));
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.6), 0 0 0 6px rgba(59, 130, 246, 0.2);
}

/* ONT Push Config Button - Absolute Position Outside Node */
#ccup .ont-push-cfg-btn-absolute {
    position: absolute;
    top: -12px;
    left: -12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), 0 0 0 4px rgba(59, 130, 246, 0.1);
    z-index: 10;
}

#ccup .ont-push-cfg-btn-absolute:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(29, 78, 216, 1));
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5), 0 0 0 6px rgba(59, 130, 246, 0.15);
}

#ccup .ont-push-cfg-btn-absolute:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4), 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#ccup .ont-push-cfg-btn-absolute:disabled {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.8), rgba(107, 114, 128, 0.8));
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

#ccup .ont-push-cfg-btn-absolute svg {
    animation: none;
}

#ccup .ont-push-cfg-btn-absolute:disabled svg {
    animation: spin 1s linear infinite;
}

#ccup[data-theme="dark"] .ont-push-cfg-btn-absolute {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(37, 99, 235, 1));
    border-color: rgba(30, 41, 59, 0.9);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5), 0 0 0 4px rgba(59, 130, 246, 0.15);
}

#ccup[data-theme="dark"] .ont-push-cfg-btn-absolute:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(29, 78, 216, 1));
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.6), 0 0 0 6px rgba(59, 130, 246, 0.2);
}

/* Development Popup Notification */
#ccup .dev-popup {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dev-popup.show {
    opacity: 1;
    transform: translateX(0);
}

#ccup .dev-popup-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.98), rgba(37, 99, 235, 0.98));
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    min-width: 280px;
    max-width: 320px;
    backdrop-filter: blur(8px);
}

#ccup .dev-popup-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.9);
}

#ccup .dev-popup-text {
    flex: 1;
}

#ccup .dev-popup-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

#ccup .dev-popup-message {
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

#ccup[data-theme="dark"] .dev-popup-content {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(37, 99, 235, 1));
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Email Modal Styles */
#ccup .email-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

#ccup .email-modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

#ccup .email-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.05));
}

.email-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

#ccup .email-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#ccup .email-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
}

#ccup .email-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

#ccup .email-preview {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative;
}

#ccup .email-preview img {
    width: 100%;
    height: auto;
    display: block;
}

#ccup .email-download-screenshot-btn {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.95));
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

#ccup .email-download-screenshot-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

#ccup .email-download-screenshot-btn:active {
    transform: translateX(-50%) translateY(0);
}

#ccup .email-instruction {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: rgb(59, 130, 246);
    font-size: 0.875rem;
    font-weight: 500;
}

#ccup .email-instruction svg {
    flex-shrink: 0;
}

#ccup[data-theme="dark"] .email-instruction {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));
    border-color: rgba(59, 130, 246, 0.3);
    color: rgb(96, 165, 250);
}

#ccup .email-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#ccup .email-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#ccup .email-form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.email-form-group input,
#ccup .email-form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* ===================================
   RESPONSIVE TOPOLOGY STYLES
   =================================== */

@media (max-width: 1400px) {
    #ccup .topology-flow-container {
        gap: 0;
    }
    
    .flex-shrink-0.w-44 {
        width: 12rem;
    }
    
    .flex-shrink-0.w-48 {
        width: 13rem;
    }
    
    #ccup .horizontal-connector {
        min-width: 2rem !important;
    }
    
    #ccup #horizontal-connector-olt-splitter {
        width: 8rem !important;
    }
    
    #ccup #horizontal-connector-splitter-ont {
        width: 3rem !important;
    }
}

@media (max-width: 1200px) {
    #ccup .topology-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    #ccup .topology-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    #ccup .topology-action-buttons {
        flex-wrap: wrap;
    }
    
    .topology-screenshot-btn span,
    .topology-email-btn span {
        display: none;
    }
    
    .topology-screenshot-btn,
    #ccup .topology-email-btn {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    #ccup .infrastructure-topology {
        padding: 1rem;
    }
    
    #ccup .topology-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .topology-header h2 {
        font-size: 0.8rem;
    }
    
    #ccup .topology-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    #ccup .node-id {
        font-size: 0.7rem;
        order: -1;
    }
    
    #ccup .topology-action-buttons {
        flex-wrap: wrap;
    }
    
    #ccup .topology-zoom-controls {
        padding: 0.5rem 0.75rem;
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
        background: rgba(99, 102, 241, 0.12);
        border: 2px solid rgba(99, 102, 241, 0.3);
    }
    
    #ccup .topology-zoom-btn {
        width: 40px;
        height: 40px;
        border: 2px solid rgba(99, 102, 241, 0.4);
        background: rgba(255, 255, 255, 0.95);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    #ccup .topology-zoom-btn:active {
        transform: scale(0.9);
        background: rgba(99, 102, 241, 0.2);
    }
    
    #ccup .topology-zoom-level {
        min-width: 50px;
        font-size: 0.875rem;
        font-weight: 800;
    }
    
    .topology-screenshot-btn,
    #ccup .topology-email-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    #ccup[data-theme="dark"] .topology-zoom-btn {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(99, 102, 241, 0.5);
    }
    
    #ccup[data-theme="dark"] .topology-zoom-btn:active {
        background: rgba(99, 102, 241, 0.25);
    }
}
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.email-form-group input:focus,
.email-form-group textarea:focus {
    outline: none;
    border-color: rgb(16, 185, 129);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#ccup .email-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

#ccup .email-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.email-btn-cancel,
#ccup .email-btn-send {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

#ccup .email-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

#ccup .email-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
}

#ccup[data-theme="dark"] .email-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

#ccup .email-btn-send {
    background: linear-gradient(135deg, rgb(16, 185, 129), rgb(5, 150, 105));
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#ccup .email-btn-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#ccup .email-btn-send:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}