/* VyLink-MOX Default Dashboard Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #60a5fa;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Stats Grid */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #60a5fa;
}

.stat-value.virtual { color: #a78bfa; }
.stat-value.bridge { color: #f472b6; }
.stat-value.physical { color: #60a5fa; }

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.card-status {
    padding: 0.35rem 0.875rem;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-status.down {
    background: rgba(239, 68, 68, 0.15);
    color: #fb7185;
}

/* Grid Layouts */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

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

.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.75rem;
}

.metric-label {
    color: #64748b;
}

.metric-value {
    color: #e2e8f0;
    font-family: monospace;
    font-weight: 600;
}

.metric-value.rx { color: #60a5fa; }
.metric-value.tx { color: #4ade80; }
.metric-value.rx-err { color: #ef4444; }
.metric-value.tx-err { color: #f59e0b; }

/* Info Items */
.info-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.info-value {
    font-size: 0.875rem;
    color: #e2e8f0;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
    margin-top: 0.25rem;
}

/* Optical Module Styles */
.optical {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.optical-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: #60a5fa;
    margin-bottom: 0.75rem;
}

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

.optical-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.optical-label {
    font-size: 0.7rem;
    color: #94a3b8;
}

.optical-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    font-family: monospace;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Sidebar Navigation */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid #60a5fa;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1001;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    background: rgba(15, 15, 15, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #60a5fa, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #60a5fa;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.nav-item.active {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.nav-icon {
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-badge {
    margin-left: auto;
    background: #60a5fa;
    color: white;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
}

.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.open {
    display: block;
}

/* Vendor Tabs */
.vendor-tab {
    transition: all 0.2s;
}

.vendor-tab:hover {
    background: rgba(96, 165, 250, 0.3) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .container {
        padding: 1rem;
        padding-top: 5rem;
    }
    
    .info-grid,
    .optical-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 240px;
    }
}

/* Form Styles for Configuration */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(255, 255, 255, 0.08);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fb7185;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #60a5fa;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #e2e8f0;
}

/* Alert/Toast Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fb7185;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Real-time Updates */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #4ade80;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
