/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --error-color: #dc2626;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition-speed: 0.2s;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background-color: var(--bg-primary);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.nav-links {
    display: flex;
    gap: 8px;
    padding: 4px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-speed);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.header .subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-top: 8px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.breadcrumb a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-muted);
    transition: background-color var(--transition-speed);
}

.status-indicator.connected {
    background-color: var(--success-color);
}

.status-indicator.disconnected {
    background-color: var(--danger-color);
}

.status-indicator.connecting {
    background-color: var(--warning-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navigation Cards */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.navigation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.nav-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.nav-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.nav-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.nav-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.nav-card-footer {
    display: flex;
    justify-content: flex-end;
}

.nav-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
}

/* System Info */
.system-info {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.system-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.info-value {
    font-weight: 600;
    color: var(--text-primary);
}

.info-value.status-active {
    color: var(--success-color);
}

.info-value.status-inactive {
    color: var(--warning-color);
}

.info-value.status-error {
    color: var(--error-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #475569;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-right {
        width: 100%;
        align-items: stretch;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 12px;
        padding: 6px 12px;
    }

    .header h1 {
        font-size: 24px;
    }

    .navigation-cards {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 20px;
    }

    .nav-links {
        padding: 2px;
        gap: 4px;
    }

    .nav-link {
        font-size: 11px;
        padding: 5px 10px;
    }
}